|
GDB (xrefs)
|
#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 <algorithm>#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 symbol * | find_symbol_in_list (struct pending *list, char *name, int length) |
| void | free_pending_blocks (void) |
| static struct block * | finish_block_internal (struct symbol *symbol, struct pending **listhead, struct pending_block *old_blocks, const struct dynamic_prop *static_link, CORE_ADDR start, CORE_ADDR end, int is_global, int expandable) |
| struct block * | finish_block (struct symbol *symbol, struct pending **listhead, struct pending_block *old_blocks, const struct dynamic_prop *static_link, CORE_ADDR start, CORE_ADDR end) |
| void | record_block_range (struct block *block, CORE_ADDR start, CORE_ADDR end_inclusive) |
| static struct blockvector * | make_blockvector (void) |
| void | start_subfile (const char *name) |
| static struct buildsym_compunit * | start_buildsym_compunit (struct objfile *objfile, const char *comp_dir, enum language language) |
| void | patch_subfile_names (struct subfile *subfile, const char *name) |
| void | push_subfile (void) |
| char * | pop_subfile (void) |
| void | record_line (struct subfile *subfile, int line, CORE_ADDR pc) |
| struct compunit_symtab * | buildsym_compunit_symtab (void) |
| struct macro_table * | get_macro_table (void) |
| static void | prepare_for_building (const char *name, CORE_ADDR start_addr) |
| struct compunit_symtab * | start_symtab (struct objfile *objfile, const char *name, const char *comp_dir, CORE_ADDR start_addr, enum language language) |
| void | restart_symtab (struct compunit_symtab *cust, const char *name, CORE_ADDR start_addr) |
| static void | watch_main_source_file_lossage (void) |
| static void | reset_symtab_globals (void) |
| 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) |
| struct compunit_symtab * | end_symtab_from_static_block (struct block *static_block, int section, int expandable) |
| struct compunit_symtab * | end_symtab (CORE_ADDR end_addr, int section) |
| struct compunit_symtab * | end_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_stack * | push_context (int desc, CORE_ADDR valu) |
| struct context_stack * | pop_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_compunit * | buildsym_compunit |
| static struct pending * | free_pendings |
| static int | have_line_numbers |
| static struct addrmap * | pending_addrmap |
| static struct obstack | pending_addrmap_obstack |
| static int | pending_addrmap_interesting |
| static struct obstack | pending_block_obstack |
| static struct pending_block * | pending_blocks |
| static struct subfile_stack * | subfile_stack |
| static struct macro_table * | pending_macros |
| static char * | last_source_file |
| #define EXTERN |
Definition at line 88 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().
Definition at line 216 of file buildsym.c.
References free_pendings, symbol::ginfo, general_symbol_info::name, pending::next, pending::nsyms, PENDINGSIZE, symbol, and XNEW.
Referenced by coff_read_enum_type(), common_block_end(), define_symbol(), fixup_go_packaging(), merge_symbol_lists(), new_symbol_full(), patch_block_stabs(), process_coff_symbol(), process_xcoff_symbol(), psymtab_to_symtab_1(), and read_enum_type().
| void augment_type_symtab | ( | void | ) |
Definition at line 1581 of file buildsym.c.
References _, BLOCK_DICT, BLOCKVECTOR_BLOCK, complaint, COMPUNIT_BLOCKVECTOR, buildsym_compunit::compunit_symtab, context_stack_depth, dict_add_pending(), file_symbols, GLOBAL_BLOCK, global_symbols, have_line_numbers, pending_blocks, pending_macros, reset_symtab_globals(), set_missing_symtab(), STATIC_BLOCK, and symfile_complaints.
Referenced by process_full_type_unit().
| struct compunit_symtab* buildsym_compunit_symtab | ( | void | ) |
Definition at line 986 of file buildsym.c.
References buildsym_compunit::compunit_symtab, and gdb_assert.
Referenced by dwarf_decode_lines().
| void buildsym_init | ( | void | ) |
Definition at line 1748 of file buildsym.c.
References context_stack_size, file_symbols, free_pendings, gdb_assert, global_symbols, global_using_directives, INITIAL_CONTEXT_STACK_SIZE, pending_addrmap, pending_addrmap_interesting, pending_blocks, pending_macros, and XNEWVEC.
Referenced by buildsym_new_init(), dbx_psymtab_to_symtab_1(), process_full_comp_unit(), process_full_type_unit(), and xcoff_psymtab_to_symtab_1().
| void buildsym_new_init | ( | void | ) |
Definition at line 1779 of file buildsym.c.
References buildsym_init().
Referenced by coffstab_build_psymtabs(), dbx_new_init(), elf_new_init(), elfstab_build_psymtabs(), mdebug_build_psymtabs(), mipscoff_new_init(), stabsect_build_psymtabs(), and xcoff_new_init().
|
static |
Definition at line 965 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 1547 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 | ||
| ) |
Definition at line 1536 of file buildsym.c.
References end_symtab_from_static_block(), and end_symtab_get_static_block().
Referenced by coff_end_symtab(), process_one_symbol(), psymtab_to_symtab_1(), read_ofile_symtab(), and read_xcoff_symtab().
| struct compunit_symtab* end_symtab_from_static_block | ( | struct block * | static_block, |
| int | section, | ||
| int | expandable | ||
| ) |
Definition at line 1488 of file buildsym.c.
References end_symtab_with_blockvector(), and reset_symtab_globals().
Referenced by end_expandable_symtab(), end_symtab(), and process_full_comp_unit().
Definition at line 1218 of file buildsym.c.
References _, pending_block::block, BLOCK_START, cleanup_undefined_stabs_types(), complaint, context_stack_depth, context_stack::end_addr, file_symbols, finish_block(), finish_block_internal(), finish_global_stabs(), objfile::flags, global_symbols, global_using_directives, have_line_numbers, last_source_start_addr, local_symbols, context_stack::name, pending_block::next, OBJF_REORDERED, buildsym_compunit::objfile, context_stack::old_blocks, pending_blocks, pending_macros, pop_context(), context_stack::start_addr, and symfile_complaints.
Referenced by end_expandable_symtab(), end_symtab(), and process_full_comp_unit().
|
static |
Definition at line 1310 of file buildsym.c.
References add_compunit_symtab_to_objfile(), ALL_COMPUNIT_FILETABS, ALL_DICT_SYMBOLS, allocate_symtab(), BLOCK_DICT, BLOCK_END, BLOCK_FUNCTION, BLOCKVECTOR_BLOCK, BLOCKVECTOR_NBLOCKS, buildsym_compunit::comp_dir, compare_line_numbers(), COMPUNIT_BLOCK_LINE_SECTION, COMPUNIT_BLOCKVECTOR, COMPUNIT_DEBUGFORMAT, COMPUNIT_DIRNAME, COMPUNIT_FILETABS, COMPUNIT_MACRO_TABLE, COMPUNIT_PRODUCER, buildsym_compunit::compunit_symtab, buildsym_compunit::debugformat, finish_block_internal(), objfile::flags, gdb_assert, GLOBAL_BLOCK, global_symbols, linetable::item, subfile::language, symtab::language, last_source_start_addr, subfile::line_vector, buildsym_compunit::main_subfile, make_blockvector(), subfile::name, subfile::next, symtab::next, linetable::nitems, OBJF_REORDERED, buildsym_compunit::objfile, pending_macros, buildsym_compunit::producer, qsort, set_block_compunit_symtab(), objfile::sf, buildsym_compunit::subfiles, sym_fns::sym_read_linetable, symbol_set_symtab(), symbol_symtab(), subfile::symtab, SYMTAB_LINETABLE, and watch_main_source_file_lossage().
Referenced by end_symtab_from_static_block().
Definition at line 250 of file buildsym.c.
References name, 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, | ||
| const struct dynamic_prop * | static_link, | ||
| CORE_ADDR | start, | ||
| CORE_ADDR | end | ||
| ) |
Definition at line 528 of file buildsym.c.
References finish_block_internal().
Referenced by coff_symtab_read(), end_symtab_get_static_block(), process_one_symbol(), read_func_scope(), read_lexical_block_scope(), and read_xcoff_symtab().
|
static |
Definition at line 332 of file buildsym.c.
References _, ALL_DICT_SYMBOLS, allocate_block(), allocate_global_block(), pending_block::block, BLOCK_DICT, BLOCK_END, BLOCK_FUNCTION, block_set_using(), BLOCK_START, BLOCK_SUPERBLOCK, complaint, dict_add_pending(), dict_create_hashed(), dict_create_hashed_expandable(), dict_create_linear(), free_pendings, get_objfile_arch(), global_using_directives, buildsym_compunit::language, local_using_directives, pending::next, pending_block::next, buildsym_compunit::objfile, objfile_register_static_link(), paddress(), pending_blocks, record_pending_block(), symbol, SYMBOL_BLOCK_VALUE, SYMBOL_IS_ARGUMENT, SYMBOL_PRINT_NAME, SYMBOL_TYPE, symfile_complaints, TYPE_ALLOC, TYPE_FIELD_ARTIFICIAL, TYPE_FIELD_TYPE, TYPE_FIELDS, and TYPE_NFIELDS.
Referenced by end_symtab_get_static_block(), end_symtab_with_blockvector(), and finish_block().
|
static |
Definition at line 797 of file buildsym.c.
References buildsym_compunit::comp_dir, current_subfile, subfile::line_vector, subfile::name, subfile::next, buildsym_compunit::subfiles, and xfree().
Referenced by reset_symtab_globals(), and scoped_free_pendings::~scoped_free_pendings().
| void free_pending_blocks | ( | void | ) |
Definition at line 318 of file buildsym.c.
References pending_block_obstack, and pending_blocks.
Referenced by dbx_symfile_read(), make_blockvector(), xcoff_initial_scan(), and scoped_free_pendings::~scoped_free_pendings().
| const char* get_last_source_file | ( | void | ) |
Definition at line 1736 of file buildsym.c.
References last_source_file.
Referenced by coff_symtab_read(), process_linenos(), process_one_symbol(), psymtab_to_symtab_1(), and read_xcoff_symtab().
| struct macro_table* get_macro_table | ( | void | ) |
Definition at line 996 of file buildsym.c.
References buildsym_compunit::compunit_symtab, gdb_assert, objfile_per_bfd_storage::macro_cache, new_macro_table(), buildsym_compunit::objfile, objfile::objfile(), pending_macros, objfile::per_bfd, and objfile_per_bfd_storage::storage_obstack.
Referenced by macro_start_file().
| int hashname | ( | const char * | name | ) |
Definition at line 1671 of file buildsym.c.
References hash(), HASHSIZE, and name.
Referenced by common_block_end(), define_symbol(), parse_symbol(), patch_opaque_types(), process_coff_symbol(), and scan_file_globals().
|
static |
Definition at line 600 of file buildsym.c.
References _, addrmap_create_fixed(), pending_block::block, BLOCK_START, BLOCKVECTOR_BLOCK, BLOCKVECTOR_MAP, BLOCKVECTOR_NBLOCKS, complaint, free_pending_blocks(), hex_string(), pending_block::next, buildsym_compunit::objfile, pending_addrmap, pending_addrmap_interesting, pending_blocks, and symfile_complaints.
Referenced by end_symtab_with_blockvector().
Definition at line 1698 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, |
| const char * | name | ||
| ) |
Definition at line 831 of file buildsym.c.
References buildsym_compunit::comp_dir, deduce_language_from_filename(), subfile::language, language_unknown, subfile::name, name, subfile::next, and set_last_source_file().
Referenced by process_one_symbol().
| struct context_stack* pop_context | ( | void | ) |
Definition at line 1660 of file buildsym.c.
References context_stack_depth, and gdb_assert.
Referenced by coff_symtab_read(), end_symtab_get_static_block(), process_one_symbol(), read_func_scope(), read_lexical_block_scope(), and read_xcoff_symtab().
| char* pop_subfile | ( | void | ) |
Definition at line 883 of file buildsym.c.
References _, internal_error(), name, subfile_stack::name, subfile_stack::next, subfile_stack, and xfree().
Referenced by process_linenos(), and process_one_symbol().
|
static |
Definition at line 1020 of file buildsym.c.
References context_stack_depth, current_subfile, file_symbols, gdb_assert, global_symbols, global_using_directives, have_line_numbers, last_source_start_addr, local_symbols, local_using_directives, name, pending_addrmap, pending_macros, set_last_source_file(), and within_function.
Referenced by restart_symtab(), and start_symtab().
| struct context_stack* push_context | ( | int | desc, |
| CORE_ADDR | valu | ||
| ) |
Definition at line 1630 of file buildsym.c.
References context_stack, context_stack_depth, context_stack_size, context_stack::depth, local_symbols, local_using_directives, context_stack::local_using_directives, context_stack::locals, context_stack::name, context_stack::old_blocks, pending_blocks, context_stack::start_addr, and xrealloc().
Referenced by coff_symtab_read(), process_one_symbol(), read_func_scope(), read_lexical_block_scope(), and read_xcoff_symtab().
| void push_subfile | ( | void | ) |
Definition at line 868 of file buildsym.c.
References _, current_subfile, internal_error(), subfile::name, subfile_stack::name, subfile_stack::next, subfile_stack, and XNEW.
Referenced by process_linenos(), and process_one_symbol().
Definition at line 578 of file buildsym.c.
References addrmap_create_mutable(), addrmap_set_empty(), BLOCK_END, BLOCK_START, pending_addrmap, pending_addrmap_interesting, and pending_addrmap_obstack.
Referenced by dwarf2_record_block_ranges().
| void record_debugformat | ( | const char * | format | ) |
Definition at line 1678 of file buildsym.c.
References buildsym_compunit::debugformat.
Referenced by coff_start_symtab(), dwarf2_start_symtab(), process_one_symbol(), and read_xcoff_symtab().
Definition at line 903 of file buildsym.c.
References have_line_numbers, INITIAL_LINE_VECTOR_LENGTH, linetable::item, linetable_entry::line, subfile::line_vector, subfile::line_vector_length, linetable::nitems, linetable_entry::pc, xmalloc(), and xrealloc().
|
static |
Definition at line 546 of file buildsym.c.
References pending_block::block, pending_block::next, pending_block_obstack, and pending_blocks.
Referenced by finish_block_internal().
| void record_producer | ( | const char * | producer | ) |
Definition at line 1684 of file buildsym.c.
References buildsym_compunit::producer.
Referenced by dwarf2_start_symtab().
|
static |
Definition at line 1182 of file buildsym.c.
References file_symbols, free_buildsym_compunit(), global_symbols, global_using_directives, local_symbols, local_using_directives, pending_addrmap, pending_addrmap_obstack, pending_macros, and set_last_source_file().
Referenced by augment_type_symtab(), and end_symtab_from_static_block().
| void restart_symtab | ( | struct compunit_symtab * | cust, |
| const char * | name, | ||
| CORE_ADDR | start_addr | ||
| ) |
Definition at line 1091 of file buildsym.c.
References COMPUNIT_DIRNAME, compunit_language(), COMPUNIT_OBJFILE, buildsym_compunit::compunit_symtab, name, prepare_for_building(), and start_buildsym_compunit().
Referenced by setup_type_unit_groups().
| void set_last_source_file | ( | const char * | name | ) |
Definition at line 1727 of file buildsym.c.
References last_source_file, name, and xfree().
Referenced by coff_end_symtab(), coff_symtab_read(), complete_symtab(), parse_partial_symbols(), patch_subfile_names(), prepare_for_building(), read_dbx_symtab(), read_ofile_symtab(), read_xcoff_symtab(), reset_symtab_globals(), and scan_xcoff_symtab().
|
static |
Definition at line 1560 of file buildsym.c.
References COMPUNIT_FILETABS, pending::next, pending::nsyms, pending_list, pending::symbol, symbol_set_symtab(), and symbol_symtab().
Referenced by augment_type_symtab().
|
static |
Definition at line 772 of file buildsym.c.
References buildsym_compunit::comp_dir, buildsym_compunit::debugformat, buildsym_compunit::language, memset(), buildsym_compunit::objfile, buildsym_compunit::producer, and XNEW.
Referenced by restart_symtab(), and start_symtab().
| void start_subfile | ( | const char * | name | ) |
Definition at line 670 of file buildsym.c.
References subfile::buildsym_compunit, buildsym_compunit, buildsym_compunit::comp_dir, current_subfile, deduce_language_from_filename(), gdb_assert, subfile::language, language_c, language_cplus, language_fortran, language_unknown, subfile::line_vector, memset(), subfile::name, name, subfile::next, SLASH_STRING, buildsym_compunit::subfiles, xfree(), and XNEW.
Referenced by dwarf2_start_subfile(), process_linenos(), process_one_symbol(), and start_symtab().
| struct compunit_symtab* start_symtab | ( | struct objfile * | objfile, |
| const char * | name, | ||
| const char * | comp_dir, | ||
| CORE_ADDR | start_addr, | ||
| enum language language | |||
| ) |
Definition at line 1055 of file buildsym.c.
References allocate_compunit_symtab(), buildsym_compunit::compunit_symtab, current_subfile, buildsym_compunit::main_subfile, name, prepare_for_building(), start_buildsym_compunit(), and start_subfile().
Referenced by coff_start_symtab(), dwarf2_start_symtab(), process_one_symbol(), and read_xcoff_symtab().
|
static |
Definition at line 1113 of file buildsym.c.
References gdb_assert, subfile::line_vector, subfile::line_vector_length, buildsym_compunit::main_subfile, subfile::name, subfile::next, buildsym_compunit::subfiles, subfile::symtab, and xfree().
Referenced by end_symtab_with_blockvector().
|
static |
Definition at line 136 of file buildsym.c.
Referenced by start_subfile().
|
static |
Definition at line 140 of file buildsym.c.
Referenced by add_symbol_to_list(), buildsym_init(), finish_block_internal(), merge_symbol_lists(), and scoped_free_pendings::~scoped_free_pendings().
|
static |
Definition at line 145 of file buildsym.c.
Referenced by augment_type_symtab(), end_symtab_get_static_block(), prepare_for_building(), and record_line().
|
static |
Definition at line 1722 of file buildsym.c.
Referenced by get_last_source_file(), and set_last_source_file().
|
static |
Definition at line 150 of file buildsym.c.
Referenced by buildsym_init(), make_blockvector(), prepare_for_building(), record_block_range(), reset_symtab_globals(), and scoped_free_pendings::~scoped_free_pendings().
|
static |
Definition at line 161 of file buildsym.c.
Referenced by buildsym_init(), make_blockvector(), and record_block_range().
|
static |
Definition at line 155 of file buildsym.c.
Referenced by record_block_range(), reset_symtab_globals(), and scoped_free_pendings::~scoped_free_pendings().
|
static |
Definition at line 165 of file buildsym.c.
Referenced by free_pending_blocks(), and record_pending_block().
|
static |
Definition at line 181 of file buildsym.c.
Referenced by augment_type_symtab(), buildsym_init(), end_symtab_get_static_block(), finish_block_internal(), free_pending_blocks(), make_blockvector(), push_context(), and record_pending_block().
|
static |
Definition at line 193 of file buildsym.c.
Referenced by augment_type_symtab(), buildsym_init(), end_symtab_get_static_block(), end_symtab_with_blockvector(), get_macro_table(), prepare_for_building(), reset_symtab_globals(), and scoped_free_pendings::~scoped_free_pendings().
|
static |
Definition at line 189 of file buildsym.c.
Referenced by pop_subfile(), and push_subfile().
1.8.14