GDB (xrefs)
|
#include "defs.h"
#include "bfd.h"
#include <sys/types.h>
#include <fcntl.h>
#include <ctype.h>
#include <sys/stat.h>
#include <algorithm>
#include "coff/internal.h"
#include "libcoff.h"
#include "coff/xcoff.h"
#include "libxcoff.h"
#include "coff/rs6000.h"
#include "xcoffread.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "symfile.h"
#include "objfiles.h"
#include "buildsym-legacy.h"
#include "stabsread.h"
#include "expression.h"
#include "complaints.h"
#include "psymtab.h"
#include "dwarf2/sect-names.h"
#include "dwarf2/public.h"
#include "gdb-stabs.h"
#include "aout/stab_gnu.h"
Go to the source code of this file.
Classes | |
struct | xcoff_symloc |
struct | xcoff_symbol |
struct | xcoff_symfile_info |
struct | xcoff_find_targ_sec_arg |
struct | _inclTable |
Macros | |
#define | INITIAL_STABVECTOR_LENGTH 40 |
#define | XCOFF_DATA(objfile) xcoff_objfile_data_key.get (objfile) |
#define | INITIAL_INCLUDE_TABLE_LENGTH 20 |
#define | complete_symtab(name, start_addr) |
#define | CSECT(PP) ((PP)->x_csect) |
#define | CSECT_LEN(PP) (CSECT(PP).x_scnlen.u64) |
#define | CSECT_ALIGN(PP) (SMTYP_ALIGN(CSECT(PP).x_smtyp)) |
#define | CSECT_SMTYP(PP) (SMTYP_SMTYP(CSECT(PP).x_smtyp)) |
#define | CSECT_SCLAS(PP) (CSECT(PP).x_smclas) |
#define | SYMNAME_ALLOC(NAME, ALLOCED) |
Typedefs | |
typedef struct _inclTable | InclTable |
Functions | |
static void | bf_notfound_complaint (void) |
static void | ef_complaint (int arg1) |
static void | eb_complaint (int arg1) |
static void | xcoff_initial_scan (struct objfile *, symfile_add_flags) |
static void | scan_xcoff_symtab (minimal_symbol_reader &, psymtab_storage *partial_symtabs, struct objfile *) |
static const char * | xcoff_next_symbol_text (struct objfile *) |
static void | record_include_begin (struct xcoff_symbol *) |
static void | enter_line_range (struct subfile *, unsigned, unsigned, CORE_ADDR, CORE_ADDR, unsigned *) |
static void | init_stringtab (bfd *, file_ptr, struct objfile *) |
static void | xcoff_symfile_init (struct objfile *) |
static void | xcoff_new_init (struct objfile *) |
static void | xcoff_symfile_finish (struct objfile *) |
static char * | coff_getfilename (union internal_auxent *, struct objfile *) |
static void | read_symbol (struct internal_syment *, int) |
static int | read_symbol_lineno (int) |
static CORE_ADDR | read_symbol_nvalue (int) |
static struct symbol * | process_xcoff_symbol (struct xcoff_symbol *, struct objfile *) |
static void | read_xcoff_symtab (struct objfile *, legacy_psymtab *) |
static void | record_include_end (struct xcoff_symbol *) |
static void | process_linenos (CORE_ADDR, CORE_ADDR) |
static int | secnum_to_section (int, struct objfile *) |
static asection * | secnum_to_bfd_section (int, struct objfile *) |
static void | find_targ_sec (bfd *, asection *, void *) |
static void | xcoff_secnum_to_sections (int n_scnum, struct objfile *objfile, asection **bfd_sect, int *secnum) |
static void | arrange_linetable (std::vector< linetable_entry > &old_linetable) |
static void | allocate_include_entry (void) |
static void | aix_process_linenos (struct objfile *objfile) |
static void | record_minimal_symbol (minimal_symbol_reader &reader, const char *name, unrelocated_addr address, enum minimal_symbol_type ms_type, int n_scnum, struct objfile *objfile) |
static void | find_linenos (struct bfd *abfd, struct bfd_section *asect, void *vpinfo) |
static void | xcoff_expand_psymtab (legacy_psymtab *pst, struct objfile *objfile) |
static void | xcoff_read_symtab (legacy_psymtab *self, struct objfile *objfile) |
static legacy_psymtab * | xcoff_start_psymtab (psymtab_storage *partial_symtabs, struct objfile *objfile, const char *filename, int first_symnum) |
static legacy_psymtab * | xcoff_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs, legacy_psymtab *pst, const char **include_list, int num_includes, int capping_symbol_number, legacy_psymtab **dependency_list, int number_dependencies, int textlow_not_set) |
static void | swap_sym (struct internal_syment *symbol, union internal_auxent *aux, const char **name, char **raw, unsigned int *symnump, struct objfile *objfile) |
static void | function_outside_compilation_unit_complaint (const char *arg1) |
CORE_ADDR | xcoff_get_toc_offset (struct objfile *objfile) |
static void | xcoff_symfile_offsets (struct objfile *objfile, const section_addr_info &addrs) |
static int | xcoff_get_core_n_import_files (bfd *abfd) |
int | xcoff_get_n_import_files (bfd *abfd) |
void | _initialize_xcoffread () |
Variables | |
static enum language | psymtab_language = language_unknown |
static struct xcoff_symbol | fcn_cs_saved |
static bfd * | symfile_bfd |
static CORE_ADDR | cur_src_end_addr |
static CORE_ADDR | first_object_file_end |
static unsigned | local_symesz |
static const registry< objfile >::key< xcoff_symfile_info > | xcoff_objfile_data_key |
static const struct dwarf2_debug_sections | dwarf2_xcoff_names |
static InclTable * | inclTable |
static int | inclIndx |
static int | inclLength |
static int | inclDepth |
static subfile * | main_subfile |
static legacy_psymtab * | this_symtab_psymtab |
static struct objfile * | this_symtab_objfile |
static int | static_block_base = 0 |
static int | static_block_section = -1 |
static int | symname_alloced = 0 |
static char * | raw_symbol |
static unsigned int | first_fun_line_offset |
static const struct sym_fns | xcoff_sym_fns |
#define complete_symtab | ( | name, | |
start_addr ) |
Definition at line 816 of file xcoffread.c.
Referenced by coff_symtab_read(), and read_xcoff_symtab().
#define CSECT | ( | PP | ) | ((PP)->x_csect) |
#define CSECT_ALIGN | ( | PP | ) | (SMTYP_ALIGN(CSECT(PP).x_smtyp)) |
#define CSECT_LEN | ( | PP | ) | (CSECT(PP).x_scnlen.u64) |
#define CSECT_SCLAS | ( | PP | ) | (CSECT(PP).x_smclas) |
#define CSECT_SMTYP | ( | PP | ) | (SMTYP_SMTYP(CSECT(PP).x_smtyp)) |
#define INITIAL_INCLUDE_TABLE_LENGTH 20 |
Definition at line 496 of file xcoffread.c.
Referenced by allocate_include_entry().
#define INITIAL_STABVECTOR_LENGTH 40 |
Definition at line 119 of file xcoffread.c.
#define SYMNAME_ALLOC | ( | NAME, | |
ALLOCED ) |
Definition at line 1445 of file xcoffread.c.
Referenced by process_xcoff_symbol().
#define XCOFF_DATA | ( | objfile | ) | xcoff_objfile_data_key.get (objfile) |
Definition at line 154 of file xcoffread.c.
Referenced by coff_getfilename(), enter_line_range(), init_stringtab(), process_linenos(), read_symbol(), read_symbol_lineno(), read_xcoff_symtab(), scan_xcoff_symtab(), swap_sym(), xcoff_get_toc_offset(), xcoff_initial_scan(), and xcoff_next_symbol_text().
typedef struct _inclTable InclTable |
void _initialize_xcoffread | ( | ) |
Definition at line 3004 of file xcoffread.c.
References add_symtab_fns(), and xcoff_sym_fns.
|
static |
Definition at line 722 of file xcoffread.c.
References cur_src_end_addr, get_last_source_start_addr(), process_linenos(), and this_symtab_psymtab.
|
static |
Definition at line 548 of file xcoffread.c.
References inclIndx, inclLength, inclTable, INITIAL_INCLUDE_TABLE_LENGTH, main_subfile, and subfile::subfile().
Referenced by record_include_begin(), and record_include_end().
|
static |
Definition at line 419 of file xcoffread.c.
References linetable_entry::is_stmt, linetable_entry::line, new_linetable(), and linetable_entry::set_unrelocated_pc().
Referenced by process_linenos().
|
static |
Definition at line 186 of file xcoffread.c.
References complaint.
Referenced by read_symbol_lineno().
|
static |
Definition at line 1593 of file xcoffread.c.
References XCOFF_DATA.
Referenced by read_xcoff_symtab(), and scan_xcoff_symtab().
|
static |
Definition at line 198 of file xcoffread.c.
References complaint.
Referenced by read_xcoff_symtab().
|
static |
Definition at line 192 of file xcoffread.c.
References complaint.
Referenced by read_xcoff_symtab().
|
static |
Definition at line 744 of file xcoffread.c.
References objfile::arch(), complaint, gdbarch_addr_bits_remove(), objfile::obfd, read_symbol_lineno(), read_symbol_nvalue(), record_line(), SEEK_SET, objfile::text_section_offset(), this_symtab_objfile, and XCOFF_DATA.
Referenced by process_linenos().
|
static |
Definition at line 1714 of file xcoffread.c.
References xcoff_symfile_info::min_lineno_offset, and size.
Referenced by xcoff_initial_scan().
|
static |
Definition at line 263 of file xcoffread.c.
References gdb_bfd_section_index(), SECT_OFF_DATA, and SECT_OFF_TEXT.
Referenced by xcoff_secnum_to_sections().
|
static |
Definition at line 2025 of file xcoffread.c.
References complaint.
Referenced by scan_xcoff_symtab().
|
static |
Definition at line 1817 of file xcoffread.c.
References objfile::objfile_obstack, SEEK_SET, xcoff_symfile_info::strtbl, and XCOFF_DATA.
Referenced by xcoff_initial_scan().
|
static |
Definition at line 577 of file xcoffread.c.
References arrange_linetable(), _inclTable::end, enter_line_range(), _inclTable::funStartLine, get_current_subfile(), get_last_source_file(), inclIndx, inclTable, subfile::line_vector_entries, main_subfile, name, subfile::name, _inclTable::name, subfile::name_for_id, objfile::obfd, pop_subfile(), push_subfile(), legacy_psymtab::read_symtab_private, start_subfile(), _inclTable::subfile, this_symtab_objfile, this_symtab_psymtab, and XCOFF_DATA.
Referenced by aix_process_linenos().
|
static |
Definition at line 1453 of file xcoffread.c.
References add_symbol_to_list(), xcoff_symbol::c_name, xcoff_symbol::c_sclass, xcoff_symbol::c_secnum, xcoff_symbol::c_type, xcoff_symbol::c_value, common_block_end(), common_block_start(), complaint, define_symbol(), fcn_cs_saved, get_file_symbols(), get_global_symbols(), global_stabs, LOC_BLOCK, name, objfile::objfile_obstack, secnum_to_section(), objfile::section_offsets, symbol::set_aclass_index(), symbol::set_domain(), general_symbol_info::set_linkage_name(), general_symbol_info::set_section_index(), symbol::set_type(), symbol::set_value_address(), static_block_base, static_block_section, SYMNAME_ALLOC, symname_alloced, symbol::value_address(), VAR_DOMAIN, and within_function.
Referenced by read_xcoff_symtab().
|
static |
Definition at line 1611 of file xcoffread.c.
References complaint, local_symesz, objfile::obfd, xcoff_symfile_info::symtbl, xcoff_symfile_info::symtbl_num_syms, this_symtab_objfile, and XCOFF_DATA.
Referenced by read_symbol_nvalue(), and read_xcoff_symtab().
|
static |
Definition at line 1645 of file xcoffread.c.
References bf_notfound_complaint(), local_symesz, name, objfile::obfd, xcoff_symfile_info::strtbl, symfile_bfd, this_symtab_objfile, and XCOFF_DATA.
Referenced by enter_line_range().
|
static |
Definition at line 1632 of file xcoffread.c.
References read_symbol().
Referenced by enter_line_range().
|
static |
Definition at line 918 of file xcoffread.c.
References xcoff_symbol::c_name, xcoff_symbol::c_naux, xcoff_symbol::c_sclass, xcoff_symbol::c_secnum, xcoff_symbol::c_symnum, xcoff_symbol::c_type, xcoff_symbol::c_value, coff_getfilename(), complaint, complete_symtab, standard_psymtab::compunit_symtab, CSECT_LEN, CSECT_SCLAS, CSECT_SMTYP, cur_src_end_addr, xcoff_symfile_info::debugsec, deduce_language_from_filename(), define_symbol(), context_stack::depth, eb_complaint(), ef_complaint(), end_compunit_symtab(), end_stabs(), fcn_cs_saved, partial_symtab::filename, finish_block(), first_object_file_end, get_last_source_file(), get_local_symbols(), local_symesz, context_stack::locals, context_stack::name, objfile::obfd, objfile::objfile_obstack, context_stack::old_blocks, outermost_context_p(), pop_context(), process_xcoff_symbol(), push_context(), QUIT, raw_symbol, read_symbol(), legacy_psymtab::read_symtab_private, record_debugformat(), record_include_begin(), record_include_end(), secnum_to_section(), SECT_OFF_TEXT, set_last_source_file(), general_symbol_info::set_section_index(), context_stack::start_addr, start_compunit_symtab(), start_stabs(), static_block_base, static_block_section, xcoff_symfile_info::strtbl, symname_alloced, symnum, xcoff_symfile_info::symtbl, objfile::text_section_offset(), this_symtab_objfile, this_symtab_psymtab, within_function, and XCOFF_DATA.
Referenced by xcoff_expand_psymtab().
|
static |
Definition at line 508 of file xcoffread.c.
References allocate_include_entry(), _inclTable::begin, xcoff_symbol::c_name, xcoff_symbol::c_value, complaint, inclDepth, inclIndx, inclTable, and _inclTable::name.
Referenced by read_xcoff_symtab().
|
static |
Definition at line 529 of file xcoffread.c.
References allocate_include_entry(), xcoff_symbol::c_value, complaint, _inclTable::end, inclDepth, inclIndx, and inclTable.
Referenced by read_xcoff_symtab().
|
static |
Definition at line 845 of file xcoffread.c.
References name, minimal_symbol_reader::record_with_info(), and secnum_to_section().
Referenced by scan_xcoff_symtab().
|
static |
Definition at line 2033 of file xcoffread.c.
References partial_symtab::add_psymbol(), coff_getfilename(), complaint, CSECT_LEN, deduce_language_from_filename(), partial_symtab::filename, first_fun_line_offset, function_outside_compilation_unit_complaint(), GLOBAL, language_c, language_cplus, language_unknown, LOC_BLOCK, LOC_CONST, LOC_STATIC, LOC_TYPEDEF, local_symesz, mst_bss, mst_data, mst_file_bss, mst_file_data, mst_file_text, mst_solib_trampoline, mst_text, name, next_symbol_text, next_symbol_text_func, objfile::obfd, psymtab_language, QUIT, record_minimal_symbol(), secnum_to_bfd_section(), SECT_OFF_DATA, SECT_OFF_TEXT, set_last_source_file(), partial_symtab::set_text_high(), partial_symtab::set_text_low(), STATIC, STRUCT_DOMAIN, swap_sym(), partial_symtab::text_low_valid, partial_symtab::unrelocated_text_high(), VAR_DOMAIN, XCOFF_DATA, xcoff_end_psymtab(), xcoff_next_symbol_text(), and xcoff_start_psymtab().
Referenced by xcoff_initial_scan().
|
static |
Definition at line 322 of file xcoffread.c.
References xcoff_find_targ_sec_arg::bfd_sect, and xcoff_secnum_to_sections().
Referenced by scan_xcoff_symtab().
|
static |
Definition at line 310 of file xcoffread.c.
References xcoff_secnum_to_sections().
Referenced by process_xcoff_symbol(), read_xcoff_symtab(), and record_minimal_symbol().
|
static |
Definition at line 1978 of file xcoffread.c.
References name, objfile::obfd, objfile::objfile_obstack, and XCOFF_DATA.
Referenced by scan_xcoff_symtab().
|
static |
Definition at line 1907 of file xcoffread.c.
References psymtab_storage::allocate_dependencies(), partial_symtab::dependencies, psymtab_storage::discard_psymtab(), partial_symtab::empty(), partial_symtab::end(), first_fun_line_offset, legacy_psymtab::legacy_expand_psymtab, legacy_psymtab::legacy_read_symtab, partial_symtab::number_of_dependencies, objfile::objfile_obstack, objfile::per_bfd, and legacy_psymtab::read_symtab_private.
Referenced by scan_xcoff_symtab().
|
static |
Definition at line 1738 of file xcoffread.c.
References partial_symtab::expand_dependencies(), legacy_psymtab::read_symtab_private, read_xcoff_symtab(), standard_psymtab::readin, and stabsread_init().
Referenced by xcoff_start_psymtab().
|
static |
Definition at line 2944 of file xcoffread.c.
Referenced by xcoff_get_n_import_files().
int xcoff_get_n_import_files | ( | bfd * | abfd | ) |
Definition at line 2977 of file xcoffread.c.
References xcoff_get_core_n_import_files().
Referenced by rs6000_aix_osabi_sniffer(), and rs6000_lynx178_osabi_sniffer().
CORE_ADDR xcoff_get_toc_offset | ( | struct objfile * | objfile | ) |
Definition at line 2767 of file xcoffread.c.
References XCOFF_DATA.
Referenced by solib_aix_get_toc_value().
|
static |
Definition at line 2784 of file xcoffread.c.
References dwarf2_has_info(), dwarf2_initialize_objfile(), dwarf2_xcoff_names, find_linenos(), objfile::flags, psymbol_functions::get_partial_symtabs(), init_stringtab(), minimal_symbol_reader::install(), name, objfile::obfd, OBJF_READNEVER, objfile_name(), objfile::objfile_obstack, objfile::qf, scan_xcoff_symtab(), SEEK_SET, size, symfile_bfd, and XCOFF_DATA.
|
static |
Definition at line 1779 of file xcoffread.c.
References stabsread_new_init().
|
static |
Definition at line 880 of file xcoffread.c.
References complaint, objfile::obfd, raw_symbol, symnum, this_symtab_objfile, and XCOFF_DATA.
Referenced by scan_xcoff_symtab(), and xcoff_read_symtab().
|
static |
Definition at line 1761 of file xcoffread.c.
References legacy_psymtab::expand_psymtab(), next_symbol_text_func, partial_symtab::number_of_dependencies, legacy_psymtab::read_symtab_private, standard_psymtab::readin, scan_file_globals(), and xcoff_next_symbol_text().
Referenced by xcoff_start_psymtab().
|
static |
Definition at line 291 of file xcoffread.c.
References xcoff_find_targ_sec_arg::bfd_sect, find_targ_sec(), objfile::obfd, xcoff_find_targ_sec_arg::objfile, and SECT_OFF_TEXT.
Referenced by secnum_to_bfd_section(), and secnum_to_section().
|
static |
Definition at line 1877 of file xcoffread.c.
References deduce_language_from_filename(), xcoff_symloc::first_symnum, legacy_psymtab::legacy_expand_psymtab, legacy_psymtab::legacy_read_symtab, objfile::objfile_obstack, objfile::per_bfd, psymtab_language, legacy_psymtab::read_symtab_private, xcoff_expand_psymtab(), and xcoff_read_symtab().
Referenced by scan_xcoff_symtab().
|
static |
Definition at line 1803 of file xcoffread.c.
References inclDepth, inclIndx, inclLength, inclTable, main_subfile, and xfree().
|
static |
Definition at line 1791 of file xcoffread.c.
References xcoff_objfile_data_key.
|
static |
Definition at line 2879 of file xcoffread.c.
References default_symfile_offsets(), objfile::sect_index_bss, objfile::sect_index_data, objfile::sect_index_rodata, objfile::sect_index_text, objfile::section_offsets, objfile::sections_start, and obj_section::the_bfd_section.
|
static |
Definition at line 111 of file xcoffread.c.
Referenced by aix_process_linenos(), and read_xcoff_symtab().
|
static |
Definition at line 159 of file xcoffread.c.
Referenced by xcoff_initial_scan().
|
static |
Definition at line 102 of file xcoffread.c.
Referenced by coff_symtab_read(), process_xcoff_symbol(), and read_xcoff_symtab().
|
static |
Definition at line 1867 of file xcoffread.c.
Referenced by scan_xcoff_symtab(), and xcoff_end_psymtab().
|
static |
Definition at line 115 of file xcoffread.c.
Referenced by read_xcoff_symtab().
|
static |
Definition at line 500 of file xcoffread.c.
Referenced by record_include_begin(), record_include_end(), and xcoff_symfile_finish().
|
static |
Definition at line 498 of file xcoffread.c.
Referenced by allocate_include_entry(), process_linenos(), record_include_begin(), record_include_end(), and xcoff_symfile_finish().
|
static |
Definition at line 499 of file xcoffread.c.
Referenced by allocate_include_entry(), and xcoff_symfile_finish().
|
static |
Definition at line 497 of file xcoffread.c.
Referenced by allocate_include_entry(), process_linenos(), record_include_begin(), record_include_end(), and xcoff_symfile_finish().
|
static |
Definition at line 125 of file xcoffread.c.
Referenced by read_symbol(), read_symbol_lineno(), read_xcoff_symtab(), and scan_xcoff_symtab().
|
static |
Definition at line 503 of file xcoffread.c.
Referenced by allocate_include_entry(), process_linenos(), and xcoff_symfile_finish().
|
static |
Definition at line 84 of file xcoffread.c.
Referenced by scan_xcoff_symtab(), and xcoff_start_psymtab().
|
static |
Definition at line 874 of file xcoffread.c.
Referenced by read_xcoff_symtab(), and xcoff_next_symbol_text().
|
static |
Definition at line 862 of file xcoffread.c.
Referenced by process_xcoff_symbol(), and read_xcoff_symtab().
|
static |
Definition at line 866 of file xcoffread.c.
Referenced by process_xcoff_symbol(), and read_xcoff_symtab().
|
static |
Definition at line 104 of file xcoffread.c.
Referenced by read_symbol_lineno(), and xcoff_initial_scan().
|
static |
Definition at line 870 of file xcoffread.c.
Referenced by process_xcoff_symbol(), and read_xcoff_symtab().
|
static |
Definition at line 571 of file xcoffread.c.
Referenced by enter_line_range(), process_linenos(), read_symbol(), read_symbol_lineno(), read_xcoff_symtab(), and xcoff_next_symbol_text().
|
static |
Definition at line 568 of file xcoffread.c.
Referenced by aix_process_linenos(), process_linenos(), and read_xcoff_symtab().
|
static |
Definition at line 150 of file xcoffread.c.
Referenced by xcoff_symfile_init().
|
static |
Definition at line 2918 of file xcoffread.c.
Referenced by _initialize_xcoffread().