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 | _initialize_coffread (void) |
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 (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 (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, int 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) |
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 69 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 158 of file coffread.c.
Referenced by coff_symtab_read().
#define L_LNNO32 | ( | lp | ) | ((lp)->l_lnno) |
Definition at line 1474 of file coffread.c.
Referenced by enter_linenos().
#define N_BTMASK local_n_btmask |
Definition at line 110 of file coffread.c.
Referenced by decode_type().
#define N_BTSHFT local_n_btshft |
Definition at line 111 of file coffread.c.
#define N_TMASK local_n_tmask |
Definition at line 112 of file coffread.c.
#define N_TSHIFT local_n_tshift |
Definition at line 113 of file coffread.c.
Definition at line 78 of file coffread.c.
Referenced by coff_symtab_read(), and read_one_sym().
void _initialize_coffread | ( | void | ) |
Definition at line 2297 of file coffread.c.
References add_symtab_fns(), coff_free_info(), coff_objfile_data_key, coff_register_index, LOC_REGISTER, and register_symbol_register_impl().
Definition at line 365 of file coffread.c.
References alloc_type(), coff_lookup_type(), 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 2291 of file coffread.c.
References xfree().
Referenced by _initialize_coffread().
|
static |
Definition at line 1395 of file coffread.c.
References _, internal_error(), and stringtab.
Referenced by coff_symtab_read().
|
static |
Definition at line 223 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 xmalloc().
Referenced by coff_symfile_read().
Definition at line 341 of file coffread.c.
References type_vector, type_vector_length, and xrealloc().
Referenced by coff_alloc_type().
|
static |
Definition at line 761 of file coffread.c.
|
static |
Definition at line 2160 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, objfile::objfile_obstack, 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 2067 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, objfile::objfile_obstack, 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 1619 of file coffread.c.
References gdbarch_sdb_reg_to_regnum(), and SYMBOL_VALUE.
Definition at line 386 of file coffread.c.
References record_debugformat(), and start_symtab().
Referenced by coff_symtab_read().
|
static |
Definition at line 772 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, and OBJF_REORDERED.
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(), DBX_SYMFILE_INFO, 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(), free_current_contents(), free_linetab_cleanup(), free_stringtab_cleanup(), init_lineno(), init_minimal_symbol_collection(), init_stringtab(), install_minimal_symbols(), local_auxesz, local_linesz, local_n_btmask, local_n_btshft, local_n_tmask, local_n_tshift, local_symesz, lookup_minimal_symbol(), make_cleanup(), make_cleanup_bfd_unref(), make_cleanup_discard_minimal_symbols(), 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, objfile_has_partial_symbols(), pe_file, coff_symfile_info::stabsects, coff_symfile_info::stabstrsect, startswith(), symbol_file_add_separate(), symfile_bfd, symfile_bfd_open(), dbx_symfile_info::symtab_offset, temp_aux, temp_sym, coff_symfile_info::textaddr, coff_symfile_info::textsize, xfree(), and xmalloc().
|
static |
Definition at line 787 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(), complaint(), complete_symtab(), context_stack_depth, cs_to_bfd_section(), cs_to_section(), current_subfile, context_stack::depth, enter_linenos(), error(), 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, 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, 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_length, within_function, xfree(), and xmalloc().
Referenced by coff_symfile_read().
Definition at line 408 of file coffread.c.
References current_source_end_addr, current_source_start_addr, set_last_source_file(), and size.
Referenced by coff_symtab_read().
|
static |
Definition at line 319 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 292 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 305 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 1915 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 1900 of file coffread.c.
References coff_symbol::c_naux, and decode_type().
Referenced by process_coff_symbol().
|
static |
Definition at line 1818 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 1478 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 282 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 1460 of file coffread.c.
References linetab, and xfree().
Referenced by free_linetab_cleanup(), and init_lineno().
|
static |
Definition at line 1468 of file coffread.c.
References free_linetab().
Referenced by coff_symfile_read().
|
static |
Definition at line 1356 of file coffread.c.
References stringtab, and xfree().
Referenced by free_stringtab_cleanup(), and init_stringtab().
|
static |
Definition at line 1364 of file coffread.c.
References free_stringtab().
Referenced by coff_symfile_read().
|
static |
Definition at line 1370 of file coffread.c.
References stringtab.
Referenced by coff_symtab_read(), and read_one_sym().
Definition at line 1431 of file coffread.c.
References free_linetab(), linetab, linetab_offset, linetab_size, local_linesz, offset, size, and xmalloc().
Referenced by coff_symfile_read().
|
static |
Definition at line 1316 of file coffread.c.
References free_stringtab(), 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 1559 of file coffread.c.
References ALL_BLOCK_SYMBOLS, BLOCKVECTOR_BLOCK, hash(), hashname(), LOC_TYPEDEF, name, 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 1529 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 1633 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, objfile::objfile_obstack, 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 1236 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, 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 prim_record_minimal_symbol_and_info().
Referenced by coff_symtab_read().
void stabsread_clear_cache | ( | void | ) |
Definition at line 502 of file stabsread.c.
References ref_chunk, and ref_count.
Referenced by coff_symfile_finish().
|
static |
Definition at line 50 of file coffread.c.
Referenced by _initialize_coffread(), coff_symfile_init(), and coff_symfile_read().
|
static |
Definition at line 1624 of file coffread.c.
|
static |
Definition at line 1630 of file coffread.c.
Referenced by _initialize_coffread(), and process_coff_symbol().
Definition at line 2265 of file coffread.c.
|
static |
Definition at line 54 of file coffread.c.
|
static |
Definition at line 84 of file coffread.c.
Referenced by coff_end_symtab(), and complete_symtab().
|
static |
Definition at line 83 of file coffread.c.
Referenced by coff_end_symtab(), and complete_symtab().
|
static |
Definition at line 1422 of file coffread.c.
Referenced by enter_linenos(), free_linetab(), and init_lineno().
|
static |
Definition at line 1423 of file coffread.c.
Referenced by enter_linenos(), and init_lineno().
|
static |
Definition at line 1424 of file coffread.c.
Referenced by enter_linenos(), and init_lineno().
|
static |
Definition at line 122 of file coffread.c.
Referenced by coff_symfile_read(), and read_one_sym().
|
static |
Definition at line 120 of file coffread.c.
Referenced by coff_symfile_read(), enter_linenos(), find_linenos(), and init_lineno().
|
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 107 of file coffread.c.
Referenced by coff_symfile_read().
|
static |
Definition at line 108 of file coffread.c.
Referenced by coff_symfile_read().
|
static |
Definition at line 121 of file coffread.c.
Referenced by coff_symfile_read(), and read_one_sym().
|
static |
Definition at line 89 of file coffread.c.
Referenced by coff_symtab_read(), and read_one_sym().
|
static |
Definition at line 90 of file coffread.c.
Referenced by coff_read_enum_type(), coff_read_struct_type(), and coff_symtab_read().
Definition at line 131 of file coffread.c.
|
static |
Definition at line 126 of file coffread.c.
Referenced by coff_symfile_read(), coff_symtab_read(), and read_one_sym().
|
static |
Definition at line 1313 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 97 of file coffread.c.
Referenced by coff_symfile_read(), and read_one_sym().
|
static |
Definition at line 96 of file coffread.c.
Referenced by coff_symfile_read(), and read_one_sym().
|
static |
Definition at line 149 of file coffread.c.
Referenced by coff_lookup_type().
|
static |
Definition at line 153 of file coffread.c.
Referenced by coff_lookup_type(), and coff_symtab_read().