|
GDB (xrefs)
|
#include "defs.h"#include "symtab.h"#include "gdbtypes.h"#include "demangle.h"#include "breakpoint.h"#include "bfd.h"#include "gdb_obstack.h"#include <ctype.h>#include "coff/internal.h"#include "libcoff.h"#include "objfiles.h"#include "buildsym.h"#include "gdb-stabs.h"#include "stabsread.h"#include "complaints.h"#include "target.h"#include "block.h"#include "dictionary.h"#include "coff-pe-read.h"#include "psymtab.h"#include "build-id.h"Go to the source code of this file.
Classes | |
| struct | coff_symfile_info |
| struct | coff_symbol |
| struct | find_targ_sec_arg |
Macros | |
| #define | EXTERNAL_NAME(string, abfd) |
| #define | SDB_TYPE(type) (BTYPE(type) | (type & N_TMASK)) |
| #define | N_BTMASK local_n_btmask |
| #define | N_BTSHFT local_n_btshft |
| #define | N_TMASK local_n_tmask |
| #define | N_TSHIFT local_n_tshift |
| #define | INITIAL_TYPE_VECTOR_LENGTH 160 |
| #define | L_LNNO32(lp) ((lp)->l_lnno) |
Functions | |
| void | stabsread_clear_cache (void) |
| static struct type * | coff_read_struct_type (int, int, int, struct objfile *) |
| static struct type * | decode_base_type (struct coff_symbol *, unsigned int, union internal_auxent *, struct objfile *) |
| static struct type * | decode_type (struct coff_symbol *, unsigned int, union internal_auxent *, struct objfile *) |
| static struct type * | decode_function_type (struct coff_symbol *, unsigned int, union internal_auxent *, struct objfile *) |
| static struct type * | coff_read_enum_type (int, int, int, struct objfile *) |
| static struct symbol * | process_coff_symbol (struct coff_symbol *, union internal_auxent *, struct objfile *) |
| static void | patch_opaque_types (struct symtab *) |
| static void | enter_linenos (long, int, int, struct objfile *) |
| static void | free_linetab (void) |
| static void | free_linetab_cleanup (void *ignore) |
| static int | init_lineno (bfd *, long, int) |
| static char * | getsymname (struct internal_syment *) |
| static const char * | coff_getfilename (union internal_auxent *) |
| static void | free_stringtab (void) |
| static void | free_stringtab_cleanup (void *ignore) |
| static int | init_stringtab (bfd *, long) |
| static void | read_one_sym (struct coff_symbol *, struct internal_syment *, union internal_auxent *) |
| static void | coff_symtab_read (minimal_symbol_reader &, long, unsigned int, struct objfile *) |
| static void | coff_locate_sections (bfd *abfd, asection *sectp, void *csip) |
| static int | cs_to_section (struct coff_symbol *, struct objfile *) |
| static void | find_targ_sec (bfd *abfd, asection *sect, void *obj) |
| static struct bfd_section * | cs_to_bfd_section (struct coff_symbol *cs, struct objfile *objfile) |
| static CORE_ADDR | cs_section_address (struct coff_symbol *, bfd *) |
| static struct type ** | coff_lookup_type (int index) |
| static struct type * | coff_alloc_type (int index) |
| static void | coff_start_symtab (struct objfile *objfile, const char *name) |
| static void | complete_symtab (const char *name, CORE_ADDR start_addr, unsigned int size) |
| static void | coff_end_symtab (struct objfile *objfile) |
| static int | is_import_fixup_symbol (struct coff_symbol *cs, enum minimal_symbol_type type) |
| static struct minimal_symbol * | record_minimal_symbol (minimal_symbol_reader &reader, struct coff_symbol *cs, CORE_ADDR address, enum minimal_symbol_type type, int section, struct objfile *objfile) |
| static void | coff_symfile_init (struct objfile *objfile) |
| static void | find_linenos (bfd *abfd, struct bfd_section *asect, void *vpinfo) |
| static void | coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) |
| static void | coff_new_init (struct objfile *ignore) |
| static void | coff_symfile_finish (struct objfile *objfile) |
| static void | patch_type (struct type *type, struct type *real_type) |
| static int | coff_reg_to_regnum (struct symbol *sym, struct gdbarch *gdbarch) |
| static void | coff_free_info (struct objfile *objfile, void *arg) |
| void | _initialize_coffread (void) |
Variables | |
| static const struct objfile_data * | coff_objfile_data_key |
| static struct objfile * | coffread_objfile |
| static CORE_ADDR | current_source_start_addr |
| static CORE_ADDR | current_source_end_addr |
| static bfd * | nlist_bfd_global |
| static int | nlist_nsyms_global |
| static char * | temp_sym |
| static char * | temp_aux |
| static unsigned | local_n_btmask |
| static unsigned | local_n_btshft |
| static unsigned | local_n_tmask |
| static unsigned | local_n_tshift |
| static unsigned | local_linesz |
| static unsigned | local_symesz |
| static unsigned | local_auxesz |
| static int | pe_file |
| static struct symbol * | opaque_type_chain [HASHSIZE] |
| static struct type ** | type_vector |
| static int | type_vector_length |
| static bfd * | symfile_bfd |
| static char * | stringtab = NULL |
| static char * | linetab = NULL |
| static long | linetab_offset |
| static unsigned long | linetab_size |
| static const struct symbol_register_ops | coff_register_funcs |
| static int | coff_register_index |
| static const struct sym_fns | coff_sym_fns |
| #define EXTERNAL_NAME | ( | string, | |
| abfd | |||
| ) |
Definition at line 67 of file coffread.c.
Referenced by coff_read_enum_type(), coff_read_struct_type(), and process_coff_symbol().
| #define INITIAL_TYPE_VECTOR_LENGTH 160 |
Definition at line 156 of file coffread.c.
Referenced by coff_symtab_read().
| #define L_LNNO32 | ( | lp | ) | ((lp)->l_lnno) |
Definition at line 1469 of file coffread.c.
Referenced by enter_linenos().
| #define N_BTMASK local_n_btmask |
Definition at line 108 of file coffread.c.
Referenced by decode_type().
| #define N_BTSHFT local_n_btshft |
Definition at line 109 of file coffread.c.
| #define N_TMASK local_n_tmask |
Definition at line 110 of file coffread.c.
| #define N_TSHIFT local_n_tshift |
Definition at line 111 of file coffread.c.
Definition at line 76 of file coffread.c.
Referenced by coff_symtab_read(), and read_one_sym().
| void _initialize_coffread | ( | void | ) |
Definition at line 2294 of file coffread.c.
References add_symtab_fns(), coff_free_info(), coff_objfile_data_key, coff_register_funcs, coff_register_index, coff_sym_fns, LOC_REGISTER, and register_symbol_register_impl().
|
static |
Definition at line 363 of file coffread.c.
References alloc_type(), coff_lookup_type(), coffread_objfile, and type.
Referenced by coff_read_enum_type(), coff_read_struct_type(), decode_base_type(), and decode_type().
|
static |
Definition at line 421 of file coffread.c.
References current_source_end_addr, current_source_start_addr, end_symtab(), last_source_start_addr, SECT_OFF_TEXT, and set_last_source_file().
Referenced by coff_symtab_read().
|
static |
Definition at line 2288 of file coffread.c.
References xfree().
Referenced by _initialize_coffread().
|
static |
Definition at line 1390 of file coffread.c.
References _, internal_error(), and stringtab.
Referenced by coff_symtab_read().
|
static |
Definition at line 222 of file coffread.c.
References make_cleanup(), name, stab_section_list::next, stab_section_list::section, coff_symfile_info::stabsects, coff_symfile_info::stabstrsect, startswith(), coff_symfile_info::textaddr, coff_symfile_info::textsize, xfree(), and XNEW.
Referenced by coff_symfile_read().
|
static |
Definition at line 339 of file coffread.c.
References memset(), type_vector, type_vector_length, and xrealloc().
Referenced by coff_alloc_type().
|
static |
Definition at line 757 of file coffread.c.
|
static |
Definition at line 2157 of file coffread.c.
References add_symbol_to_list(), allocate_symbol(), coff_symbol::c_name, coff_symbol::c_sclass, coff_symbol::c_value, coff_alloc_type(), EXTERNAL_NAME, file_symbols, gdbarch_int_bit(), get_objfile_arch(), LOC_CONST, local_symbols, name, pending::next, nlist_nsyms_global, pending::nsyms, objfile::obfd, read_one_sym(), SET_FIELD_ENUMVAL, pending::symbol, SYMBOL_ACLASS_INDEX, SYMBOL_DOMAIN, SYMBOL_LINKAGE_NAME, SYMBOL_SET_LINKAGE_NAME, SYMBOL_TYPE, SYMBOL_VALUE, symnum, TARGET_CHAR_BIT, type, TYPE_ALLOC, TYPE_CODE, TYPE_CODE_ENUM, TYPE_FIELD, TYPE_FIELD_BITSIZE, TYPE_FIELD_NAME, TYPE_FIELDS, TYPE_LENGTH, TYPE_NFIELDS, TYPE_UNSIGNED, VAR_DOMAIN, and within_function.
Referenced by decode_base_type().
|
static |
Definition at line 2062 of file coffread.c.
References coff_symbol::c_name, coff_symbol::c_sclass, coff_symbol::c_type, coff_symbol::c_value, coff_alloc_type(), decode_type(), EXTERNAL_NAME, nextfield::field, FIELD_BITSIZE, FIELD_TYPE, INIT_CPLUS_SPECIFIC, name, field::name, nextfield::next, nlist_nsyms_global, objfile::obfd, read_one_sym(), SET_FIELD_BITPOS, symnum, type, TYPE_ALLOC, TYPE_CODE, TYPE_CODE_STRUCT, TYPE_FIELD, TYPE_FIELDS, TYPE_LENGTH, and TYPE_NFIELDS.
Referenced by decode_base_type().
Definition at line 1614 of file coffread.c.
References gdbarch_sdb_reg_to_regnum(), and SYMBOL_VALUE.
|
static |
Definition at line 384 of file coffread.c.
References language_unknown, name, record_debugformat(), and start_symtab().
Referenced by coff_symtab_read().
|
static |
Definition at line 768 of file coffread.c.
References dwarf2_free_objfile(), and stabsread_clear_cache().
|
static |
Definition at line 502 of file coffread.c.
References coff_objfile_data_key, dbx_objfile_data_key, objfile::flags, OBJF_REORDERED, and XCNEW.
|
static |
Definition at line 562 of file coffread.c.
References _, ALL_OBJFILE_MSYMBOLS, coff_locate_sections(), coff_objfile_data_key, coff_symtab_read(), coffstab_build_psymtabs(), do_cleanups(), dwarf2_build_frame_info(), dwarf2_build_psymtabs(), dwarf2_has_info(), error(), find_linenos(), find_separate_debug_file_by_buildid(), find_separate_debug_file_by_debuglink(), objfile::flags, free_current_contents(), free_linetab_cleanup(), free_stringtab_cleanup(), gdb::ref_ptr< T, Policy >::get(), init_lineno(), init_stringtab(), minimal_symbol_reader::install(), local_auxesz, local_linesz, local_n_btmask, local_n_btshft, local_n_tmask, local_n_tshift, local_symesz, lookup_minimal_symbol(), make_cleanup(), coff_symfile_info::max_lineno_offset, coff_symfile_info::min_lineno_offset, bound_minimal_symbol::minsym, mst_data, mst_solib_trampoline, mst_text, MSYMBOL_LINKAGE_NAME, MSYMBOL_TYPE, name, objfile::obfd, OBJF_READNEVER, bound_minimal_symbol::objfile, objfile_has_partial_symbols(), pe_file, startswith(), symbol_file_add_separate(), symfile_bfd, symfile_bfd_open(), temp_aux, temp_sym, xfree(), and xmalloc().
|
static |
Definition at line 783 of file coffread.c.
References _, ALL_OBJFILE_FILETABS, ANOFFSET, coff_symbol::c_name, coff_symbol::c_naux, coff_symbol::c_sclass, coff_symbol::c_secnum, coff_symbol::c_symnum, coff_symbol::c_type, coff_symbol::c_value, coff_end_symtab(), coff_getfilename(), coff_start_symtab(), coffread_objfile, complaint, complete_symtab(), context_stack_depth, cs_to_bfd_section(), cs_to_section(), current_subfile, context_stack::depth, enter_linenos(), error(), fcn_cs_saved, finish_block(), gdbarch_addr_bits_remove(), gdbarch_coff_make_msymbol_special(), get_last_source_file(), get_objfile_arch(), getsymname(), INITIAL_TYPE_VECTOR_LENGTH, subfile::language, language_minimal, local_symbols, context_stack::locals, memset(), mst_abs, mst_bss, mst_data, mst_file_bss, mst_file_data, mst_file_text, mst_text, mst_unknown, context_stack::name, nlist_bfd_global, nlist_nsyms_global, objfile::obfd, objfile_name(), offset, context_stack::old_blocks, opaque_type_chain, patch_opaque_types(), pe_file, perror_with_name(), pop_context(), process_coff_symbol(), push_context(), QUIT, read_one_sym(), read_pe_exported_syms(), record_line, record_minimal_symbol(), SDB_TYPE, SECT_OFF_TEXT, objfile::section_offsets, set_last_source_file(), context_stack::start_addr, startswith(), SYMBOL_SECTION, SYMBOL_VALUE, symfile_complaints, symnum, type_vector, type_vector_length, within_function, XCNEWVEC, and xfree().
Referenced by coff_symfile_read().
|
static |
Definition at line 408 of file coffread.c.
References current_source_end_addr, current_source_start_addr, name, set_last_source_file(), and size.
Referenced by coff_symtab_read().
|
static |
Definition at line 317 of file coffread.c.
References coff_symbol::c_secnum, find_targ_sec(), find_targ_sec_arg::resultp, and find_targ_sec_arg::targ_index.
Referenced by read_one_sym().
|
static |
Definition at line 290 of file coffread.c.
References coff_symbol::c_secnum, find_targ_sec(), objfile::obfd, find_targ_sec_arg::resultp, and find_targ_sec_arg::targ_index.
Referenced by coff_symtab_read(), and cs_to_section().
|
static |
Definition at line 303 of file coffread.c.
References cs_to_bfd_section(), gdb_bfd_section_index(), objfile::obfd, and SECT_OFF_TEXT.
Referenced by coff_symtab_read(), and process_coff_symbol().
|
static |
Definition at line 1910 of file coffread.c.
References _, objfile_type::builtin_char, objfile_type::builtin_double, objfile_type::builtin_float, objfile_type::builtin_int, objfile_type::builtin_long, objfile_type::builtin_long_double, objfile_type::builtin_long_long, objfile_type::builtin_short, objfile_type::builtin_unsigned_char, objfile_type::builtin_unsigned_int, objfile_type::builtin_unsigned_long, objfile_type::builtin_unsigned_long_long, objfile_type::builtin_unsigned_short, objfile_type::builtin_void, coff_symbol::c_name, coff_symbol::c_naux, coff_symbol::c_sclass, coff_symbol::c_symnum, coff_alloc_type(), coff_read_enum_type(), coff_read_struct_type(), complaint, gdbarch_long_bit(), get_objfile_arch(), INIT_CPLUS_SPECIFIC, objfile_type(), symfile_complaints, type, TYPE_CODE, TYPE_CODE_ENUM, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_FIELDS, TYPE_LENGTH, TYPE_NAME, TYPE_NFIELDS, and TYPE_TAG_NAME.
Referenced by decode_type().
|
static |
Definition at line 1895 of file coffread.c.
References coff_symbol::c_naux, and decode_type().
Referenced by process_coff_symbol().
|
static |
Definition at line 1813 of file coffread.c.
References _, objfile_type::builtin_int, coff_symbol::c_name, coff_symbol::c_naux, coff_symbol::c_sclass, coff_alloc_type(), complaint, create_array_type(), create_static_range_type(), decode_base_type(), lookup_function_type(), lookup_pointer_type(), N_BTMASK, objfile_type(), symfile_complaints, and type.
Referenced by coff_read_struct_type(), decode_function_type(), and process_coff_symbol().
|
static |
Definition at line 1473 of file coffread.c.
References _, ANOFFSET, complaint, current_subfile, gdbarch_addr_bits_remove(), get_objfile_arch(), L_LNNO32, linetab, linetab_offset, linetab_size, local_linesz, record_line, SECT_OFF_TEXT, objfile::section_offsets, symfile_bfd, and symfile_complaints.
Referenced by coff_symtab_read().
|
static |
Definition at line 526 of file coffread.c.
References local_linesz, coff_symfile_info::max_lineno_offset, coff_symfile_info::min_lineno_offset, offset, and size.
Referenced by coff_symfile_read().
|
static |
Definition at line 280 of file coffread.c.
References find_targ_sec_arg::resultp, and find_targ_sec_arg::targ_index.
Referenced by cs_section_address(), and cs_to_bfd_section().
|
static |
Definition at line 1455 of file coffread.c.
References linetab, and xfree().
Referenced by free_linetab_cleanup(), and init_lineno().
|
static |
Definition at line 1463 of file coffread.c.
References free_linetab().
Referenced by coff_symfile_read().
|
static |
Definition at line 1351 of file coffread.c.
References stringtab, and xfree().
Referenced by free_stringtab_cleanup(), and init_stringtab().
|
static |
Definition at line 1359 of file coffread.c.
References free_stringtab().
Referenced by coff_symfile_read().
|
static |
Definition at line 1365 of file coffread.c.
References stringtab.
Referenced by coff_symtab_read(), and read_one_sym().
|
static |
Definition at line 1426 of file coffread.c.
References free_linetab(), linetab, linetab_offset, linetab_size, local_linesz, memset(), offset, size, and xmalloc().
Referenced by coff_symfile_read().
|
static |
Definition at line 1311 of file coffread.c.
References free_stringtab(), offset, stringtab, symfile_bfd, and xmalloc().
Referenced by coff_symfile_read().
|
static |
Definition at line 436 of file coffread.c.
References coff_symbol::c_name, coff_symbol::c_type, mst_text, and startswith().
Referenced by record_minimal_symbol().
|
static |
Definition at line 1554 of file coffread.c.
References ALL_BLOCK_SYMBOLS, BLOCKVECTOR_BLOCK, hash(), hashname(), LOC_TYPEDEF, name, opaque_type_chain, patch_type(), STATIC_BLOCK, SYMBOL_CLASS, SYMBOL_DOMAIN, SYMBOL_LINKAGE_NAME, SYMBOL_TYPE, SYMBOL_VALUE_CHAIN, SYMTAB_BLOCKVECTOR, TYPE_CODE, TYPE_CODE_PTR, TYPE_LENGTH, TYPE_TARGET_TYPE, and VAR_DOMAIN.
Referenced by coff_symtab_read().
Definition at line 1524 of file coffread.c.
References TYPE_ALLOC, TYPE_FIELDS, TYPE_LENGTH, TYPE_NAME, TYPE_NFIELDS, TYPE_TARGET_TYPE, and xfree().
Referenced by patch_opaque_types().
|
static |
Definition at line 1628 of file coffread.c.
References add_symbol_to_list(), allocate_symbol(), ANOFFSET, coff_symbol::c_name, coff_symbol::c_sclass, coff_symbol::c_type, coff_symbol::c_value, coff_register_index, cs_to_section(), current_subfile, decode_function_type(), decode_type(), EXTERNAL_NAME, file_symbols, global_symbols, hashname(), subfile::language, LOC_ARG, LOC_BLOCK, LOC_LOCAL, LOC_STATIC, LOC_TYPEDEF, local_symbols, lookup_function_type(), name, objfile::obfd, opaque_type_chain, SECT_OFF_TEXT, objfile::section_offsets, STRUCT_DOMAIN, SYMBOL_ACLASS_INDEX, SYMBOL_DOMAIN, SYMBOL_IS_ARGUMENT, SYMBOL_LINKAGE_NAME, SYMBOL_SECTION, SYMBOL_SET_LANGUAGE, SYMBOL_SET_NAMES, SYMBOL_TYPE, SYMBOL_VALUE, SYMBOL_VALUE_ADDRESS, SYMBOL_VALUE_CHAIN, TYPE_CODE, TYPE_CODE_FUNC, TYPE_CODE_PTR, TYPE_CODE_UNDEF, TYPE_LENGTH, TYPE_NAME, TYPE_TAG_NAME, TYPE_TARGET_TYPE, VAR_DOMAIN, and within_function.
Referenced by coff_symtab_read().
|
static |
Definition at line 1231 of file coffread.c.
References _, coff_symbol::c_name, coff_symbol::c_naux, coff_symbol::c_sclass, coff_symbol::c_secnum, coff_symbol::c_symnum, coff_symbol::c_type, coff_symbol::c_value, coffread_objfile, cs_section_address(), error(), getsymname(), if(), local_auxesz, local_symesz, nlist_bfd_global, objfile_name(), pe_file, SDB_TYPE, symfile_bfd, symnum, temp_aux, and temp_sym.
Referenced by coff_read_enum_type(), coff_read_struct_type(), and coff_symtab_read().
|
static |
Definition at line 465 of file coffread.c.
References coff_symbol::c_name, is_import_fixup_symbol(), and minimal_symbol_reader::record_with_info().
Referenced by coff_symtab_read().
| void stabsread_clear_cache | ( | void | ) |
Definition at line 521 of file stabsread.c.
References ref_chunk, and ref_count.
Referenced by coff_symfile_finish().
|
static |
Definition at line 48 of file coffread.c.
Referenced by _initialize_coffread(), coff_symfile_init(), and coff_symfile_read().
|
static |
Definition at line 1619 of file coffread.c.
Referenced by _initialize_coffread().
|
static |
Definition at line 1625 of file coffread.c.
Referenced by _initialize_coffread(), and process_coff_symbol().
|
static |
Definition at line 2262 of file coffread.c.
Referenced by _initialize_coffread().
|
static |
Definition at line 52 of file coffread.c.
Referenced by coff_alloc_type(), coff_symtab_read(), and read_one_sym().
|
static |
Definition at line 82 of file coffread.c.
Referenced by coff_end_symtab(), and complete_symtab().
|
static |
Definition at line 81 of file coffread.c.
Referenced by coff_end_symtab(), and complete_symtab().
|
static |
Definition at line 1417 of file coffread.c.
Referenced by enter_linenos(), free_linetab(), and init_lineno().
|
static |
Definition at line 1418 of file coffread.c.
Referenced by enter_linenos(), and init_lineno().
|
static |
Definition at line 1419 of file coffread.c.
Referenced by enter_linenos(), and init_lineno().
|
static |
Definition at line 120 of file coffread.c.
Referenced by coff_symfile_read(), and read_one_sym().
|
static |
Definition at line 118 of file coffread.c.
Referenced by coff_symfile_read(), enter_linenos(), find_linenos(), and init_lineno().
|
static |
Definition at line 103 of file coffread.c.
Referenced by coff_symfile_read().
|
static |
Definition at line 104 of file coffread.c.
Referenced by coff_symfile_read().
|
static |
Definition at line 105 of file coffread.c.
Referenced by coff_symfile_read().
|
static |
Definition at line 106 of file coffread.c.
Referenced by coff_symfile_read().
|
static |
Definition at line 119 of file coffread.c.
Referenced by coff_symfile_read(), and read_one_sym().
|
static |
Definition at line 87 of file coffread.c.
Referenced by coff_symtab_read(), and read_one_sym().
|
static |
Definition at line 88 of file coffread.c.
Referenced by coff_read_enum_type(), coff_read_struct_type(), and coff_symtab_read().
Definition at line 129 of file coffread.c.
Referenced by coff_symtab_read(), patch_opaque_types(), and process_coff_symbol().
|
static |
Definition at line 124 of file coffread.c.
Referenced by coff_symfile_read(), coff_symtab_read(), and read_one_sym().
|
static |
Definition at line 1308 of file coffread.c.
Referenced by coff_getfilename(), free_stringtab(), getsymname(), and init_stringtab().
|
static |
Definition at line 557 of file coffread.c.
Referenced by coff_symfile_read(), enter_linenos(), init_stringtab(), and read_one_sym().
|
static |
Definition at line 95 of file coffread.c.
Referenced by coff_symfile_read(), and read_one_sym().
|
static |
Definition at line 94 of file coffread.c.
Referenced by coff_symfile_read(), and read_one_sym().
|
static |
Definition at line 147 of file coffread.c.
Referenced by coff_lookup_type(), and coff_symtab_read().
|
static |
Definition at line 151 of file coffread.c.
Referenced by coff_lookup_type(), and coff_symtab_read().
1.8.14