GDB (xrefs)
Classes | Macros | Functions | Variables
/tmp/gdb-7.10/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 "complaints.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  buildsym_compunit
 
struct  pending_block
 
struct  subfile_stack
 

Macros

#define EXTERN
 
#define INITIAL_CONTEXT_STACK_SIZE   10
 
#define INITIAL_LINE_VECTOR_LENGTH   1000
 

Functions

static void free_buildsym_compunit (void)
 
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, 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)
 
void record_block_range (struct block *block, CORE_ADDR start, CORE_ADDR end_inclusive)
 
static struct blockvectormake_blockvector (void)
 
void start_subfile (const char *name)
 
static struct buildsym_compunitstart_buildsym_compunit (struct objfile *objfile, const char *comp_dir)
 
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 compunit_symtabbuildsym_compunit_symtab (void)
 
struct macro_tableget_macro_table (void)
 
static void prepare_for_building (const char *name, CORE_ADDR start_addr)
 
struct compunit_symtabstart_symtab (struct objfile *objfile, const char *name, const char *comp_dir, CORE_ADDR start_addr)
 
void restart_symtab (struct compunit_symtab *cust, const char *name, 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, int expandable, int required)
 
static struct compunit_symtabend_symtab_with_blockvector (struct block *static_block, int section, int expandable)
 
struct compunit_symtabend_symtab_from_static_block (struct block *static_block, int section, int expandable)
 
struct compunit_symtabend_symtab (CORE_ADDR end_addr, int section)
 
struct compunit_symtabend_expandable_symtab (CORE_ADDR end_addr, int section)
 
static void set_missing_symtab (struct pending *pending_list, struct compunit_symtab *cu)
 
void augment_type_symtab (void)
 
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 buildsym_compunitbuildsym_compunit
 
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
 

Macro Definition Documentation

#define EXTERN

Definition at line 91 of file buildsym.c.

#define INITIAL_CONTEXT_STACK_SIZE   10

Definition at line 207 of file buildsym.c.

Referenced by buildsym_init().

#define INITIAL_LINE_VECTOR_LENGTH   1000

Definition at line 208 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 ( void  )
static int block_compar ( const void *  ap,
const void *  bp 
)
static

Definition at line 1159 of file buildsym.c.

References BLOCK_START.

Referenced by end_symtab_get_static_block().

struct compunit_symtab* buildsym_compunit_symtab ( void  )

Definition at line 972 of file buildsym.c.

References buildsym_compunit::compunit_symtab, and gdb_assert.

Referenced by dwarf_decode_lines().

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

Definition at line 951 of file buildsym.c.

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

Referenced by end_symtab_with_blockvector().

struct compunit_symtab* end_expandable_symtab ( CORE_ADDR  end_addr,
int  section 
)

Definition at line 1540 of file buildsym.c.

References end_symtab_from_static_block(), and end_symtab_get_static_block().

Referenced by process_full_type_unit().

struct compunit_symtab* end_symtab ( CORE_ADDR  end_addr,
int  section 
)
struct compunit_symtab* end_symtab_from_static_block ( struct block static_block,
int  section,
int  expandable 
)
struct block* end_symtab_get_static_block ( CORE_ADDR  end_addr,
int  expandable,
int  required 
)
static struct compunit_symtab* end_symtab_with_blockvector ( struct block static_block,
int  section,
int  expandable 
)
static
struct symbol* find_symbol_in_list ( struct pending list,
char *  name,
int  length 
)

Definition at line 250 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 
)
static struct block* finish_block_internal ( struct symbol symbol,
struct pending **  listhead,
struct pending_block old_blocks,
CORE_ADDR  start,
CORE_ADDR  end,
int  is_global,
int  expandable 
)
static
static void free_buildsym_compunit ( void  )
static
void free_pending_blocks ( void  )
const char* get_last_source_file ( void  )
struct macro_table* get_macro_table ( void  )
int hashname ( const char *  name)
static struct blockvector* make_blockvector ( void  )
static
void merge_symbol_lists ( struct pending **  srclist,
struct pending **  targetlist 
)

Definition at line 1691 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  )
char* pop_subfile ( void  )
static void prepare_for_building ( const char *  name,
CORE_ADDR  start_addr 
)
static
struct context_stack* push_context ( int  desc,
CORE_ADDR  valu 
)
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 1677 of file buildsym.c.

References buildsym_compunit::producer.

Referenced by dwarf2_start_symtab().

static void reset_symtab_globals ( void  )
static
void restart_symtab ( struct compunit_symtab cust,
const char *  name,
CORE_ADDR  start_addr 
)
void set_last_source_file ( const char *  name)
static void set_missing_symtab ( struct pending pending_list,
struct compunit_symtab cu 
)
static
static struct buildsym_compunit* start_buildsym_compunit ( struct objfile objfile,
const char *  comp_dir 
)
static
void start_subfile ( const char *  name)
struct compunit_symtab* start_symtab ( struct objfile objfile,
const char *  name,
const char *  comp_dir,
CORE_ADDR  start_addr 
)
static void watch_main_source_file_lossage ( void  )
static

Variable Documentation

Definition at line 136 of file buildsym.c.

Referenced by start_subfile().

struct pending* free_pendings
static

Definition at line 140 of file buildsym.c.

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

int have_line_numbers
static
char* last_source_file
static

Definition at line 1715 of file buildsym.c.

Referenced by get_last_source_file(), and set_last_source_file().

struct addrmap* pending_addrmap
static

Definition at line 150 of file buildsym.c.

int pending_addrmap_interesting
static

Definition at line 161 of file buildsym.c.

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

struct obstack pending_addrmap_obstack
static

Definition at line 155 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 165 of file buildsym.c.

Referenced by free_pending_blocks(), and record_pending_block().

struct pending_block* pending_blocks
static

Definition at line 181 of file buildsym.c.

Referenced by push_context(), and record_pending_block().

struct macro_table* pending_macros
static

Definition at line 193 of file buildsym.c.

Referenced by end_symtab_with_blockvector(), and get_macro_table().

struct subfile_stack* subfile_stack
static

Definition at line 189 of file buildsym.c.

Referenced by pop_subfile(), and push_subfile().