GDB (xrefs)
|
#include "defs.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "demangle.h"
#include "breakpoint.h"
#include "bfd.h"
#include "gdbsupport/gdb_obstack.h"
#include <ctype.h>
#include "coff/internal.h"
#include "libcoff.h"
#include "objfiles.h"
#include "buildsym-legacy.h"
#include "stabsread.h"
#include "complaints.h"
#include "target.h"
#include "block.h"
#include "dictionary.h"
#include "dwarf2/public.h"
#include "coff-pe-read.h"
#include "build-id.h"
Go to the source code of this file.
Classes | |
struct | coff_symfile_info |
struct | coff_symbol |
struct | coff_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 (file_ptr, int, int, struct objfile *) |
static int | init_lineno (bfd *, file_ptr, file_ptr, gdb::unique_xmalloc_ptr< char > *) |
static char * | getsymname (struct internal_syment *) |
static const char * | coff_getfilename (union internal_auxent *) |
static int | init_stringtab (bfd *, file_ptr, gdb::unique_xmalloc_ptr< char > *) |
static void | read_one_sym (struct coff_symbol *, struct internal_syment *, union internal_auxent *) |
static void | coff_symtab_read (minimal_symbol_reader &, file_ptr, 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_compunit_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_compunit_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, unrelocated_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_read_minsyms (file_ptr symtab_offset, unsigned int nsyms, struct objfile *objfile) |
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) |
void | _initialize_coffread () |
Variables | |
static struct objfile * | coffread_objfile |
static const registry< objfile >::key< coff_symfile_info > | coff_objfile_data_key |
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 char * | linetab = NULL |
static file_ptr | linetab_offset |
static file_ptr | linetab_size |
static char * | stringtab = NULL |
static long | stringtab_length = 0 |
static bfd * | symfile_bfd |
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 66 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 155 of file coffread.c.
Referenced by coff_symtab_read().
#define L_LNNO32 | ( | lp | ) | ((lp)->l_lnno) |
Definition at line 1408 of file coffread.c.
Referenced by enter_linenos().
#define N_BTMASK local_n_btmask |
Definition at line 107 of file coffread.c.
Referenced by decode_type().
#define N_BTSHFT local_n_btshft |
Definition at line 108 of file coffread.c.
#define N_TMASK local_n_tmask |
Definition at line 109 of file coffread.c.
#define N_TSHIFT local_n_tshift |
Definition at line 110 of file coffread.c.
Definition at line 75 of file coffread.c.
Referenced by coff_symtab_read(), and read_one_sym().
void _initialize_coffread | ( | ) |
Definition at line 2175 of file coffread.c.
Referenced by initialize_all_files().
|
static |
Definition at line 347 of file coffread.c.
References coff_lookup_type(), coffread_objfile, language_c, type_allocator::new_type(), and type.
Referenced by coff_read_enum_type(), coff_read_struct_type(), decode_base_type(), and decode_type().
|
static |
Definition at line 403 of file coffread.c.
References current_source_end_addr, current_source_start_addr, end_compunit_symtab(), set_last_source_file(), and set_last_source_start_addr().
Referenced by coff_symtab_read().
|
static |
|
static |
Definition at line 220 of file coffread.c.
References name, coff_symfile_info::stabsects, coff_symfile_info::stabstrsect, coff_symfile_info::textaddr, and coff_symfile_info::textsize.
Referenced by coff_symfile_read().
|
static |
Definition at line 323 of file coffread.c.
References type_vector, type_vector_length, and xrealloc().
Referenced by coff_alloc_type().
|
static |
Definition at line 754 of file coffread.c.
|
static |
Definition at line 2050 of file coffread.c.
References add_symbol_to_list(), type::alloc_fields(), objfile::arch(), coff_symbol::c_name, coff_symbol::c_sclass, coff_symbol::c_value, coff_alloc_type(), EXTERNAL_NAME, type::field(), gdbarch_int_bit(), get_file_symbols(), get_local_symbols(), general_symbol_info::linkage_name(), LOC_CONST, name, pending::next, nlist_nsyms_global, pending::nsyms, objfile::obfd, objfile::objfile_obstack, read_one_sym(), symbol::set_aclass_index(), field::set_bitsize(), type::set_code(), symbol::set_domain(), type::set_is_unsigned(), type::set_length(), general_symbol_info::set_linkage_name(), field::set_loc_enumval(), field::set_name(), symbol::set_type(), symbol::set_value_longest(), pending::symbol, symnum, type, symbol::value_longest(), VAR_DOMAIN, and within_function.
Referenced by decode_base_type().
|
static |
Definition at line 527 of file coffread.c.
References coff_symtab_read(), minimal_symbol_reader::install(), lookup_minimal_symbol(), bound_minimal_symbol::minsym, objfile_per_bfd_storage::minsyms_read, mst_data, mst_solib_trampoline, mst_text, objfile::msymbols(), name, objfile::obfd, pe_file, objfile::per_bfd, read_pe_exported_syms(), minimal_symbol::set_type(), and minimal_symbol::type().
Referenced by coff_symfile_read().
|
static |
Definition at line 1959 of file coffread.c.
References type::alloc_fields(), coff_symbol::c_name, coff_symbol::c_sclass, coff_symbol::c_type, coff_symbol::c_value, coff_alloc_type(), decode_type(), EXTERNAL_NAME, type::field(), INIT_CPLUS_SPECIFIC, name, nlist_nsyms_global, objfile::obfd, objfile::objfile_obstack, read_one_sym(), type::set_code(), type::set_length(), symnum, and type.
Referenced by decode_base_type().
Definition at line 1531 of file coffread.c.
References gdbarch_sdb_reg_to_regnum(), and symbol::value_longest().
|
static |
Definition at line 368 of file coffread.c.
References language_unknown, name, record_debugformat(), start_compunit_symtab(), and within_function.
Referenced by coff_symtab_read().
|
static |
Definition at line 765 of file coffread.c.
References stabsread_clear_cache().
|
static |
Definition at line 484 of file coffread.c.
References coff_objfile_data_key.
|
static |
Definition at line 606 of file coffread.c.
References coff_locate_sections(), coff_objfile_data_key, coff_read_minsyms(), coffstab_build_psymtabs(), dwarf2_has_info(), dwarf2_initialize_objfile(), deferred_warnings::emit(), find_linenos(), find_separate_debug_file_by_buildid(), find_separate_debug_file_by_debuglink(), objfile::flags, registry< T >::get(), objfile::has_partial_symbols(), init_lineno(), init_stringtab(), linetab, local_auxesz, local_linesz, local_n_btmask, local_n_btshft, local_n_tmask, local_n_tshift, local_symesz, objfile::obfd, OBJF_READNEVER, pe_file, coff_symfile_info::stabsects, stringtab, symbol_file_add_separate(), symfile_bfd, symfile_bfd_open(), temp_aux, and temp_sym.
|
static |
Definition at line 778 of file coffread.c.
References objfile::arch(), coff_symbol::c_name, xcoff_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, xcoff_symbol::c_value, coff_end_compunit_symtab(), coff_getfilename(), coff_start_compunit_symtab(), coffread_objfile, complaint, complete_symtab, objfile::compunits(), cs_to_bfd_section(), cs_to_section(), context_stack::depth, enter_linenos(), fcn_cs_saved, finish_block(), gdbarch_addr_bits_remove(), gdbarch_coff_make_msymbol_special(), get_current_subfile(), get_last_source_file(), get_local_symbols(), getsymname(), INITIAL_TYPE_VECTOR_LENGTH, subfile::language, language_minimal, 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(), context_stack::old_blocks, opaque_type_chain, outermost_context_p(), patch_opaque_types(), pe_file, pop_context(), process_coff_symbol(), push_context(), QUIT, read_one_sym(), record_line(), record_minimal_symbol(), SDB_TYPE, objfile::section_offsets, set_last_source_file(), general_symbol_info::set_section_index(), symbol::set_value_longest(), context_stack::start_addr, symnum, objfile::text_section_offset(), type_vector, type_vector_length, within_function, and xfree().
Referenced by coff_read_minsyms().
|
static |
Definition at line 390 of file coffread.c.
References current_source_end_addr, current_source_start_addr, name, set_last_source_file(), and size.
|
static |
Definition at line 301 of file coffread.c.
References coff_symbol::c_secnum, and find_targ_sec().
Referenced by read_one_sym().
|
static |
Definition at line 274 of file coffread.c.
References coff_symbol::c_secnum, find_targ_sec(), and objfile::obfd.
Referenced by coff_symtab_read(), and cs_to_section().
|
static |
Definition at line 287 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 1820 of file coffread.c.
References objfile::arch(), builtin_type::builtin_char, builtin_type::builtin_double, builtin_type::builtin_float, builtin_type::builtin_int, builtin_type::builtin_long, builtin_type::builtin_long_double, builtin_type::builtin_long_long, builtin_type::builtin_short, builtin_type(), builtin_type::builtin_unsigned_char, builtin_type::builtin_unsigned_int, builtin_type::builtin_unsigned_long, builtin_type::builtin_unsigned_long_long, builtin_type::builtin_unsigned_short, builtin_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(), INIT_CPLUS_SPECIFIC, type::set_code(), type::set_fields(), type::set_length(), type::set_name(), type::set_num_fields(), and type.
Referenced by decode_type().
|
static |
Definition at line 1805 of file coffread.c.
References coff_symbol::c_naux, and decode_type().
Referenced by process_coff_symbol().
|
static |
Definition at line 1726 of file coffread.c.
References builtin_type::builtin_int, builtin_type(), 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(), decode_type(), type::index_type(), language_c, lookup_function_type(), lookup_pointer_type(), N_BTMASK, and type.
Referenced by coff_read_struct_type(), decode_function_type(), decode_type(), and process_coff_symbol().
|
static |
Definition at line 1412 of file coffread.c.
References objfile::arch(), complaint, gdbarch_addr_bits_remove(), get_current_subfile(), L_LNNO32, linetab, linetab_offset, linetab_size, local_linesz, record_line(), and symfile_bfd.
Referenced by coff_symtab_read().
|
static |
Definition at line 495 of file coffread.c.
References local_linesz, coff_symfile_info::min_lineno_offset, and size.
Referenced by coff_symfile_read().
|
static |
Definition at line 264 of file coffread.c.
Referenced by cs_section_address(), and cs_to_bfd_section().
|
static |
Definition at line 1320 of file coffread.c.
References stringtab, and stringtab_length.
Referenced by coff_symtab_read(), and read_one_sym().
|
static |
Definition at line 1379 of file coffread.c.
References linetab, linetab_offset, linetab_size, local_linesz, size, and xmalloc().
Referenced by coff_symfile_read().
|
static |
Definition at line 1279 of file coffread.c.
References stringtab, stringtab_length, symfile_bfd, and xmalloc().
Referenced by coff_symfile_read().
|
static |
Definition at line 418 of file coffread.c.
References coff_symbol::c_name, coff_symbol::c_type, and mst_text.
Referenced by record_minimal_symbol().
|
static |
Definition at line 1483 of file coffread.c.
References compunit_symtab::blockvector(), symtab::compunit(), hashname(), general_symbol_info::linkage_name(), LOC_TYPEDEF, name, opaque_type_chain, patch_type(), symbol::set_value_chain(), blockvector::static_block(), symbol::type(), symbol::value_chain(), and VAR_DOMAIN.
Referenced by coff_symtab_read().
Definition at line 1461 of file coffread.c.
References type::copy_fields(), type::length(), type::name(), type::set_length(), type::set_name(), type::target_type(), and xfree().
Referenced by patch_opaque_types().
|
static |
Definition at line 1545 of file coffread.c.
References add_symbol_to_list(), coff_symbol::c_name, coff_symbol::c_sclass, coff_symbol::c_type, coff_symbol::c_value, type::code(), coff_register_index, general_symbol_info::compute_and_set_names(), cs_to_section(), decode_function_type(), decode_type(), EXTERNAL_NAME, get_current_subfile(), get_file_symbols(), get_global_symbols(), get_local_symbols(), hashname(), type::length(), general_symbol_info::linkage_name(), LOC_ARG, LOC_BLOCK, LOC_LOCAL, LOC_STATIC, LOC_TYPEDEF, lookup_function_type(), name, type::name(), objfile::obfd, objfile::objfile_obstack, opaque_type_chain, objfile::per_bfd, SECT_OFF_TEXT, objfile::section_offsets, symbol::set_aclass_index(), symbol::set_domain(), symbol::set_is_argument(), general_symbol_info::set_language(), type::set_name(), general_symbol_info::set_section_index(), symbol::set_type(), symbol::set_value_address(), symbol::set_value_chain(), symbol::set_value_longest(), STRUCT_DOMAIN, type::target_type(), objfile::text_section_offset(), symbol::type(), TYPE_CODE_UNDEF, symbol::value_longest(), VAR_DOMAIN, and within_function.
Referenced by coff_symtab_read().
|
static |
Definition at line 1201 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(), getsymname(), 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 447 of file coffread.c.
References general_symbol_info::address, coff_symbol::c_name, is_import_fixup_symbol(), and minimal_symbol_reader::record_full().
Referenced by coff_symtab_read().
|
extern |
Definition at line 530 of file stabsread.c.
References ref_chunk, and ref_count.
Referenced by coff_symfile_finish().
|
static |
Definition at line 63 of file coffread.c.
Referenced by coff_symfile_init(), and coff_symfile_read().
|
static |
Definition at line 1536 of file coffread.c.
|
static |
Definition at line 1542 of file coffread.c.
Referenced by process_coff_symbol().
|
static |
Definition at line 2152 of file coffread.c.
|
static |
Definition at line 47 of file coffread.c.
Referenced by coff_alloc_type(), coff_symtab_read(), and read_one_sym().
|
static |
Definition at line 81 of file coffread.c.
Referenced by coff_end_compunit_symtab(), and complete_symtab().
|
static |
Definition at line 80 of file coffread.c.
Referenced by coff_end_compunit_symtab(), and complete_symtab().
|
static |
Definition at line 157 of file coffread.c.
Referenced by coff_symfile_read(), enter_linenos(), and init_lineno().
|
static |
Definition at line 158 of file coffread.c.
Referenced by enter_linenos(), and init_lineno().
|
static |
Definition at line 159 of file coffread.c.
Referenced by enter_linenos(), and init_lineno().
|
static |
Definition at line 119 of file coffread.c.
Referenced by coff_symfile_read(), and read_one_sym().
|
static |
Definition at line 117 of file coffread.c.
Referenced by coff_symfile_read(), enter_linenos(), find_linenos(), and init_lineno().
|
static |
Definition at line 102 of file coffread.c.
Referenced by coff_symfile_read().
|
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 118 of file coffread.c.
Referenced by coff_symfile_read(), and read_one_sym().
|
static |
Definition at line 86 of file coffread.c.
Referenced by coff_symtab_read(), and read_one_sym().
|
static |
Definition at line 87 of file coffread.c.
Referenced by coff_read_enum_type(), coff_read_struct_type(), and coff_symtab_read().
Definition at line 128 of file coffread.c.
Referenced by coff_symtab_read(), patch_opaque_types(), and process_coff_symbol().
|
static |
Definition at line 123 of file coffread.c.
Referenced by coff_read_minsyms(), coff_symfile_read(), coff_symtab_read(), and read_one_sym().
|
static |
Definition at line 161 of file coffread.c.
Referenced by coff_getfilename(), coff_symfile_read(), getsymname(), and init_stringtab().
|
static |
Definition at line 162 of file coffread.c.
Referenced by getsymname(), and init_stringtab().
|
static |
Definition at line 601 of file coffread.c.
Referenced by coff_symfile_read(), enter_linenos(), init_stringtab(), 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 93 of file coffread.c.
Referenced by coff_symfile_read(), and read_one_sym().
|
static |
Definition at line 146 of file coffread.c.
Referenced by coff_lookup_type(), and coff_symtab_read().
|
static |
Definition at line 150 of file coffread.c.
Referenced by coff_lookup_type(), and coff_symtab_read().