GDB (xrefs)
Classes | Defines | Functions | Variables
/home/stan/gdb/src/gdb/buildsym.c File Reference
#include "defs.h"
#include "bfd.h"
#include "gdb_obstack.h"
#include "symtab.h"
#include "symfile.h"
#include "objfiles.h"
#include "gdbtypes.h"
#include "gdb_assert.h"
#include "complaints.h"
#include "gdb_string.h"
#include "expression.h"
#include "bcache.h"
#include "filenames.h"
#include "macrotab.h"
#include "demangle.h"
#include "block.h"
#include "cp-support.h"
#include "dictionary.h"
#include "addrmap.h"
#include "buildsym.h"
#include "stabsread.h"

Go to the source code of this file.

Classes

struct  pending_block
struct  subfile_stack

Defines

#define EXTERN
#define INITIAL_CONTEXT_STACK_SIZE   10
#define INITIAL_LINE_VECTOR_LENGTH   1000

Functions

static int compare_line_numbers (const void *ln1p, const void *ln2p)
static void record_pending_block (struct objfile *objfile, struct block *block, struct pending_block *opblock)
void add_symbol_to_list (struct symbol *symbol, struct pending **listhead)
struct symbolfind_symbol_in_list (struct pending *list, char *name, int length)
void really_free_pendings (void *dummy)
void free_pending_blocks (void)
static struct blockfinish_block_internal (struct symbol *symbol, struct pending **listhead, struct pending_block *old_blocks, CORE_ADDR start, CORE_ADDR end, struct objfile *objfile, int is_global, int expandable)
struct blockfinish_block (struct symbol *symbol, struct pending **listhead, struct pending_block *old_blocks, CORE_ADDR start, CORE_ADDR end, struct objfile *objfile)
void record_block_range (struct block *block, CORE_ADDR start, CORE_ADDR end_inclusive)
static struct blockvectormake_blockvector (struct objfile *objfile)
void start_subfile (const char *name, const char *dirname)
void patch_subfile_names (struct subfile *subfile, char *name)
void push_subfile (void)
char * pop_subfile (void)
void record_line (struct subfile *subfile, int line, CORE_ADDR pc)
struct macro_tableget_macro_table (struct objfile *objfile, const char *comp_dir)
void start_symtab (const char *name, const char *dirname, CORE_ADDR start_addr)
void restart_symtab (CORE_ADDR start_addr)
static void watch_main_source_file_lossage (void)
static int block_compar (const void *ap, const void *bp)
static void reset_symtab_globals (void)
struct blockend_symtab_get_static_block (CORE_ADDR end_addr, struct objfile *objfile, int expandable, int required)
struct symtabend_symtab_from_static_block (struct block *static_block, struct objfile *objfile, int section, int expandable)
struct symtabend_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
struct symtabend_expandable_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
static void set_missing_symtab (struct pending *pending_list, struct symtab *symtab)
void augment_type_symtab (struct objfile *objfile, struct symtab *primary_symtab)
struct context_stackpush_context (int desc, CORE_ADDR valu)
struct context_stackpop_context (void)
int hashname (const char *name)
void record_debugformat (const char *format)
void record_producer (const char *producer)
void merge_symbol_lists (struct pending **srclist, struct pending **targetlist)
void set_last_source_file (const char *name)
const char * get_last_source_file (void)
void buildsym_init (void)
void buildsym_new_init (void)

Variables

static struct subfilesubfiles
static struct pendingfree_pendings
static int have_line_numbers
static struct addrmappending_addrmap
static struct obstack pending_addrmap_obstack
static int pending_addrmap_interesting
static struct obstack pending_block_obstack
static struct pending_blockpending_blocks
static struct subfile_stacksubfile_stack
static struct macro_tablepending_macros
static char * last_source_file

Define Documentation

#define EXTERN

Definition at line 47 of file buildsym.c.

#define INITIAL_CONTEXT_STACK_SIZE   10

Definition at line 128 of file buildsym.c.

Referenced by restart_symtab().

#define INITIAL_LINE_VECTOR_LENGTH   1000

Definition at line 129 of file buildsym.c.

Referenced by record_line().


Function Documentation

void add_symbol_to_list ( struct symbol symbol,
struct pending **  listhead 
)
void augment_type_symtab ( struct objfile objfile,
struct symtab primary_symtab 
)
static int block_compar ( const void *  ap,
const void *  bp 
) [static]

Definition at line 984 of file buildsym.c.

References BLOCK_START.

Referenced by end_symtab_get_static_block().

void buildsym_init ( void  )
void buildsym_new_init ( void  )
static int compare_line_numbers ( const void *  ln1p,
const void *  ln2p 
) [static]

Definition at line 821 of file buildsym.c.

References linetable_entry::line, and linetable_entry::pc.

Referenced by end_symtab_from_static_block().

struct symtab* end_expandable_symtab ( CORE_ADDR  end_addr,
struct objfile objfile,
int  section 
) [read]

Definition at line 1359 of file buildsym.c.

References end_symtab_from_static_block(), and end_symtab_get_static_block().

Referenced by process_full_type_unit().

struct symtab* end_symtab ( CORE_ADDR  end_addr,
struct objfile objfile,
int  section 
) [read]
struct symtab* end_symtab_from_static_block ( struct block static_block,
struct objfile objfile,
int  section,
int  expandable 
) [read]
struct block* end_symtab_get_static_block ( CORE_ADDR  end_addr,
struct objfile objfile,
int  expandable,
int  required 
) [read]
struct symbol* find_symbol_in_list ( struct pending list,
char *  name,
int  length 
) [read]

Definition at line 171 of file buildsym.c.

References pending::next, pending::nsyms, pending::symbol, and SYMBOL_LINKAGE_NAME.

Referenced by patch_block_stabs().

struct block* finish_block ( struct symbol symbol,
struct pending **  listhead,
struct pending_block old_blocks,
CORE_ADDR  start,
CORE_ADDR  end,
struct objfile objfile 
) [read]
static struct block* finish_block_internal ( struct symbol symbol,
struct pending **  listhead,
struct pending_block old_blocks,
CORE_ADDR  start,
CORE_ADDR  end,
struct objfile objfile,
int  is_global,
int  expandable 
) [static, read]
void free_pending_blocks ( void  )
const char* get_last_source_file ( void  )
struct macro_table* get_macro_table ( struct objfile objfile,
const char *  comp_dir 
) [read]
int hashname ( const char *  name)
static struct blockvector* make_blockvector ( struct objfile objfile) [static, read]
void merge_symbol_lists ( struct pending **  srclist,
struct pending **  targetlist 
)

Definition at line 1508 of file buildsym.c.

References add_symbol_to_list(), free_pendings, and merge_symbol_lists().

Referenced by merge_symbol_lists().

void patch_subfile_names ( struct subfile subfile,
char *  name 
)
struct context_stack* pop_context ( void  ) [read]
char* pop_subfile ( void  )
struct context_stack* push_context ( int  desc,
CORE_ADDR  valu 
) [read]
void push_subfile ( void  )
void really_free_pendings ( void *  dummy)
void record_block_range ( struct block block,
CORE_ADDR  start,
CORE_ADDR  end_inclusive 
)
void record_debugformat ( const char *  format)
void record_line ( struct subfile subfile,
int  line,
CORE_ADDR  pc 
)
static void record_pending_block ( struct objfile objfile,
struct block block,
struct pending_block opblock 
) [static]
void record_producer ( const char *  producer)

Definition at line 1494 of file buildsym.c.

References current_subfile, and subfile::producer.

Referenced by dwarf2_start_symtab().

static void reset_symtab_globals ( void  ) [static]
void restart_symtab ( CORE_ADDR  start_addr)
void set_last_source_file ( const char *  name)
static void set_missing_symtab ( struct pending pending_list,
struct symtab symtab 
) [static]

Definition at line 1372 of file buildsym.c.

References pending::next, pending::nsyms, pending::symbol, and SYMBOL_SYMTAB.

Referenced by augment_type_symtab().

void start_subfile ( const char *  name,
const char *  dirname 
)
void start_symtab ( const char *  name,
const char *  dirname,
CORE_ADDR  start_addr 
)
static void watch_main_source_file_lossage ( void  ) [static]

Variable Documentation

struct pending* free_pendings [static]

Definition at line 63 of file buildsym.c.

Referenced by add_symbol_to_list(), finish_block_internal(), and merge_symbol_lists().

char* last_source_file [static]

Definition at line 1532 of file buildsym.c.

Referenced by get_last_source_file(), and set_last_source_file().

struct addrmap* pending_addrmap [static]

Definition at line 73 of file buildsym.c.

Definition at line 84 of file buildsym.c.

Referenced by buildsym_init(), make_blockvector(), and record_block_range().

struct obstack pending_addrmap_obstack [static]

Definition at line 78 of file buildsym.c.

Referenced by really_free_pendings(), record_block_range(), and reset_symtab_globals().

struct obstack pending_block_obstack [static]

Definition at line 88 of file buildsym.c.

Referenced by free_pending_blocks(), and record_pending_block().

struct pending_block* pending_blocks [static]

Definition at line 104 of file buildsym.c.

Referenced by push_context(), and record_pending_block().

struct macro_table* pending_macros [static]

Definition at line 116 of file buildsym.c.

Referenced by end_symtab_from_static_block(), and get_macro_table().

struct subfile_stack* subfile_stack [static]

Definition at line 112 of file buildsym.c.

Referenced by pop_subfile(), and push_subfile().

struct subfile* subfiles [static]

Definition at line 59 of file buildsym.c.

Referenced by start_subfile().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines