35#include "gdbsupport/gdb_obstack.h"
54#include "aout/aout64.h"
55#include "aout/stab_gnu.h"
93#define LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
94#define LDSYMLEN(p) (((struct symloc *)((p)->read_symtab_private))->ldsymlen)
95#define SYMLOC(p) ((struct symloc *)((p)->read_symtab_private))
96#define SYMBOL_SIZE(p) (SYMLOC(p)->symbol_size)
97#define SYMBOL_OFFSET(p) (SYMLOC(p)->symbol_offset)
98#define STRING_OFFSET(p) (SYMLOC(p)->string_offset)
99#define FILE_STRING_OFFSET(p) (SYMLOC(p)->file_string_offset)
100#define PST_LANGUAGE(p) (SYMLOC(p)->pst_language)
171 complaint (_(
"unknown symbol type %s"), arg1);
177 complaint (_(
"N_LBRAC/N_RBRAC symbol mismatch at symtab pos %d"), arg1);
183 complaint (_(
"\"repeated\" header file %s not "
184 "previously seen, at symtab pos %d"),
205 for (sec = sym_bfd->sections; sec; sec = sec->next)
206 if (bfd_section_flags (sec) & SEC_CODE)
208 CORE_ADDR sec_start = bfd_section_vma (sec);
209 CORE_ADDR sec_end = sec_start + bfd_section_size (sec);
213 if (sec_start < start)
228 error (_(
"Can't find any code sections in symbol file"));
288 const char *, unrelocated_addr,
int,
298 const char *, unrelocated_addr,
int);
412explicit_lookup_type (
int real_filenum,
int index)
416 if (index >=
f->length)
419 f->vector = (
struct type **)
421 memset (&
f->vector[
f->length / 2],
422 '\0',
f->length * sizeof (
struct type *) / 2);
424 return &
f->vector[index];
430 const char *
name, unrelocated_addr address,
int type,
481 if (strcmp (
"__DYNAMIC",
name) == 0)
486 const char *tempstring =
name;
488 if (*tempstring !=
'\0'
489 && *tempstring == bfd_get_symbol_leading_char (
objfile->
obfd.get ()))
581#define DBX_STRINGTAB_SIZE_SIZE sizeof(long)
588 const char *
name = bfd_get_filename (sym_bfd);
600#define STRING_TABLE_OFFSET (sym_bfd->origin + obj_str_filepos (sym_bfd))
601#define SYMBOL_TABLE_OFFSET (sym_bfd->origin + obj_sym_filepos (sym_bfd))
605 text_sect = bfd_get_section_by_name (sym_bfd,
".text");
607 error (_(
"Can't find .text section in symbol file"));
640 perror_with_name (
name);
642 memset (size_temp, 0,
sizeof (size_temp));
643 val = bfd_read (size_temp,
sizeof (size_temp), sym_bfd);
646 perror_with_name (
name);
669 error (_(
"ridiculous string table size (%d bytes)."),
681 perror_with_name (
name);
686 perror_with_name (
name);
712 xfree (hfiles[i].vector);
721static struct external_nlist
symbuf[4096];
772 nbytes = bfd_read (
symbuf, count, sym_bfd);
778 file_ptr filepos = (*symbuf_sections)[
sect_idx]->filepos;
780 if (bfd_seek (sym_bfd, filepos,
SEEK_SET) != 0)
781 perror_with_name (bfd_get_filename (sym_bfd));
788 if (count >
sizeof (
symbuf))
790 nbytes = bfd_read (
symbuf, count, sym_bfd);
794 perror_with_name (bfd_get_filename (sym_bfd));
795 else if (nbytes == 0)
796 error (_(
"Premature end of file reading symbol table"));
816#define INTERNALIZE_SYMBOL(intern, extern, abfd) \
818 (intern).n_strx = bfd_h_get_32 (abfd, (extern)->e_strx); \
819 (intern).n_type = bfd_h_get_8 (abfd, (extern)->e_type); \
820 (intern).n_other = 0; \
821 (intern).n_desc = bfd_h_get_16 (abfd, (extern)->e_desc); \
822 if (bfd_get_sign_extend_vma (abfd)) \
823 (intern).n_value = bfd_h_get_signed_32 (abfd, (extern)->e_value); \
825 (intern).n_value = bfd_h_get_32 (abfd, (extern)->e_value); \
840 struct internal_nlist nlist;
863 if (bincl.instance == instance
864 && strcmp (
name, bincl.name) == 0)
878 const char *namestring;
882 || nlist->n_strx + file_string_table_offset < nlist->n_strx)
884 complaint (_(
"bad string table offset in symbol %d"),
886 namestring =
"<bad string table offset>";
901 const char *colon = strchr (namestring,
':');
905 n = colon - namestring;
907 char *p = (
char *) alloca (n + 2);
908 strncpy (p, namestring, n);
922 if (msym.
minsym == NULL && filename != NULL)
928 if (msym.
minsym == NULL && filename != NULL)
942 complaint (_(
"function `%s' appears to be defined "
943 "outside of all compilation units"),
956 struct external_nlist *bufp = 0;
957 struct internal_nlist nlist;
960 const char *sym_name;
963 const char *namestring;
965 int past_first_source_file = 0;
966 CORE_ADDR last_function_start = 0;
975 const char **psymtab_include_list;
976 int includes_allocated;
981 int dependencies_used, dependencies_allocated;
995 includes_allocated = 30;
997 psymtab_include_list = (
const char **) alloca (includes_allocated *
998 sizeof (
const char *));
1000 dependencies_allocated = 30;
1001 dependencies_used = 0;
1007 std::vector<struct header_file_location> bincl_storage;
1008 scoped_restore restore_bincl_global
1009 = make_scoped_restore (&
bincl_list, &bincl_storage);
1019 textlow_not_set = 1;
1043 if (data_sect_index == -1)
1045 if (data_sect_index == -1)
1063 if (bfd_h_get_8 (abfd, bufp->e_type) == N_SLINE)
1083 switch (nlist.n_type)
1089 case N_TEXT | N_EXT:
1090 case N_NBTEXT | N_EXT:
1093 case N_DATA | N_EXT:
1094 case N_NBDATA | N_EXT:
1099 case N_NBBSS | N_EXT:
1100 case N_SETV | N_EXT:
1108 unrelocated_addr (nlist.n_value),
1126 if ((namestring[0] ==
'-' && namestring[1] ==
'l')
1127 || (namestring[(nsl = strlen (namestring)) - 1] ==
'o'
1128 && namestring[nsl - 2] ==
'.'))
1130 unrelocated_addr unrel_val = unrelocated_addr (nlist.n_value);
1132 if (past_first_source_file && pst
1138 pst, psymtab_include_list,
1142 dependency_list, dependencies_used,
1146 dependencies_used = 0;
1150 past_first_source_file = 1;
1159 case N_UNDF | N_EXT:
1179 past_first_source_file = 1;
1184 error (_(
"string table offset backs up at %d"),
symnum);
1203 case N_INDR | N_EXT:
1205 case N_SETA | N_EXT:
1207 case N_SETT | N_EXT:
1209 case N_SETD | N_EXT:
1211 case N_SETB | N_EXT:
1222 static int prev_so_symnum = -10;
1223 static int first_so_symnum;
1225 static const char *dirname_nso;
1226 int prev_textlow_not_set;
1228 valu = nlist.n_value;
1230 prev_textlow_not_set = textlow_not_set;
1236 if (nlist.n_value == 0
1239 textlow_not_set = 1;
1243 textlow_not_set = 0;
1245 past_first_source_file = 1;
1247 if (prev_so_symnum !=
symnum - 1)
1249 first_so_symnum =
symnum;
1253 unrelocated_addr unrel_value = unrelocated_addr (valu);
1255 pst, psymtab_include_list,
1260 dependency_list, dependencies_used,
1261 prev_textlow_not_set);
1264 dependencies_used = 0;
1276 if (*namestring ==
'\000')
1284 p = lbasename (namestring);
1285 if (p != namestring && *p ==
'\000')
1289 dirname_nso = namestring;
1301 unrelocated_addr (valu),
1333 complaint (_(
"N_BINCL %s not in entries for "
1334 "any file, at symtab pos %d"),
1338 bincl_list->emplace_back (namestring, nlist.n_value, pst);
1342 goto record_include_file;
1372 if (pst && filename_cmp (namestring, pst->
filename) == 0)
1377 for (i = 0; i < includes_used; i++)
1378 if (filename_cmp (namestring, psymtab_include_list[i]) == 0)
1387 record_include_file:
1389 psymtab_include_list[includes_used++] = namestring;
1390 if (includes_used >= includes_allocated)
1392 const char **orig = psymtab_include_list;
1394 psymtab_include_list = (
const char **)
1395 alloca ((includes_allocated *= 2) *
sizeof (
const char *));
1396 memcpy (psymtab_include_list, orig,
1397 includes_used *
sizeof (
const char *));
1424 if (pst && nlist.n_type == N_FUN && *namestring ==
'\000')
1426 unrelocated_addr valu;
1431 valu = unrelocated_addr (nlist.n_value + last_function_start);
1438 p = (
char *) strchr (namestring,
':');
1446 std::string
name (namestring, p - namestring);
1447 gdb::unique_xmalloc_ptr<char> new_name
1449 if (new_name !=
nullptr)
1451 sym_len = strlen (new_name.get ());
1458 std::string
name (namestring, p - namestring);
1459 gdb::unique_xmalloc_ptr<char> new_name
1461 if (new_name !=
nullptr)
1463 sym_len = strlen (new_name.get ());
1471 sym_name = namestring;
1472 sym_len = p - namestring;
1486 pst->
add_psymbol (gdb::string_view (sym_name, sym_len),
true,
1490 unrelocated_addr (nlist.n_value),
1494 complaint (_(
"static `%*s' appears to be defined "
1495 "outside of all compilation units"),
1503 pst->
add_psymbol (gdb::string_view (sym_name, sym_len),
true,
1507 unrelocated_addr (nlist.n_value),
1511 complaint (_(
"global `%*s' appears to be defined "
1512 "outside of all compilation units"),
1523 if (p >= namestring + 2
1524 || (p == namestring + 1
1525 && namestring[0] !=
' '))
1528 pst->
add_psymbol (gdb::string_view (sym_name, sym_len),
1531 unrelocated_addr (0),
1535 complaint (_(
"enum, struct, or union `%*s' appears "
1536 "to be defined outside of all "
1537 "compilation units"),
1543 pst->
add_psymbol (gdb::string_view (sym_name, sym_len),
1546 unrelocated_addr (0),
1550 complaint (_(
"typedef `%*s' appears to be defined "
1551 "outside of all compilation units"),
1559 if (p != namestring)
1562 pst->
add_psymbol (gdb::string_view (sym_name, sym_len),
1565 unrelocated_addr (0),
1569 complaint (_(
"typename `%*s' appears to be defined "
1570 "outside of all compilation units"),
1591 while ((*p >=
'0' && *p <=
'9')
1592 || *p ==
'(' || *p ==
',' || *p ==
')'
1614 while (*p && *p !=
';' && *p !=
',')
1620 if (*p ==
'\\' || (*p ==
'?' && p[1] ==
'\0'))
1625 for (q = p; *q && *q !=
':'; q++)
1630 pst->
add_psymbol (gdb::string_view (p, q - p),
true,
1633 unrelocated_addr (0),
1637 complaint (_(
"enum constant `%*s' appears to be defined "
1638 "outside of all compilation units"),
1639 ((
int) (q - p)), p);
1643 while (*p && *p !=
',')
1655 pst->
add_psymbol (gdb::string_view (sym_name, sym_len),
true,
1658 unrelocated_addr (0),
1662 complaint (_(
"constant `%*s' appears to be defined "
1663 "outside of all compilation units"),
1671 std::string
name (namestring, (p - namestring));
1678 if (nlist.n_value == 0
1685 if (
minsym.minsym != NULL)
1689 if (pst && textlow_not_set
1693 textlow_not_set = 0;
1699 last_function_start = nlist.n_value;
1707 || (unrelocated_addr (nlist.n_value)
1709 && (nlist.n_value != 0))))
1712 textlow_not_set = 0;
1715 pst->
add_psymbol (gdb::string_view (sym_name, sym_len),
true,
1719 unrelocated_addr (nlist.n_value),
1730 std::string
name (namestring, (p - namestring));
1737 if (nlist.n_value == 0
1744 if (
minsym.minsym != NULL)
1748 if (pst && textlow_not_set
1752 textlow_not_set = 0;
1758 last_function_start = nlist.n_value;
1766 || (unrelocated_addr (nlist.n_value)
1768 && (nlist.n_value != 0))))
1771 textlow_not_set = 0;
1774 pst->
add_psymbol (gdb::string_view (sym_name, sym_len),
true,
1778 unrelocated_addr (nlist.n_value),
1820 complaint (_(
"unknown symbol descriptor `%c'"),
1841 if (needed_pst == pst)
1849 for (i = 0; i < dependencies_used; i++)
1850 if (dependency_list[i] == needed_pst)
1860 dependency_list[dependencies_used++] = needed_pst;
1861 if (dependencies_used >= dependencies_allocated)
1867 alloca ((dependencies_allocated *= 2)
1869 memcpy (dependency_list, orig,
1874 "Had to reallocate "
1875 "dependency list.\n");
1877 "New dependencies allocated: %d\n",
1878 dependencies_allocated);
1893 psymtab_include_list, includes_used,
1895 (unrelocated_addr) 0, dependency_list,
1896 dependencies_used, textlow_not_set);
1899 dependencies_used = 0;
1906 HANDLE_RBRAC (nlist.n_value);
1952 unrelocated_addr text_end
1960 pst, psymtab_include_list, includes_used,
1964 dependency_list, dependencies_used, textlow_not_set);
1977 const char *filename, unrelocated_addr textlow,
int ldsymoff)
2007 const char **include_list,
int num_includes,
2008 int capping_symbol_offset, unrelocated_addr capping_text,
2010 int number_dependencies,
2011 int textlow_not_set)
2016 if (capping_symbol_offset != -1)
2046 char *p = (
char *) alloca (n + 2);
2051 if (
minsym.minsym == NULL)
2072 else if (textlow_not_set)
2082 if (!p1->text_high_valid && p1->text_low_valid && p1 != pst)
2091 if (number_dependencies)
2101 for (i = 0; i < num_includes; i++)
2122 if (num_includes == 0
2123 && number_dependencies == 0
2145 gdb_assert (!pst->
readin);
2172 gdb_assert (!self->
readin);
2179 scoped_restore restore_stabs_data = make_scoped_restore (&
stabs_data);
2180 gdb::unique_xmalloc_ptr<gdb_byte> data_holder;
2204 const char *namestring;
2205 struct external_nlist *bufp;
2206 struct internal_nlist nlist;
2208 unsigned max_symnum;
2212 CORE_ADDR text_offset;
2249 if (nlist.n_type == N_TEXT)
2251 const char *tempstring = namestring;
2257 if (*tempstring !=
'\0'
2258 && *tempstring == bfd_get_symbol_leading_char (
symfile_bfd))
2260 if (startswith (tempstring,
"__gnu_compiled"))
2276 if (bfd_h_get_8 (abfd, bufp->e_type) != N_SO)
2277 error (_(
"First symbol in segment of executable not a source symbol"));
2292 type = bfd_h_get_8 (abfd, bufp->e_type);
2298 if (
sizeof (nlist.n_value) > 4
2300 && (
type == N_LSYM ||
type == N_PSYM))
2310 nlist.n_value = (nlist.n_value ^ 0x80000000) - 0x80000000;
2317 else if (
type == N_TEXT)
2330 else if (
type & N_EXT ||
type == (
unsigned char) N_TEXT
2331 ||
type == (
unsigned char) N_NBTEXT)
2373 struct obstack *obstack)
2424 static CORE_ADDR function_start_offset;
2428 static CORE_ADDR last_function_start;
2434 static int sline_found_in_function = 1;
2438 static int n_opt_found;
2441 int section_index = -1;
2460 if (*
name ==
'\000')
2476 if (sline_found_in_function)
2478 CORE_ADDR addr = last_function_start + valu;
2500 function_start_offset = 0;
2505 sline_found_in_function = 0;
2511 last_function_start = valu;
2513 goto define_a_symbol;
2520 if (n_opt_found && desc == 1)
2523 valu += function_start_offset;
2533 if (n_opt_found && desc == 1)
2536 valu += function_start_offset;
2545 if (desc != cstk.
depth)
2554 complaint (_(
"misplaced N_LBRAC entry; discarding local "
2555 "symbols which have no enclosing block"));
2574 complaint (_(
"block start larger than block end"));
2628 if (*
name ==
'\000')
2631 function_start_offset = 0;
2669 valu += function_start_offset;
2688 last_function_start : valu;
2694 sline_found_in_function = 1;
2739 p = strchr (
name,
':');
2740 if (p != 0 && p[1] ==
'S')
2750 goto define_a_symbol;
2764 internal_error (_(
"failed internal consistency check"));
2772 goto define_a_symbol;
2779 goto define_a_symbol;
2784 goto define_a_symbol;
2790 goto define_a_symbol;
2826 const char *colon_pos = strchr (
name,
':');
2828 if (colon_pos == NULL)
2831 deftype = colon_pos[1];
2846 if (
minsym.minsym != NULL)
2851 function_start_offset = valu;
2857 complaint (_(
"unmatched N_LBRAC before symtab pos %d"),
2880 if (newobj->
name !=
nullptr)
2947 const char *s =
name;
2990 CORE_ADDR textaddr,
unsigned int textsize,
2991 const std::vector<asection *> &stabsects,
2992 file_ptr stabstroffset,
unsigned int stabstrsize)
2996 const char *
name = bfd_get_filename (sym_bfd);
2997 unsigned int stabsize;
3005#define COFF_STABS_SYMBOL_SIZE 12
3009 if (stabstrsize > bfd_get_size (sym_bfd))
3010 error (_(
"ridiculous string table size: %d bytes"), stabstrsize);
3017 val = bfd_seek (sym_bfd, stabstroffset,
SEEK_SET);
3019 perror_with_name (
name);
3021 if (val != stabstrsize)
3022 perror_with_name (
name);
3033 scoped_restore save_symbuf_sections
3035 if (stabsects.size () == 1)
3037 stabsize = bfd_section_size (stabsects[0]);
3044 for (asection *section : stabsects)
3046 stabsize = bfd_section_size (section);
3079 file_ptr stabstroffset,
unsigned int stabstrsize)
3083 const char *
name = bfd_get_filename (sym_bfd);
3094#define ELF_STABS_SYMBOL_SIZE 12
3102 if (stabstrsize > bfd_get_size (sym_bfd))
3103 error (_(
"ridiculous string table size: %d bytes"), stabstrsize);
3110 val = bfd_seek (sym_bfd, stabstroffset,
SEEK_SET);
3112 perror_with_name (
name);
3114 if (val != stabstrsize)
3115 perror_with_name (
name);
3126 scoped_restore restore_stabs_data = make_scoped_restore (&
stabs_data);
3127 gdb::unique_xmalloc_ptr<gdb_byte> data_holder;
3160 char *stabstr_name,
char *text_name)
3164 const char *
name = bfd_get_filename (sym_bfd);
3166 asection *stabstrsect;
3167 asection *text_sect;
3169 stabsect = bfd_get_section_by_name (sym_bfd, stab_name);
3170 stabstrsect = bfd_get_section_by_name (sym_bfd, stabstr_name);
3176 error (_(
"stabsect_build_psymtabs: Found stabs (%s), "
3177 "but not string section (%s)"),
3178 stab_name, stabstr_name);
3182 text_sect = bfd_get_section_by_name (sym_bfd, text_name);
3184 error (_(
"Can't find %s section in symbol file"), text_name);
3197 error (_(
"ridiculous string table size: %d bytes"),
3206 val = bfd_get_section_contents (sym_bfd,
3214 perror_with_name (
name);
void * xrealloc(void *ptr, size_t size)
void set_last_source_start_addr(CORE_ADDR addr)
struct context_stack * push_context(int desc, CORE_ADDR valu)
struct block * finish_block(struct symbol *symbol, struct pending_block *old_blocks, const struct dynamic_prop *static_link, CORE_ADDR start, CORE_ADDR end)
struct compunit_symtab * start_compunit_symtab(struct objfile *objfile, const char *name, const char *comp_dir, CORE_ADDR start_addr, enum language language)
struct context_stack pop_context()
CORE_ADDR get_last_source_start_addr()
bool outermost_context_p()
struct subfile * get_current_subfile()
void record_debugformat(const char *format)
void set_last_source_file(const char *name)
struct compunit_symtab * end_compunit_symtab(CORE_ADDR end_addr)
void patch_subfile_names(struct subfile *subfile, const char *name)
int get_context_stack_depth()
void record_line(struct subfile *subfile, int line, unrelocated_addr pc)
void start_subfile(const char *name)
const char * get_last_source_file()
struct pending ** get_local_symbols()
const char * pop_subfile()
gdb::unique_xmalloc_ptr< char > c_canonicalize_name(const char *name)
void record_with_info(const char *name, unrelocated_addr address, enum minimal_symbol_type ms_type, int section)
void discard_psymtab(struct partial_symtab *pst)
partial_symtab_range range()
struct partial_symtab ** allocate_dependencies(int number)
#define complaint(FMT,...)
int is_vtable_name(const char *name)
unsigned int cp_entire_prefix_len(const char *name)
gdb::unique_xmalloc_ptr< char > cp_canonicalize_string(const char *string)
static unrelocated_addr lowest_text_address
static legacy_psymtab * start_psymtab(psymtab_storage *, struct objfile *, const char *, unrelocated_addr, int)
static void dbx_expand_psymtab(legacy_psymtab *, struct objfile *)
void free_header_files(void)
void init_header_files(void)
#define INTERNALIZE_SYMBOL(intern, extern, abfd)
static char * stringtab_global
static void add_new_header_file(const char *, int)
static unsigned char processing_acc_compilation
static void repeated_header_complaint(const char *arg1, int arg2)
static int has_line_numbers
static void lbrac_mismatch_complaint(int arg1)
static unsigned symbol_table_offset
void coffstab_build_psymtabs(struct objfile *objfile, CORE_ADDR textaddr, unsigned int textsize, const std::vector< asection * > &stabsects, file_ptr stabstroffset, unsigned int stabstrsize)
static unsigned int file_string_table_offset
static int symfile_relocatable
#define ELF_STABS_SYMBOL_SIZE
#define SYMBOL_TABLE_OFFSET
static const char * last_function_name
static unsigned int symbuf_left
static void add_this_object_header_file(int)
static const char * dbx_next_symbol_text(struct objfile *)
void elfstab_build_psymtabs(struct objfile *objfile, asection *stabsect, file_ptr stabstroffset, unsigned int stabstrsize)
static void read_ofile_symtab(struct objfile *, legacy_psymtab *)
static unsigned symbol_size
static void fill_symbuf(bfd *)
static enum language psymtab_language
static unsigned int next_file_string_table_offset
static void find_text_range(bfd *sym_bfd, struct objfile *objfile)
static struct external_nlist symbuf[4096]
static void dbx_new_init(struct objfile *)
static unsigned string_table_offset
#define DBX_STRINGTAB_SIZE_SIZE
static void stabs_seek(int sym_offset)
const registry< objfile >::key< dbx_symfile_info > dbx_objfile_data_key
static void record_minimal_symbol(minimal_symbol_reader &, const char *, unrelocated_addr, int, struct objfile *)
static void unknown_symtype_complaint(const char *arg1)
static const struct sym_fns aout_sym_fns
static const char * set_namestring(struct objfile *objfile, const struct internal_nlist *nlist)
static void add_old_header_file(const char *, int)
static unsigned int symbuf_read
void _initialize_dbxread()
static void dbx_read_symtab(legacy_psymtab *self, struct objfile *objfile)
static void dbx_symfile_init(struct objfile *)
static struct objfile * dbxread_objfile
static std::vector< struct header_file_location > * bincl_list
static void dbx_symfile_finish(struct objfile *)
#define FILE_STRING_OFFSET(p)
static bfd_byte * stabs_data
static struct bound_minimal_symbol find_stab_function(const char *namestring, const char *filename, struct objfile *objfile)
static void read_dbx_symtab(minimal_symbol_reader &, psymtab_storage *, struct objfile *)
legacy_psymtab * dbx_end_psymtab(struct objfile *objfile, psymtab_storage *partial_symtabs, legacy_psymtab *pst, const char **include_list, int num_includes, int capping_symbol_offset, unrelocated_addr capping_text, legacy_psymtab **dependency_list, int number_dependencies, int textlow_not_set)
static const std::vector< asection * > * symbuf_sections
static void dbx_symfile_read(struct objfile *, symfile_add_flags)
void process_one_symbol(int type, int desc, CORE_ADDR valu, const char *name, const section_offsets §ion_offsets, struct objfile *objfile, enum language language)
static void function_outside_compilation_unit_complaint(const char *arg1)
static legacy_psymtab * find_corresponding_bincl_psymtab(const char *, int)
void stabsect_build_psymtabs(struct objfile *objfile, char *stab_name, char *stabstr_name, char *text_name)
static void cp_set_block_scope(const struct symbol *symbol, struct block *block, struct obstack *obstack)
#define COFF_STABS_SYMBOL_SIZE
#define STRING_TABLE_OFFSET
#define DBX_BSS_SECTION(o)
#define DBX_TEXT_SECTION(o)
#define DBX_SYMBOL_SIZE(o)
#define DBX_SYMTAB_OFFSET(o)
#define DBX_STRINGTAB_SIZE(o)
#define DBX_DATA_SECTION(o)
#define DBX_STAB_SECTION(o)
int gdbarch_sofun_address_maybe_missing(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_addr_bits_remove(struct gdbarch *gdbarch, CORE_ADDR addr)
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
void set_objfile_main_name(struct objfile *objfile, const char *name, enum language lang)
const char * objfile_name(const struct objfile *objfile)
#define SECT_OFF_BSS(objfile)
#define SECT_OFF_DATA(objfile)
#define SECT_OFF_RODATA(objfile)
#define SECT_OFF_TEXT(objfile)
#define OBJSTAT(objfile, expr)
struct symbol * ref_search(int refnum)
int symbol_reference_defined(const char **string)
void common_block_end(struct objfile *objfile)
void stabsread_new_init(void)
struct symbol * define_symbol(CORE_ADDR valu, const char *string, int desc, int type, struct objfile *objfile)
int n_this_object_header_files
int * this_object_header_files
void scan_file_globals(struct objfile *objfile)
const char *(* next_symbol_text_func)(struct objfile *)
unsigned char processing_gcc_compilation
void stabsread_init(void)
int n_allocated_this_object_header_files
void common_block_start(const char *name, struct objfile *objfile)
void ref_add(int refnum, struct symbol *sym, const char *stabs, CORE_ADDR value)
#define N_HEADER_FILES(OBJFILE)
#define next_symbol_text(objfile)
#define N_ALLOCATED_HEADER_FILES(OBJFILE)
#define HEADER_FILES(OBJFILE)
void set_scope(const char *scope, struct obstack *obstack)
struct minimal_symbol * minsym
struct pending_block * old_blocks
struct header_file * header_files
void set_section_index(short idx)
const char * demangled_name
enum language language() const
short section_index() const
void expand_psymtab(struct objfile *objf) override
void * read_symtab_private
void(* legacy_expand_psymtab)(legacy_psymtab *, struct objfile *)
void(* legacy_read_symtab)(legacy_psymtab *, struct objfile *)
unsigned long size() const
CORE_ADDR value_address(objfile *objfile) const
unrelocated_addr unrelocated_address() const
struct gdbarch * arch() const
struct objfile_per_bfd_storage * per_bfd
objfile(gdb_bfd_ref_ptr, const char *, objfile_flags)
CORE_ADDR text_section_offset() const
auto_obstack objfile_obstack
std::forward_list< quick_symbol_functions_up > qf
::section_offsets section_offsets
struct partial_symtab ** dependencies
unrelocated_addr unrelocated_text_low() const
unsigned int text_high_valid
unrelocated_addr unrelocated_text_high() const
void set_text_high(unrelocated_addr addr)
int number_of_dependencies
CORE_ADDR text_high(struct objfile *objfile) const
void expand_dependencies(struct objfile *)
void set_text_low(unrelocated_addr addr)
void add_psymbol(gdb::string_view name, bool copy_name, domain_enum domain, enum address_class theclass, short section, psymbol_placement where, unrelocated_addr coreaddr, enum language language, psymtab_storage *partial_symtabs, struct objfile *objfile)
CORE_ADDR text_low(struct objfile *objfile) const
const std::shared_ptr< psymtab_storage > & get_partial_symtabs() const
struct compunit_symtab * compunit_symtab
enum language pst_language
enum language deduce_language_from_filename(const char *filename)
bfd_byte * symfile_relocate_debug_section(struct objfile *objfile, asection *sectp, bfd_byte *buf)
void add_symtab_fns(enum bfd_flavour flavour, const struct sym_fns *sf)
void default_symfile_offsets(struct objfile *objfile, const section_addr_info &addrs)
symfile_segment_data_up default_symfile_segments(bfd *abfd)
bfd_byte * default_symfile_relocate(struct objfile *objfile, asection *sectp, bfd_byte *buf)
#define GCC_COMPILED_FLAG_SYMBOL
#define GCC2_COMPILED_FLAG_SYMBOL
std::vector< CORE_ADDR > section_offsets
void gdb_printf(struct ui_file *stream, const char *format,...)