GDB (xrefs)

Classes | Macros | Functions | Variables
/tmp/gdb-8.1/gdb/dbxread.c File Reference
`#include "defs.h"`
`#include "gdb_obstack.h"`
`#include <sys/stat.h>`
`#include "symtab.h"`
`#include "breakpoint.h"`
`#include "target.h"`
`#include "gdbcore.h"`
`#include "libaout.h"`
`#include "filenames.h"`
`#include "objfiles.h"`
`#include "buildsym.h"`
`#include "stabsread.h"`
`#include "gdb-stabs.h"`
`#include "demangle.h"`
`#include "complaints.h"`
`#include "cp-abi.h"`
`#include "cp-support.h"`
`#include "psympriv.h"`
`#include "block.h"`
`#include "aout/aout64.h"`
`#include "aout/stab_gnu.h"`

Go to the source code of this file.

## Classes
struct | symloc
struct | header_file_location

## Macros
#define | LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
#define | LDSYMLEN(p) (((struct symloc *)((p)->read_symtab_private))->ldsymlen)
#define | SYMLOC(p) ((struct symloc *)((p)->read_symtab_private))
#define | SYMBOL_SIZE(p) (SYMLOC(p)->symbol_size)
#define | SYMBOL_OFFSET(p) (SYMLOC(p)->symbol_offset)
#define | STRING_OFFSET(p) (SYMLOC(p)->string_offset)
#define | FILE_STRING_OFFSET(p) (SYMLOC(p)->file_string_offset)
#define | PST_LANGUAGE(p) (SYMLOC(p)->pst_language)
#define | DBX_STRINGTAB_SIZE_SIZE sizeof(long) /* FIXME */
#define | STRING_TABLE_OFFSET (sym_bfd->origin + obj_str_filepos (sym_bfd))
#define | SYMBOL_TABLE_OFFSET (sym_bfd->origin + obj_sym_filepos (sym_bfd))
#define | INTERNALIZE_SYMBOL(intern, extern, abfd)
#define | COFF_STABS_SYMBOL_SIZE 12 /* XXX FIXME XXX */
#define | ELF_STABS_SYMBOL_SIZE 12 /* XXX FIXME XXX */

## Functions
static void | unknown_symtype_complaint (const char *arg1)
static void | lbrac_mismatch_complaint (int arg1)
static void | repeated_header_complaint (const char *arg1, int arg2)
static void | find_text_range (bfd *sym_bfd, struct objfile *objfile)
static void | read_ofile_symtab (struct objfile *, struct partial_symtab *)
static void | dbx_read_symtab (struct partial_symtab *self, struct objfile *objfile)
static void | dbx_psymtab_to_symtab_1 (struct objfile *, struct partial_symtab *)
static void | read_dbx_symtab (minimal_symbol_reader &, struct objfile *)
static void | free_bincl_list (struct objfile *)
static struct partial_symtab * | find_corresponding_bincl_psymtab (const char *, int)
static void | add_bincl_to_list (struct partial_symtab *, const char *, int)
static void | init_bincl_list (int, struct objfile *)
static const char * | dbx_next_symbol_text (struct objfile *)
static void | fill_symbuf (bfd *)
static void | dbx_symfile_init (struct objfile *)
static void | dbx_new_init (struct objfile *)
static void | dbx_symfile_read (struct objfile *, symfile_add_flags)
static void | dbx_symfile_finish (struct objfile *)
static void | record_minimal_symbol (minimal_symbol_reader &, const char *, CORE_ADDR, int, struct objfile *)
static void | add_new_header_file (const char *, int)
static void | add_old_header_file (const char *, int)
static void | add_this_object_header_file (int)
static struct partial_symtab * | start_psymtab (struct objfile *, const char *, CORE_ADDR, int, std::vector< partial_symbol *> &, std::vector< partial_symbol *> &)
void | free_header_files (void)
void | init_header_files (void)
static void | dbx_free_symfile_info (struct objfile *objfile, void *arg)
static void | stabs_seek (int sym_offset)
static void | do_free_bincl_list_cleanup (void *objfile)
static struct cleanup * | make_cleanup_free_bincl_list (struct objfile *objfile)
static const char * | set_namestring (struct objfile *objfile, const struct internal_nlist *nlist)
static CORE_ADDR | find_stab_function_addr (const char *namestring, const char *filename, struct objfile *objfile)
static void | function_outside_compilation_unit_complaint (const char *arg1)
struct partial_symtab * | dbx_end_psymtab (struct objfile *objfile, struct partial_symtab *pst, const char **include_list, int num_includes, int capping_symbol_offset, CORE_ADDR capping_text, struct partial_symtab **dependency_list, int number_dependencies, int textlow_not_set)
static void | cp_set_block_scope (const struct symbol *symbol, struct block *block, struct obstack *obstack)
void | process_one_symbol (int type, int desc, CORE_ADDR valu, const char *name, const struct section_offsets *section_offsets, struct objfile *objfile, enum language language)
void | coffstab_build_psymtabs (struct objfile *objfile, CORE_ADDR textaddr, unsigned int textsize, struct stab_section_list *stabsects, file_ptr stabstroffset, unsigned int stabstrsize)
void | elfstab_build_psymtabs (struct objfile *objfile, asection *stabsect, file_ptr stabstroffset, unsigned int stabstrsize)
void | stabsect_build_psymtabs (struct objfile *objfile, char *stab_name, char *stabstr_name, char *text_name)
void | _initialize_dbxread (void)

## Variables
const struct objfile_data * | dbx_objfile_data_key
static struct objfile * | dbxread_objfile
static enum language | psymtab_language = language_unknown
static bfd * | symfile_bfd
static unsigned | symbol_size
static unsigned | symbol_table_offset
static unsigned | string_table_offset
static unsigned int | file_string_table_offset
static unsigned int | next_file_string_table_offset
static int | symfile_relocatable = 0
static CORE_ADDR | lowest_text_address
static int | has_line_numbers
static struct header_file_location * | bincl_list
static struct header_file_location * | next_bincl
static int | bincls_allocated
static struct external_nlist | symbuf [4096]
static int | symbuf_idx
static int | symbuf_end
static const char * | last_function_name
static char * | stringtab_global
static struct stab_section_list * | symbuf_sections
static unsigned int | symbuf_left
static unsigned int | symbuf_read
static bfd_byte * | stabs_data
static const struct sym_fns | aout_sym_fns

## Macro Definition Documentation

## ◆ COFF_STABS_SYMBOL_SIZE

#define COFF_STABS_SYMBOL_SIZE 12 /* XXX FIXME XXX */

Referenced by coffstab_build_psymtabs().

## ◆ DBX_STRINGTAB_SIZE_SIZE

#define DBX_STRINGTAB_SIZE_SIZE sizeof(long) /* FIXME */

Definition at line 582 of file dbxread.c.

Referenced by dbx_symfile_init().

## ◆ ELF_STABS_SYMBOL_SIZE

#define ELF_STABS_SYMBOL_SIZE 12 /* XXX FIXME XXX */

Referenced by elfstab_build_psymtabs().

## ◆ FILE_STRING_OFFSET

#define FILE_STRING_OFFSET | ( |  | p | ) | (SYMLOC(p)->file_string_offset)

Definition at line 103 of file dbxread.c.

Referenced by dbx_psymtab_to_symtab_1(), and start_psymtab().

## ◆ INTERNALIZE_SYMBOL

#define INTERNALIZE_SYMBOL | ( |  | intern,
|  |  | extern,
|  |  | abfd
| ) |  |

Value:
{ \
(intern).n_strx = bfd_h_get_32 (abfd, (extern)->e_strx); \
(intern).n_type = bfd_h_get_8 (abfd, (extern)->e_type); \
(intern).n_other = 0; \
(intern).n_desc = bfd_h_get_16 (abfd, (extern)->e_desc); \
if (bfd_get_sign_extend_vma (abfd)) \
(intern).n_value = bfd_h_get_signed_32 (abfd, (extern)->e_value); \
else \
(intern).n_value = bfd_h_get_32 (abfd, (extern)->e_value); \
}

Definition at line 822 of file dbxread.c.

Referenced by dbx_next_symbol_text(), read_dbx_symtab(), and read_ofile_symtab().

## ◆ LDSYMLEN

#define LDSYMLEN | ( |  | p | ) | (((struct symloc *)((p)->read_symtab_private))->ldsymlen)

Definition at line 98 of file dbxread.c.

Referenced by dbx_end_psymtab(), dbx_psymtab_to_symtab_1(), dbx_read_symtab(), and read_ofile_symtab().

## ◆ LDSYMOFF

#define LDSYMOFF | ( |  | p | ) | (((struct symloc *)((p)->read_symtab_private))->ldsymoff)

Definition at line 97 of file dbxread.c.

Referenced by dbx_end_psymtab(), read_ofile_symtab(), and start_psymtab().

## ◆ PST_LANGUAGE

#define PST_LANGUAGE | ( |  | p | ) | (SYMLOC(p)->pst_language)

Definition at line 104 of file dbxread.c.

Referenced by read_ofile_symtab(), and start_psymtab().

## ◆ STRING_OFFSET

#define STRING_OFFSET | ( |  | p | ) | (SYMLOC(p)->string_offset)

Definition at line 102 of file dbxread.c.

Referenced by start_psymtab().

## ◆ STRING_TABLE_OFFSET

#define STRING_TABLE_OFFSET (sym_bfd->origin + obj_str_filepos (sym_bfd))

Referenced by dbx_symfile_init().

## ◆ SYMBOL_OFFSET

#define SYMBOL_OFFSET | ( |  | p | ) | (SYMLOC(p)->symbol_offset)

Definition at line 101 of file dbxread.c.

Referenced by dbx_psymtab_to_symtab_1(), and start_psymtab().

## ◆ SYMBOL_SIZE

#define SYMBOL_SIZE | ( |  | p | ) | (SYMLOC(p)->symbol_size)

Definition at line 100 of file dbxread.c.

Referenced by dbx_psymtab_to_symtab_1(), and start_psymtab().

## ◆ SYMBOL_TABLE_OFFSET

#define SYMBOL_TABLE_OFFSET (sym_bfd->origin + obj_sym_filepos (sym_bfd))

Referenced by dbx_symfile_init().

## ◆ SYMLOC

#define SYMLOC | ( |  | p | ) | ((struct symloc *)((p)->read_symtab_private))

Definition at line 99 of file dbxread.c.

## Function Documentation

## ◆ _initialize_dbxread()

void _initialize_dbxread | ( | void |  | ) |

Definition at line 3314 of file dbxread.c.

References add_symtab_fns(), aout_sym_fns, dbx_free_symfile_info(), and dbx_objfile_data_key.

## ◆ add_bincl_to_list()

static void add_bincl_to_list | ( | struct partial_symtab * | pst,
|  | const char * | name,
|  | int | instance
| ) |  |
| static

Definition at line 874 of file dbxread.c.

References bincl_list, bincls_allocated, header_file_location::instance, name, header_file_location::name, next_bincl, offset, header_file_location::pst, and xrealloc().

Referenced by read_dbx_symtab().

## ◆ add_new_header_file()

static void add_new_header_file | ( | const char * | name,
|  | int | instance
| ) |  |
| static

Definition at line 369 of file dbxread.c.

References add_this_object_header_file(), dbxread_objfile, HEADER_FILES, header_file::instance, header_file::length, N_ALLOCATED_HEADER_FILES, N_HEADER_FILES, name, header_file::name, header_file::vector, XCNEWVEC, xmalloc(), and xrealloc().

Referenced by process_one_symbol().

## ◆ add_old_header_file()

static void add_old_header_file | ( | const char * | name,
|  | int | instance
| ) |  |
| static

Definition at line 343 of file dbxread.c.

References add_this_object_header_file(), dbxread_objfile, HEADER_FILES, header_file::instance, N_HEADER_FILES, name, repeated_header_complaint(), and symnum.

Referenced by process_one_symbol().

## ◆ add_this_object_header_file()

static void add_this_object_header_file | ( | int | i | ) |
| static

Definition at line 324 of file dbxread.c.

References n_allocated_this_object_header_files, n_this_object_header_files, this_object_header_files, and xrealloc().

Referenced by add_new_header_file(), and add_old_header_file().

## ◆ coffstab_build_psymtabs()

void coffstab_build_psymtabs | ( | struct objfile * | objfile,
|  | CORE_ADDR | textaddr,
|  | unsigned int | textsize,
|  | struct stab_section_list * | stabsects,
|  | file_ptr | stabstroffset,
|  | unsigned int | stabstrsize
| ) |  |

Definition at line 3066 of file dbxread.c.

References _, buildsym_new_init(), COFF_STABS_SYMBOL_SIZE, DBX_STRINGTAB, DBX_STRINGTAB_SIZE, DBX_SYMBOL_SIZE, DBX_SYMCOUNT, dbx_symfile_read(), DBX_SYMTAB_OFFSET, DBX_TEXT_ADDR, DBX_TEXT_SIZE, error(), free_header_files(), init_header_files(), name, stab_section_list::next, objfile::obfd, OBJSTAT, perror_with_name(), processing_acc_compilation, stab_section_list::section, SEEK_SET, stabsread_new_init(), symbuf_left, symbuf_read, and symbuf_sections.

Referenced by coff_symfile_read().

## ◆ cp_set_block_scope()

static void cp_set_block_scope | ( | const struct symbol * | symbol,
|  | struct block * | block,
|  | struct obstack * | obstack
| ) |  |
| static

Definition at line 2461 of file dbxread.c.

References block_set_scope(), cp_entire_prefix_len(), name, and SYMBOL_DEMANGLED_NAME.

Referenced by process_one_symbol().

## ◆ dbx_end_psymtab()

struct partial_symtab* dbx_end_psymtab | ( | struct objfile * | objfile,
|  | struct partial_symtab * | pst,
|  | const char ** | include_list,
|  | int | num_includes,
|  | int | capping_symbol_offset,
|  | CORE_ADDR | capping_text,
|  | struct partial_symtab ** | dependency_list,
|  | int | number_dependencies,
|  | int | textlow_not_set
| ) |  |

Definition at line 2028 of file dbxread.c.

References ALL_OBJFILE_PSYMTABS, allocate_psymtab(), BMSYMBOL_VALUE_ADDRESS, partial_symtab::compunit_symtab, partial_symtab::dependencies, discard_psymtab(), end_psymtab_common(), partial_symtab::filename, gdbarch_sofun_address_maybe_missing(), get_objfile_arch(), partial_symtab::globals_offset, has_line_numbers, last_function_name, LDSYMLEN, LDSYMOFF, lookup_minimal_symbol(), bound_minimal_symbol::minsym, MSYMBOL_SIZE, partial_symtab::n_global_syms, partial_symtab::n_static_syms, partial_symtab::number_of_dependencies, partial_symtab::read_symtab, partial_symtab::read_symtab_private, partial_symtab::readin, partial_symtab::statics_offset, partial_symtab::texthigh, and partial_symtab::textlow.

Referenced by parse_partial_symbols(), and read_dbx_symtab().

## ◆ dbx_free_symfile_info()

static void dbx_free_symfile_info | ( | struct objfile * | objfile,
|  | void * | arg
| ) |  |
| static

Definition at line 706 of file dbxread.c.

References dbx_symfile_info::header_files, dbx_symfile_info::n_header_files, name, header_file::vector, and xfree().

Referenced by _initialize_dbxread().

## ◆ dbx_new_init()

static void dbx_new_init | ( | struct objfile * | ignore | ) |
| static

Definition at line 561 of file dbxread.c.

References buildsym_new_init(), init_header_files(), and stabsread_new_init().

## ◆ dbx_next_symbol_text()

static const char * dbx_next_symbol_text | ( | struct objfile * | objfile | ) |
| static

Definition at line 844 of file dbxread.c.

References file_string_table_offset, fill_symbuf(), INTERNALIZE_SYMBOL, OBJSTAT, stringtab_global, symbuf, symbuf_end, symbuf_idx, symfile_bfd, and symnum.

Referenced by dbx_read_symtab(), and read_dbx_symtab().

## ◆ dbx_psymtab_to_symtab_1()

static void dbx_psymtab_to_symtab_1 | ( | struct objfile * | objfile,
|  | struct partial_symtab * | pst
| ) |  |
| static

Definition at line 2186 of file dbxread.c.

References buildsym_init(), partial_symtab::dependencies, FILE_STRING_OFFSET, file_string_table_offset, partial_symtab::filename, fprintf_unfiltered(), fputs_filtered(), gdb_flush(), gdb_stderr, gdb_stdout, info_verbose, LDSYMLEN, partial_symtab::number_of_dependencies, objfile::obfd, printf_filtered(), read_ofile_symtab(), partial_symtab::readin, SEEK_SET, stabsread_init(), SYMBOL_OFFSET, SYMBOL_SIZE, symbol_size, and wrap_here().

Referenced by dbx_read_symtab().

## ◆ dbx_read_symtab()

static void dbx_read_symtab | ( | struct partial_symtab * | self,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 2237 of file dbxread.c.

References dbx_next_symbol_text(), dbx_psymtab_to_symtab_1(), DBX_STAB_SECTION, do_cleanups(), fprintf_unfiltered(), free_current_contents(), gdb_flush(), gdb_stderr, gdb_stdout, info_verbose, LDSYMLEN, make_cleanup(), next_symbol_text_func, null_cleanup(), printf_filtered(), scan_file_globals(), stabs_data, and symfile_relocate_debug_section().

Referenced by start_psymtab().

## ◆ dbx_symfile_finish()

static void dbx_symfile_finish | ( | struct objfile * | objfile | ) |
| static

Definition at line 700 of file dbxread.c.

References free_header_files().

## ◆ dbx_symfile_init()

static void dbx_symfile_init | ( | struct objfile * | objfile | ) |
| static

Definition at line 585 of file dbxread.c.

References _, DBX_BSS_SECTION, DBX_DATA_SECTION, dbx_objfile_data_key, DBX_STRINGTAB, DBX_STRINGTAB_SIZE, DBX_STRINGTAB_SIZE_SIZE, DBX_SYMBOL_SIZE, DBX_SYMCOUNT, DBX_SYMTAB_OFFSET, DBX_TEXT_ADDR, DBX_TEXT_SECTION, DBX_TEXT_SIZE, error(), memset(), name, objfile::obfd, OBJSTAT, perror_with_name(), SEEK_SET, STRING_TABLE_OFFSET, SYMBOL_TABLE_OFFSET, and XCNEW.

## ◆ dbx_symfile_read()

static void dbx_symfile_read | ( | struct objfile * | objfile,
|  | symfile_add_flags | symfile_flags
| ) |  |
| static

Definition at line 516 of file dbxread.c.

References DBX_SYMBOL_SIZE, DBX_SYMCOUNT, DBX_SYMTAB_OFFSET, free_pending_blocks(), objfile::global_psymbols, init_psymbol_list(), minimal_symbol_reader::install(), objfile::obfd, objfile_name(), perror_with_name(), read_dbx_symtab(), SEEK_SET, objfile::static_psymbols, symbol_size, symbol_table_offset, and symfile_relocatable.

Referenced by coffstab_build_psymtabs(), elfstab_build_psymtabs(), and stabsect_build_psymtabs().

## ◆ do_free_bincl_list_cleanup()

static void do_free_bincl_list_cleanup | ( | void * | objfile | ) |
| static

Definition at line 919 of file dbxread.c.

References free_bincl_list().

Referenced by make_cleanup_free_bincl_list().

## ◆ elfstab_build_psymtabs()

void elfstab_build_psymtabs | ( | struct objfile * | objfile,
|  | asection * | stabsect,
|  | file_ptr | stabstroffset,
|  | unsigned int | stabstrsize
| ) |  |

Definition at line 3152 of file dbxread.c.

References _, buildsym_new_init(), DBX_STAB_SECTION, DBX_STRINGTAB, DBX_STRINGTAB_SIZE, DBX_SYMBOL_SIZE, DBX_SYMCOUNT, dbx_symfile_read(), DBX_SYMTAB_OFFSET, do_cleanups(), ELF_STABS_SYMBOL_SIZE, error(), find_text_range(), free_current_contents(), free_header_files(), init_header_files(), make_cleanup(), name, null_cleanup(), objfile::obfd, OBJSTAT, perror_with_name(), processing_acc_compilation, SEEK_SET, stabs_data, stabsread_new_init(), symbuf_left, symbuf_read, and symfile_relocate_debug_section().

Referenced by elf_symfile_read().

## ◆ fill_symbuf()

static void fill_symbuf | ( | bfd * | sym_bfd | ) |
| static

Definition at line 764 of file dbxread.c.

References _, error(), stab_section_list::next, perror_with_name(), stab_section_list::section, SEEK_SET, stabs_data, symbol_size, symbol_table_offset, symbuf, symbuf_end, symbuf_idx, symbuf_left, symbuf_read, and symbuf_sections.

Referenced by dbx_next_symbol_text(), read_dbx_symtab(), and read_ofile_symtab().

## ◆ find_corresponding_bincl_psymtab()

static struct partial_symtab * find_corresponding_bincl_psymtab | ( | const char * | name,
|  | int | instance
| ) |  |
| static

Definition at line 896 of file dbxread.c.

References bincl_list, header_file_location::instance, name, header_file_location::name, next_bincl, header_file_location::pst, repeated_header_complaint(), and symnum.

Referenced by read_dbx_symtab().

## ◆ find_stab_function_addr()

static CORE_ADDR find_stab_function_addr | ( | const char * | namestring,
|  | const char * | filename,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 955 of file dbxread.c.

References BMSYMBOL_VALUE_ADDRESS, lookup_minimal_symbol(), and bound_minimal_symbol::minsym.

Referenced by process_one_symbol(), and read_dbx_symtab().

## ◆ find_text_range()

static void find_text_range | ( | bfd * | sym_bfd,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 196 of file dbxread.c.

References _, DBX_TEXT_ADDR, DBX_TEXT_SIZE, and error().

Referenced by elfstab_build_psymtabs().

## ◆ free_bincl_list()

static void free_bincl_list | ( | struct objfile * | objfile | ) |
| static

Definition at line 912 of file dbxread.c.

References bincl_list, bincls_allocated, and xfree().

Referenced by do_free_bincl_list_cleanup().

## ◆ free_header_files()

void free_header_files | ( | void |  | ) |

Definition at line 301 of file dbxread.c.

References n_allocated_this_object_header_files, this_object_header_files, and xfree().

Referenced by coffstab_build_psymtabs(), dbx_symfile_finish(), elfstab_build_psymtabs(), mdebug_build_psymtabs(), and stabsect_build_psymtabs().

## ◆ function_outside_compilation_unit_complaint()

static void function_outside_compilation_unit_complaint | ( | const char * | arg1 | ) |
| static

Definition at line 1000 of file dbxread.c.

References _, complaint, and symfile_complaints.

Referenced by read_dbx_symtab().

## ◆ init_bincl_list()

static void init_bincl_list | ( | int | number,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 864 of file dbxread.c.

References bincl_list, bincls_allocated, next_bincl, and XNEWVEC.

Referenced by read_dbx_symtab().

## ◆ init_header_files()

void init_header_files | ( | void |  | ) |

Definition at line 314 of file dbxread.c.

References n_allocated_this_object_header_files, this_object_header_files, and XNEWVEC.

Referenced by coffstab_build_psymtabs(), dbx_new_init(), elfstab_build_psymtabs(), mdebug_build_psymtabs(), and stabsect_build_psymtabs().

## ◆ lbrac_mismatch_complaint()

static void lbrac_mismatch_complaint | ( | int | arg1 | ) |
| static

Definition at line 171 of file dbxread.c.

References _, complaint, and symfile_complaints.

Referenced by process_one_symbol().

## ◆ make_cleanup_free_bincl_list()

static struct cleanup* make_cleanup_free_bincl_list | ( | struct objfile * | objfile | ) |
| static

Definition at line 925 of file dbxread.c.

References do_free_bincl_list_cleanup(), and make_cleanup().

Referenced by read_dbx_symtab().

## ◆ process_one_symbol()

void process_one_symbol | ( | int | type,
|  | int | desc,
|  | CORE_ADDR | valu,
|  | const char * | name,
|  | const struct section_offsets * | section_offsets,
|  | struct objfile * | objfile,
|  | enum language language |
| ) |  |

Definition at line 2502 of file dbxread.c.

References _, add_new_header_file(), add_old_header_file(), ANOFFSET, common_block_end(), common_block_start(), complaint, context_stack_depth, cp_set_block_scope(), current_subfile, define_symbol(), context_stack::depth, end_stabs(), end_symtab(), find_stab_function_addr(), finish_block(), GCC2_COMPILED_FLAG_SYMBOL, gdb_assert, gdbarch_addr_bits_remove(), gdbarch_sofun_address_maybe_missing(), get_last_source_file(), get_objfile_arch(), hex_string(), internal_error(), language_cplus, language_unknown, lbrac_mismatch_complaint(), local_symbols, context_stack::locals, name, context_stack::name, context_stack::old_blocks, patch_subfile_names(), pop_context(), pop_subfile(), previous_stab_code, processing_gcc_compilation, push_context(), push_subfile(), record_debugformat(), record_line, ref_add(), ref_search(), SECT_OFF_BSS, SECT_OFF_DATA, SECT_OFF_RODATA, SECT_OFF_TEXT, set_objfile_main_name(), context_stack::start_addr, start_stabs(), start_subfile(), start_symtab(), SYMBOL_LANGUAGE, symbol_reference_defined(), symfile_complaints, symfile_relocatable, symnum, type, unknown_symtype_complaint(), and within_function.

Referenced by psymtab_to_symtab_1(), and read_ofile_symtab().

## ◆ read_dbx_symtab()

static void read_dbx_symtab | ( | minimal_symbol_reader & | reader,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 1012 of file dbxread.c.

References _, add_bincl_to_list(), add_psymbol_to_list(), ANOFFSET, complaint, cp_canonicalize_string(), dbx_end_psymtab(), dbx_next_symbol_text(), DBX_STRINGTAB, DBX_SYMCOUNT, DBX_TEXT_ADDR, DBX_TEXT_SIZE, deduce_language_from_filename(), partial_symtab::dirname, do_cleanups(), error(), file_string_table_offset, partial_symtab::filename, fill_symbuf(), find_corresponding_bincl_psymtab(), find_stab_function_addr(), fprintf_unfiltered(), function_outside_compilation_unit_complaint(), gdb_stderr, gdbarch_sofun_address_maybe_missing(), gdbarch_static_transform_name(), gdbarch_static_transform_name_p(), get_objfile_arch(), objfile::global_psymbols, has_line_numbers, hex_string(), init_bincl_list(), INTERNALIZE_SYMBOL, language_c, language_cplus, language_unknown, last_function_name, LOC_BLOCK, LOC_CONST, LOC_STATIC, LOC_TYPEDEF, lowest_text_address, make_cleanup_free_bincl_list(), name, next_file_string_table_offset, next_symbol_text, next_symbol_text_func, objfile::obfd, OBJSTAT, processing_acc_compilation, psymtab_language, QUIT, record_minimal_symbol(), objfile::sect_index_data, SECT_OFF_BSS, SECT_OFF_RODATA, SECT_OFF_TEXT, objfile::section_offsets, set_last_source_file(), set_namestring(), start_psymtab(), objfile::static_psymbols, string, stringtab_global, STRUCT_DOMAIN, symbol_size, symbuf, symbuf_end, symbuf_idx, symfile_bfd, symfile_complaints, symnum, partial_symtab::texthigh, partial_symtab::textlow, unknown_symtype_complaint(), VAR_DOMAIN, xfree(), and xmalloc().

Referenced by dbx_symfile_read().

## ◆ read_ofile_symtab()

static void read_ofile_symtab | ( | struct objfile * | objfile,
|  | struct partial_symtab * | pst
| ) |  |
| static

Definition at line 2291 of file dbxread.c.

References _, partial_symtab::compunit_symtab, DBX_STRINGTAB, dbxread_objfile, end_stabs(), end_symtab(), error(), fill_symbuf(), GCC2_COMPILED_FLAG_SYMBOL, GCC_COMPILED_FLAG_SYMBOL, INTERNALIZE_SYMBOL, last_source_start_addr, LDSYMLEN, LDSYMOFF, objfile::obfd, OBJSTAT, process_one_symbol(), processing_acc_compilation, processing_gcc_compilation, PST_LANGUAGE, QUIT, SECT_OFF_TEXT, objfile::section_offsets, set_last_source_file(), set_namestring(), stabs_seek(), startswith(), stringtab_global, symbol_size, symbuf, symbuf_end, symbuf_idx, symbuf_left, symbuf_read, symfile_bfd, symnum, partial_symtab::texthigh, partial_symtab::textlow, and type.

Referenced by dbx_psymtab_to_symtab_1().

## ◆ record_minimal_symbol()

static void record_minimal_symbol | ( | minimal_symbol_reader & | reader,
|  | const char * | name,
|  | CORE_ADDR | address,
|  | int | type,
|  | struct objfile * | objfile
| ) |  |
| static

Definition at line 427 of file dbxread.c.

References is_vtable_name(), lowest_text_address, mst_abs, mst_bss, mst_data, mst_file_bss, mst_file_data, mst_file_text, mst_text, mst_unknown, name, objfile::obfd, minimal_symbol_reader::record_with_info(), SECT_OFF_BSS, SECT_OFF_DATA, and SECT_OFF_TEXT.

Referenced by read_dbx_symtab().

## ◆ repeated_header_complaint()

static void repeated_header_complaint | ( | const char * | arg1,
|  | int | arg2
| ) |  |
| static

Definition at line 178 of file dbxread.c.

References _, complaint, and symfile_complaints.

Referenced by add_old_header_file(), and find_corresponding_bincl_psymtab().

## ◆ set_namestring()

static const char* set_namestring | ( | struct objfile * | objfile,
|  | const struct internal_nlist * | nlist
| ) |  |
| static

Definition at line 935 of file dbxread.c.

References _, complaint, DBX_STRINGTAB, DBX_STRINGTAB_SIZE, file_string_table_offset, symfile_complaints, and symnum.

Referenced by read_dbx_symtab(), and read_ofile_symtab().

## ◆ stabs_seek()

static void stabs_seek | ( | int | sym_offset | ) |
| static

Definition at line 811 of file dbxread.c.

References SEEK_CUR, stabs_data, symbuf_left, symbuf_read, and symfile_bfd.

Referenced by read_ofile_symtab().

## ◆ stabsect_build_psymtabs()

void stabsect_build_psymtabs | ( | struct objfile * | objfile,
|  | char * | stab_name,
|  | char * | stabstr_name,
|  | char * | text_name
| ) |  |

Definition at line 3228 of file dbxread.c.

References _, buildsym_new_init(), dbx_objfile_data_key, DBX_STRINGTAB, DBX_STRINGTAB_SIZE, DBX_SYMBOL_SIZE, DBX_SYMCOUNT, dbx_symfile_read(), DBX_SYMTAB_OFFSET, DBX_TEXT_ADDR, DBX_TEXT_SIZE, error(), free_header_files(), init_header_files(), name, objfile::obfd, OBJSTAT, perror_with_name(), processing_acc_compilation, stabsread_new_init(), and XCNEW.

## ◆ start_psymtab()

static struct partial_symtab * start_psymtab | ( | struct objfile * | objfile,
|  | const char * | filename,
|  | CORE_ADDR | textlow,
|  | int | ldsymoff,
|  | std::vector< partial_symbol *> & | global_psymbols,
|  | std::vector< partial_symbol *> & | static_psymbols
| ) |  |
| static

Definition at line 1998 of file dbxread.c.

References dbx_read_symtab(), deduce_language_from_filename(), FILE_STRING_OFFSET, file_string_table_offset, partial_symtab::filename, LDSYMOFF, PST_LANGUAGE, psymtab_language, partial_symtab::read_symtab, partial_symtab::read_symtab_private, start_psymtab_common(), STRING_OFFSET, string_table_offset, SYMBOL_OFFSET, SYMBOL_SIZE, symbol_size, symbol_table_offset, and partial_symtab::textlow.

Referenced by read_dbx_symtab().

## ◆ unknown_symtype_complaint()

static void unknown_symtype_complaint | ( | const char * | arg1 | ) |
| static

Definition at line 165 of file dbxread.c.

References _, complaint, and symfile_complaints.

Referenced by process_one_symbol(), and read_dbx_symtab().

## Variable Documentation

## ◆ aout_sym_fns

const struct sym_fns aout_sym_fns
| static

Initial value:
=
{
dbx_new_init,
dbx_symfile_init,
dbx_symfile_read,
NULL,
dbx_symfile_finish,
default_symfile_offsets,
default_symfile_segments,
NULL,
default_symfile_relocate,
NULL,
&psym_functions
}
default_symfile_segments
struct symfile_segment_data * default_symfile_segments(bfd *abfd)
Definition: symfile.c:785
dbx_symfile_init
static void dbx_symfile_init(struct objfile *)
Definition: dbxread.c:585
default_symfile_relocate
bfd_byte * default_symfile_relocate(struct objfile *objfile, asection *sectp, bfd_byte *buf)
Definition: symfile.c:3625
dbx_symfile_finish
static void dbx_symfile_finish(struct objfile *)
Definition: dbxread.c:700
psym_functions
const struct quick_symbol_functions psym_functions
Definition: psymtab.c:1541
dbx_symfile_read
static void dbx_symfile_read(struct objfile *, symfile_add_flags)
Definition: dbxread.c:516
default_symfile_offsets
void default_symfile_offsets(struct objfile *objfile, const struct section_addr_info *addrs)
Definition: symfile.c:695
dbx_new_init
static void dbx_new_init(struct objfile *)
Definition: dbxread.c:561

Definition at line 3298 of file dbxread.c.

Referenced by _initialize_dbxread().

## ◆ bincl_list

struct header_file_location* bincl_list
| static

Definition at line 248 of file dbxread.c.

Referenced by add_bincl_to_list(), find_corresponding_bincl_psymtab(), free_bincl_list(), and init_bincl_list().

## ◆ bincls_allocated

int bincls_allocated
| static

Definition at line 249 of file dbxread.c.

Referenced by add_bincl_to_list(), free_bincl_list(), and init_bincl_list().

## ◆ dbx_objfile_data_key

const struct objfile_data* dbx_objfile_data_key

Definition at line 64 of file dbxread.c.

Referenced by _initialize_dbxread(), coff_symfile_init(), dbx_symfile_init(), elf_read_minimal_symbols(), and stabsect_build_psymtabs().

## ◆ dbxread_objfile

struct objfile* dbxread_objfile
| static

Definition at line 109 of file dbxread.c.

Referenced by add_new_header_file(), add_old_header_file(), and read_ofile_symtab().

## ◆ file_string_table_offset

unsigned int file_string_table_offset
| static

Definition at line 139 of file dbxread.c.

Referenced by dbx_next_symbol_text(), dbx_psymtab_to_symtab_1(), read_dbx_symtab(), set_namestring(), and start_psymtab().

## ◆ has_line_numbers

int has_line_numbers
| static

Definition at line 160 of file dbxread.c.

Referenced by dbx_end_psymtab(), and read_dbx_symtab().

## ◆ last_function_name

const char* last_function_name
| static

Definition at line 735 of file dbxread.c.

Referenced by dbx_end_psymtab(), and read_dbx_symtab().

## ◆ lowest_text_address

CORE_ADDR lowest_text_address
| static

Definition at line 155 of file dbxread.c.

Referenced by read_dbx_symtab(), and record_minimal_symbol().

## ◆ next_bincl

struct header_file_location * next_bincl
| static

Definition at line 248 of file dbxread.c.

Referenced by add_bincl_to_list(), find_corresponding_bincl_psymtab(), and init_bincl_list().

## ◆ next_file_string_table_offset

unsigned int next_file_string_table_offset
| static

Definition at line 140 of file dbxread.c.

Referenced by read_dbx_symtab().

## ◆ psymtab_language

enum language psymtab_language = language_unknown
| static

Definition at line 113 of file dbxread.c.

Referenced by read_dbx_symtab(), and start_psymtab().

## ◆ stabs_data

bfd_byte* stabs_data
| static

Definition at line 755 of file dbxread.c.

Referenced by dbx_read_symtab(), elfstab_build_psymtabs(), fill_symbuf(), and stabs_seek().

## ◆ string_table_offset

unsigned string_table_offset
| static

Definition at line 131 of file dbxread.c.

Referenced by start_psymtab().

## ◆ stringtab_global

char* stringtab_global
| static

Definition at line 744 of file dbxread.c.

Referenced by dbx_next_symbol_text(), read_dbx_symtab(), and read_ofile_symtab().

## ◆ symbol_size

unsigned symbol_size
| static

Definition at line 123 of file dbxread.c.

Referenced by dbx_psymtab_to_symtab_1(), dbx_symfile_read(), fill_symbuf(), read_dbx_symtab(), read_ofile_symtab(), and start_psymtab().

## ◆ symbol_table_offset

unsigned symbol_table_offset
| static

Definition at line 127 of file dbxread.c.

Referenced by dbx_symfile_read(), fill_symbuf(), and start_psymtab().

## ◆ symbuf

struct external_nlist symbuf[4096]
| static

Definition at line 729 of file dbxread.c.

Referenced by dbx_next_symbol_text(), fill_symbuf(), read_dbx_symtab(), and read_ofile_symtab().

## ◆ symbuf_end

int symbuf_end
| static

Definition at line 731 of file dbxread.c.

Referenced by dbx_next_symbol_text(), fill_symbuf(), read_dbx_symtab(), and read_ofile_symtab().

## ◆ symbuf_idx

int symbuf_idx
| static

Definition at line 730 of file dbxread.c.

Referenced by dbx_next_symbol_text(), fill_symbuf(), read_dbx_symtab(), and read_ofile_symtab().

## ◆ symbuf_left

unsigned int symbuf_left
| static

Definition at line 750 of file dbxread.c.

Referenced by coffstab_build_psymtabs(), elfstab_build_psymtabs(), fill_symbuf(), read_ofile_symtab(), and stabs_seek().

## ◆ symbuf_read

unsigned int symbuf_read
| static

Definition at line 751 of file dbxread.c.

Referenced by coffstab_build_psymtabs(), elfstab_build_psymtabs(), fill_symbuf(), read_ofile_symtab(), and stabs_seek().

## ◆ symbuf_sections

struct stab_section_list* symbuf_sections
| static

Definition at line 749 of file dbxread.c.

Referenced by coffstab_build_psymtabs(), and fill_symbuf().

## ◆ symfile_bfd

bfd* symfile_bfd
| static

Definition at line 117 of file dbxread.c.

Referenced by dbx_next_symbol_text(), read_dbx_symtab(), read_ofile_symtab(), and stabs_seek().

## ◆ symfile_relocatable

int symfile_relocatable = 0
| static

Definition at line 146 of file dbxread.c.

Referenced by dbx_symfile_read(), and process_one_symbol().