34 #if defined(__CYGNUSCLIB__)
35 #include <sys/types.h>
46 #include "filenames.h"
58 #include "aout/aout64.h"
59 #include "aout/stab_gnu.h"
97 #define LDSYMOFF(p) (((struct symloc *)((p)->read_symtab_private))->ldsymoff)
98 #define LDSYMLEN(p) (((struct symloc *)((p)->read_symtab_private))->ldsymlen)
99 #define SYMLOC(p) ((struct symloc *)((p)->read_symtab_private))
100 #define SYMBOL_SIZE(p) (SYMLOC(p)->symbol_size)
101 #define SYMBOL_OFFSET(p) (SYMLOC(p)->symbol_offset)
102 #define STRING_OFFSET(p) (SYMLOC(p)->string_offset)
103 #define FILE_STRING_OFFSET(p) (SYMLOC(p)->file_string_offset)
177 _(
"N_LBRAC/N_RBRAC symbol mismatch at symtab pos %d"), arg1);
184 _(
"\"repeated\" header file %s not "
185 "previously seen, at symtab pos %d"),
206 for (sec = sym_bfd->sections; sec; sec = sec->next)
207 if (bfd_get_section_flags (sym_bfd, sec) & SEC_CODE)
209 CORE_ADDR sec_start = bfd_section_vma (sym_bfd, sec);
210 CORE_ADDR sec_end = sec_start + bfd_section_size (sym_bfd, sec);
214 if (sec_start < start)
229 error (
_(
"Can't find any code sections in symbol file"));
354 if (filename_cmp (p[i].name, name) == 0 && instance == p[i].
instance)
405 hfile->
name = xstrdup (name);
410 memset (hfile->
vector, 0, 10 * sizeof (
struct type *));
416 static struct type **
417 explicit_lookup_type (
int real_filenum,
int index)
427 '\0', f->
length * sizeof (
struct type *) / 2);
485 if (name[8] ==
'C' && strcmp (
"__DYNAMIC", name) == 0)
490 const char *tempstring =
name;
492 if (tempstring[0] == bfd_get_symbol_leading_char (objfile->
obfd))
510 && address < lowest_text_address)
511 lowest_text_address = address;
514 (name, address, ms_type, section, objfile);
529 sym_bfd = objfile->
obfd;
535 symfile_relocatable = bfd_get_file_flags (sym_bfd) & HAS_RELOC;
541 block_address_function_relative =
542 ((
startswith (bfd_get_target (sym_bfd),
"elf"))
543 || (
startswith (bfd_get_target (sym_bfd),
"som"))
544 || (
startswith (bfd_get_target (sym_bfd),
"coff"))
545 || (
startswith (bfd_get_target (sym_bfd),
"pe"))
546 || (
startswith (bfd_get_target (sym_bfd),
"epoc-pe"))
547 || (
startswith (bfd_get_target (sym_bfd),
"nlm")));
608 #define DBX_STRINGTAB_SIZE_SIZE sizeof(long)
614 bfd *sym_bfd = objfile->
obfd;
615 char *
name = bfd_get_filename (sym_bfd);
622 set_objfile_data (objfile, dbx_objfile_data_key, dbx);
629 #define STRING_TABLE_OFFSET (sym_bfd->origin + obj_str_filepos (sym_bfd))
630 #define SYMBOL_TABLE_OFFSET (sym_bfd->origin + obj_sym_filepos (sym_bfd))
634 text_sect = bfd_get_section_by_name (sym_bfd,
".text");
636 error (
_(
"Can't find .text section in symbol file"));
637 DBX_TEXT_ADDR (objfile) = bfd_section_vma (sym_bfd, text_sect);
638 DBX_TEXT_SIZE (objfile) = bfd_section_size (sym_bfd, text_sect);
671 memset (size_temp, 0,
sizeof (size_temp));
672 val = bfd_bread (size_temp,
sizeof (size_temp), sym_bfd);
698 error (
_(
"ridiculous string table size (%d bytes)."),
755 static struct external_nlist
symbuf[4096];
798 if (nbytes > symbuf_left)
800 memcpy (
symbuf, stabs_data + symbuf_read, nbytes);
802 else if (symbuf_sections == NULL)
805 nbytes = bfd_bread (
symbuf, count, sym_bfd);
809 if (symbuf_left <= 0)
811 file_ptr filepos = symbuf_sections->
section->filepos;
813 if (bfd_seek (sym_bfd, filepos,
SEEK_SET) != 0)
815 symbuf_left = bfd_section_size (sym_bfd, symbuf_sections->
section);
817 symbuf_sections = symbuf_sections->
next;
821 if (count >
sizeof (
symbuf))
823 nbytes = bfd_bread (
symbuf, count, sym_bfd);
828 else if (nbytes == 0)
829 error (
_(
"Premature end of file reading symbol table"));
832 symbuf_left -= nbytes;
833 symbuf_read += nbytes;
841 symbuf_read += sym_offset;
842 symbuf_left -= sym_offset;
845 bfd_seek (symfile_bfd, sym_offset,
SEEK_CUR);
848 #define INTERNALIZE_SYMBOL(intern, extern, abfd) \
850 (intern).n_strx = bfd_h_get_32 (abfd, (extern)->e_strx); \
851 (intern).n_type = bfd_h_get_8 (abfd, (extern)->e_type); \
852 (intern).n_other = 0; \
853 (intern).n_desc = bfd_h_get_16 (abfd, (extern)->e_desc); \
854 if (bfd_get_sign_extend_vma (abfd)) \
855 (intern).n_value = bfd_h_get_signed_32 (abfd, (extern)->e_value); \
857 (intern).n_value = bfd_h_get_32 (abfd, (extern)->e_value); \
872 struct internal_nlist nlist;
874 if (symbuf_idx == symbuf_end)
892 bincls_allocated = number;
902 if (next_bincl >= bincl_list + bincls_allocated)
906 bincls_allocated *= 2;
910 next_bincl = bincl_list +
offset;
926 for (bincl = bincl_list; bincl <
next_bincl; bincl++)
928 && strcmp (name, bincl->
name) == 0)
941 bincls_allocated = 0;
965 if (nlist->n_strx + file_string_table_offset
967 || nlist->n_strx + file_string_table_offset < nlist->n_strx)
970 _(
"bad string table offset in symbol %d"),
972 namestring =
"<bad string table offset>";
975 namestring = (nlist->n_strx + file_string_table_offset
986 bfd *abfd = objfile->
obfd;
1005 if (bfd_get_flavour (abfd) != bfd_target_aout_flavour
1006 || (bfd_get_file_flags (abfd) & DYNAMIC) == 0
1007 || bfd_get_arch (abfd) == bfd_arch_unknown)
1010 dynsym_size = bfd_get_dynamic_symtab_upper_bound (abfd);
1011 if (dynsym_size < 0)
1014 dynsyms = (asymbol **)
xmalloc (dynsym_size);
1017 dynsym_count = bfd_canonicalize_dynamic_symtab (abfd, dynsyms);
1018 if (dynsym_count < 0)
1026 if (bfd_get_symcount (abfd) <= 0)
1029 for (counter = 0; counter < dynsym_count; counter++, symptr++)
1031 asymbol *sym = *symptr;
1035 sec = bfd_get_section (sym);
1038 sym_value = sym->value + sec->vma;
1040 if (bfd_get_section_flags (abfd, sec) & SEC_CODE)
1044 else if (bfd_get_section_flags (abfd, sec) & SEC_DATA)
1048 else if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
1055 if (sym->flags & BSF_GLOBAL)
1067 dynrel_size = bfd_get_dynamic_reloc_upper_bound (abfd);
1068 if (dynrel_size < 0)
1074 dynrels = (arelent **)
xmalloc (dynrel_size);
1077 dynrel_count = bfd_canonicalize_dynamic_reloc (abfd, dynrels, dynsyms);
1078 if (dynrel_count < 0)
1084 for (counter = 0, relptr = dynrels;
1085 counter < dynrel_count;
1086 counter++, relptr++)
1088 arelent *rel = *relptr;
1091 switch (bfd_get_arch (abfd))
1093 case bfd_arch_sparc:
1094 if (rel->howto->type != RELOC_JMP_SLOT)
1099 if (rel->howto->type != 16)
1110 name = bfd_asymbol_name (*rel->sym_ptr_ptr);
1126 p = strchr (namestring,
':');
1131 strncpy (p, namestring, n);
1145 if (msym.
minsym == NULL && filename != NULL)
1151 if (msym.
minsym == NULL && filename != NULL)
1166 _(
"function `%s' appears to be defined "
1167 "outside of all compilation units"),
1178 struct external_nlist *bufp = 0;
1179 struct internal_nlist nlist;
1187 int past_first_source_file = 0;
1191 int textlow_not_set;
1192 int data_sect_index;
1198 const char **psymtab_include_list;
1199 int includes_allocated;
1204 int dependencies_used, dependencies_allocated;
1211 file_string_table_offset = 0;
1212 next_file_string_table_offset = 0;
1218 includes_allocated = 30;
1220 psymtab_include_list = (
const char **) alloca (includes_allocated *
1221 sizeof (
const char *));
1223 dependencies_allocated = 30;
1224 dependencies_used = 0;
1237 symfile_bfd = objfile->
obfd;
1238 abfd = objfile->
obfd;
1239 symbuf_end = symbuf_idx = 0;
1241 textlow_not_set = 1;
1242 has_line_numbers = 0;
1265 if (data_sect_index == -1)
1267 if (data_sect_index == -1)
1280 if (symbuf_idx == symbuf_end)
1282 bufp = &
symbuf[symbuf_idx++];
1287 if (bfd_h_get_8 (abfd, bufp->e_type) == N_SLINE)
1289 has_line_numbers = 1;
1307 switch (nlist.n_type)
1313 case N_TEXT | N_EXT:
1314 case N_NBTEXT | N_EXT:
1317 case N_DATA | N_EXT:
1318 case N_NBDATA | N_EXT:
1323 case N_NBBSS | N_EXT:
1324 case N_SETV | N_EXT:
1332 nlist.n_type, objfile);
1349 if ((namestring[0] ==
'-' && namestring[1] ==
'l')
1350 || (namestring[(nsl = strlen (namestring)) - 1] ==
'o'
1351 && namestring[nsl - 2] ==
'.'))
1356 if (past_first_source_file && pst
1359 && nlist.n_value >= pst->
textlow)
1362 includes_used,
symnum * symbol_size,
1365 dependency_list, dependencies_used,
1369 dependencies_used = 0;
1370 has_line_numbers = 0;
1373 past_first_source_file = 1;
1382 case N_UNDF | N_EXT:
1402 past_first_source_file = 1;
1404 next_file_string_table_offset =
1405 file_string_table_offset + nlist.n_value;
1406 if (next_file_string_table_offset < file_string_table_offset)
1407 error (
_(
"string table offset backs up at %d"),
symnum);
1426 case N_INDR | N_EXT:
1428 case N_SETA | N_EXT:
1430 case N_SETT | N_EXT:
1432 case N_SETD | N_EXT:
1434 case N_SETB | N_EXT:
1445 static int prev_so_symnum = -10;
1446 static int first_so_symnum;
1448 static char *dirname_nso;
1449 int prev_textlow_not_set;
1454 prev_textlow_not_set = textlow_not_set;
1460 if (nlist.n_value == 0
1463 textlow_not_set = 1;
1467 textlow_not_set = 0;
1469 past_first_source_file = 1;
1471 if (prev_so_symnum !=
symnum - 1)
1473 first_so_symnum =
symnum;
1478 includes_used,
symnum * symbol_size,
1480 dependency_list, dependencies_used,
1481 prev_textlow_not_set);
1484 dependencies_used = 0;
1485 has_line_numbers = 0;
1496 if (*namestring ==
'\000')
1504 p = lbasename (namestring);
1505 if (p != namestring && *p ==
'\000')
1509 dirname_nso = namestring;
1521 first_so_symnum * symbol_size,
1548 psymtab_language = tmp_language;
1555 _(
"N_BINCL %s not in entries for "
1556 "any file, at symtab pos %d"),
1564 goto record_include_file;
1582 psymtab_language = tmp_language;
1594 if (pst && filename_cmp (namestring, pst->
filename) == 0)
1599 for (i = 0; i < includes_used; i++)
1600 if (filename_cmp (namestring, psymtab_include_list[i]) == 0)
1609 record_include_file:
1611 psymtab_include_list[includes_used++] = namestring;
1612 if (includes_used >= includes_allocated)
1614 const char **orig = psymtab_include_list;
1616 psymtab_include_list = (
const char **)
1617 alloca ((includes_allocated *= 2) *
sizeof (
const char *));
1618 memcpy (psymtab_include_list, orig,
1619 includes_used *
sizeof (
const char *));
1646 if (pst && nlist.n_type == N_FUN && *namestring ==
'\000')
1653 valu = nlist.n_value + last_function_start;
1659 p = (
char *) strchr (namestring,
':');
1667 char *new_name, *
name =
xmalloc (p - namestring + 1);
1668 memcpy (name, namestring, p - namestring);
1670 name[p - namestring] =
'\0';
1672 if (new_name != NULL)
1674 sym_len = strlen (new_name);
1684 sym_name = namestring;
1685 sym_len = p - namestring;
1708 psymtab_language, objfile);
1720 psymtab_language, objfile);
1730 if (p >= namestring + 2
1731 || (p == namestring + 1
1732 && namestring[0] !=
' '))
1738 psymtab_language, objfile);
1746 psymtab_language, objfile);
1753 if (p != namestring)
1759 psymtab_language, objfile);
1779 while ((*p >=
'0' && *p <=
'9')
1780 || *p ==
'(' || *p ==
',' || *p ==
')'
1802 while (*p && *p !=
';' && *p !=
',')
1808 if (*p ==
'\\' || (*p ==
'?' && p[1] ==
'\0'))
1813 for (q = p; *q && *q !=
':'; q++)
1820 0, psymtab_language, objfile);
1824 while (*p && *p !=
',')
1838 0, psymtab_language, objfile);
1844 int name_len = p - namestring;
1847 memcpy (name, namestring, name_len);
1848 name[name_len] =
'\0';
1855 last_function_name = namestring;
1872 if (minsym_valu != 0)
1873 nlist.n_value = minsym_valu;
1875 if (pst && textlow_not_set
1879 textlow_not_set = 0;
1885 last_function_start = nlist.n_value;
1893 || (nlist.n_value < pst->
textlow
1899 textlow_not_set = 0;
1905 psymtab_language, objfile);
1914 int name_len = p - namestring;
1917 memcpy (name, namestring, name_len);
1918 name[name_len] =
'\0';
1925 last_function_name = namestring;
1942 if (minsym_valu != 0)
1943 nlist.n_value = minsym_valu;
1945 if (pst && textlow_not_set
1949 textlow_not_set = 0;
1955 last_function_start = nlist.n_value;
1963 || (nlist.n_value < pst->
textlow
1969 textlow_not_set = 0;
1975 psymtab_language, objfile);
2016 _(
"unknown symbol descriptor `%c'"),
2037 if (needed_pst == pst)
2045 for (i = 0; i < dependencies_used; i++)
2046 if (dependency_list[i] == needed_pst)
2056 dependency_list[dependencies_used++] = needed_pst;
2057 if (dependencies_used >= dependencies_allocated)
2063 alloca ((dependencies_allocated *= 2)
2065 memcpy (dependency_list, orig,
2070 "Had to reallocate "
2071 "dependency list.\n");
2073 "New dependencies allocated: %d\n",
2074 dependencies_allocated);
2088 end_psymtab (objfile, pst, psymtab_include_list, includes_used,
2091 dependencies_used, textlow_not_set);
2094 dependencies_used = 0;
2095 has_line_numbers = 0;
2101 HANDLE_RBRAC (nlist.n_value);
2150 : lowest_text_address)
2153 end_psymtab (objfile, pst, psymtab_include_list, includes_used,
2156 dependency_list, dependencies_used, textlow_not_set);
2176 global_syms, static_syms);
2200 const char **include_list,
int num_includes,
2201 int capping_symbol_offset,
CORE_ADDR capping_text,
2202 struct partial_symtab **dependency_list,
int number_dependencies,
2203 int textlow_not_set)
2208 if (capping_symbol_offset != -1)
2227 if (pst->
texthigh == 0 && last_function_name
2234 p = strchr (last_function_name,
':');
2239 strncpy (p, last_function_name, n);
2243 if (minsym.
minsym == NULL)
2257 last_function_name = NULL;
2263 else if (textlow_not_set)
2298 if (number_dependencies)
2309 for (i = 0; i < num_includes; i++)
2341 if (num_includes == 0
2342 && number_dependencies == 0
2345 && has_line_numbers == 0)
2372 "Shouldn't happen.\n",
2425 "Shouldn't happen.\n",
2430 if (
LDSYMLEN (
self) || self->number_of_dependencies)
2442 sym_bfd = objfile->
obfd;
2479 struct external_nlist *bufp;
2480 struct internal_nlist nlist;
2482 unsigned max_symnum;
2496 dbxread_objfile = objfile;
2501 abfd = objfile->
obfd;
2502 symfile_bfd = objfile->
obfd;
2503 symbuf_end = symbuf_idx = 0;
2505 symbuf_left = sym_offset + sym_size;
2517 bufp = &
symbuf[symbuf_idx++];
2524 if (nlist.n_type == N_TEXT)
2526 const char *tempstring = namestring;
2532 if (tempstring[0] == bfd_get_symbol_leading_char (symfile_bfd))
2534 if (
startswith (tempstring,
"__gnu_compiled"))
2547 if (symbuf_idx == symbuf_end)
2550 if (bfd_h_get_8 (abfd, bufp->e_type) != N_SO)
2551 error (
_(
"First symbol in segment of executable not a source symbol"));
2560 if (symbuf_idx == symbuf_end)
2562 bufp = &
symbuf[symbuf_idx++];
2566 type = bfd_h_get_8 (abfd, bufp->e_type);
2572 if (
sizeof (nlist.n_value) > 4
2574 && (type == N_LSYM || type == N_PSYM))
2584 nlist.n_value = (nlist.n_value ^ 0x80000000) - 0x80000000;
2586 namestring, section_offsets, objfile);
2590 else if (type == N_TEXT)
2603 else if (type & N_EXT || type == (
unsigned char) N_TEXT
2604 || type == (
unsigned char) N_NBTEXT)
2636 dbxread_objfile = NULL;
2647 struct obstack *obstack)
2663 obstack_copy0 (obstack, name, prefix_len),
2706 static int sline_found_in_function = 1;
2710 static int n_opt_found;
2714 static int function_stab_type = 0;
2716 if (!block_address_function_relative)
2720 function_start_offset =
2741 if (*name ==
'\000')
2757 if (sline_found_in_function)
2759 CORE_ADDR addr = last_function_start + valu;
2779 if (block_address_function_relative)
2780 function_start_offset = 0;
2785 sline_found_in_function = 0;
2790 last_function_start = valu;
2792 goto define_a_symbol;
2799 if (n_opt_found && desc == 1)
2802 if (block_address_function_relative)
2804 valu += function_start_offset;
2818 if (n_opt_found && desc == 1)
2821 if (block_address_function_relative)
2823 valu += function_start_offset;
2836 if (desc != newobj->
depth)
2846 _(
"misplaced N_LBRAC entry; discarding local "
2847 "symbols which have no enclosing block"));
2867 _(
"block start larger than block end"));
2919 if (*name ==
'\000')
2922 if (block_address_function_relative)
2923 function_start_offset = 0;
2960 valu += function_start_offset;
2979 last_function_start : valu;
2983 sline_found_in_function = 1;
3024 if (!symfile_relocatable)
3026 p = strchr (name,
':');
3027 if (p != 0 && p[1] ==
'S')
3036 goto define_a_symbol;
3051 _(
"failed internal consistency check"));
3058 goto define_a_symbol;
3064 goto define_a_symbol;
3068 goto define_a_symbol;
3073 goto define_a_symbol;
3109 char *colon_pos = strchr (name,
':');
3111 if (colon_pos == NULL)
3114 deftype = colon_pos[1];
3120 function_stab_type =
type;
3125 && valu ==
ANOFFSET (section_offsets,
3139 if (minsym_valu != 0)
3143 if (block_address_function_relative)
3150 function_start_offset = valu;
3157 _(
"unmatched N_LBRAC before symtab pos %d"),
3251 ref_add (refnum, 0, name, valu);
3283 CORE_ADDR textaddr,
unsigned int textsize,
3285 file_ptr stabstroffset,
unsigned int stabstrsize)
3288 bfd *sym_bfd = objfile->
obfd;
3289 char *
name = bfd_get_filename (sym_bfd);
3291 unsigned int stabsize;
3300 #define COFF_STABS_SYMBOL_SIZE 12
3304 if (stabstrsize > bfd_get_size (sym_bfd))
3305 error (
_(
"ridiculous string table size: %d bytes"), stabstrsize);
3308 OBJSTAT (objfile, sz_strtab += stabstrsize + 1);
3312 val = bfd_seek (sym_bfd, stabstroffset,
SEEK_SET);
3315 val = bfd_bread (
DBX_STRINGTAB (objfile), stabstrsize, sym_bfd);
3316 if (val != stabstrsize)
3329 if (stabsects->
next == NULL)
3331 stabsize = bfd_section_size (sym_bfd, stabsects->
section);
3340 for (stabsect = stabsects; stabsect != NULL; stabsect = stabsect->
next)
3342 stabsize = bfd_section_size (sym_bfd, stabsect->
section);
3348 symbuf_sections = stabsects->
next;
3349 symbuf_left = bfd_section_size (sym_bfd, stabsects->
section);
3374 file_ptr stabstroffset,
unsigned int stabstrsize)
3377 bfd *sym_bfd = objfile->
obfd;
3378 char *
name = bfd_get_filename (sym_bfd);
3390 #define ELF_STABS_SYMBOL_SIZE 12
3398 if (stabstrsize > bfd_get_size (sym_bfd))
3399 error (
_(
"ridiculous string table size: %d bytes"), stabstrsize);
3402 OBJSTAT (objfile, sz_strtab += stabstrsize + 1);
3406 val = bfd_seek (sym_bfd, stabstroffset,
SEEK_SET);
3409 val = bfd_bread (
DBX_STRINGTAB (objfile), stabstrsize, sym_bfd);
3410 if (val != stabstrsize)
3421 symbuf_left = bfd_section_size (objfile->
obfd, stabsect);
3455 char *stabstr_name,
char *text_name)
3458 bfd *sym_bfd = objfile->
obfd;
3459 char *
name = bfd_get_filename (sym_bfd);
3461 asection *stabstrsect;
3462 asection *text_sect;
3465 stabsect = bfd_get_section_by_name (sym_bfd, stab_name);
3466 stabstrsect = bfd_get_section_by_name (sym_bfd, stabstr_name);
3472 error (
_(
"stabsect_build_psymtabs: Found stabs (%s), "
3473 "but not string section (%s)"),
3474 stab_name, stabstr_name);
3477 set_objfile_data (objfile, dbx_objfile_data_key, dbx);
3479 text_sect = bfd_get_section_by_name (sym_bfd, text_name);
3481 error (
_(
"Can't find %s section in symbol file"), text_name);
3482 DBX_TEXT_ADDR (objfile) = bfd_section_vma (sym_bfd, text_sect);
3483 DBX_TEXT_SIZE (objfile) = bfd_section_size (sym_bfd, text_sect);
3486 DBX_SYMCOUNT (objfile) = bfd_section_size (sym_bfd, stabsect)
3494 error (
_(
"ridiculous string table size: %d bytes"),
3503 val = bfd_get_section_contents (sym_bfd,
3544 dbx_objfile_data_key
#define ELF_STABS_SYMBOL_SIZE
#define ALL_OBJFILE_PSYMTABS(objfile, p)
struct psymbol_allocation_list static_psymbols
bfd_byte * symfile_relocate_debug_section(struct objfile *objfile, asection *sectp, bfd_byte *buf)
static int block_address_function_relative
void discard_psymtab(struct objfile *, struct partial_symtab *)
void free_header_files(void)
char * hex_string(LONGEST num)
static void do_free_bincl_list_cleanup(void *objfile)
#define SYMBOL_TABLE_OFFSET
static unsigned symbol_size
void stabsread_new_init(void)
static unsigned int file_string_table_offset
static void record_minimal_symbol(const char *, CORE_ADDR, int, struct objfile *)
void common_block_end(struct objfile *objfile)
#define SECT_OFF_TEXT(objfile)
static struct header_file_location * bincl_list
#define GCC2_COMPILED_FLAG_SYMBOL
void coffstab_build_psymtabs(struct objfile *objfile, CORE_ADDR textaddr, unsigned int textsize, struct stab_section_list *stabsects, file_ptr stabstroffset, unsigned int stabstrsize)
static unsigned symbol_table_offset
EXTERN unsigned char processing_gcc_compilation
static void find_text_range(bfd *sym_bfd, struct objfile *objfile)
#define BMSYMBOL_VALUE_ADDRESS(symbol)
struct psymbol_allocation_list global_psymbols
static void free_bincl_list(struct objfile *)
void prim_record_minimal_symbol(const char *name, CORE_ADDR address, enum minimal_symbol_type ms_type, struct objfile *objfile)
void set_last_source_file(const char *name)
struct ui_file * gdb_stdout
struct compunit_symtab * end_symtab(CORE_ADDR end_addr, int section)
void internal_error(const char *file, int line, const char *fmt,...)
void add_symtab_fns(enum bfd_flavour flavour, const struct sym_fns *sf)
static int has_line_numbers
static void read_dbx_symtab(struct objfile *)
struct symfile_segment_data * default_symfile_segments(bfd *abfd)
void set_objfile_main_name(struct objfile *objfile, const char *name, enum language lang)
static int symfile_relocatable
struct minimal_symbol * prim_record_minimal_symbol_and_info(const char *name, CORE_ADDR address, enum minimal_symbol_type ms_type, int section, struct objfile *objfile)
static char * set_namestring(struct objfile *objfile, const struct internal_nlist *nlist)
#define DBX_STRINGTAB_SIZE(o)
EXTERN int context_stack_depth
#define DBX_BSS_SECTION(o)
#define SECT_OFF_RODATA(objfile)
static void dbx_symfile_init(struct objfile *)
void free_pending_blocks(void)
static enum language psymtab_language
static void add_old_header_file(char *, int)
void printf_filtered(const char *format,...)
static void add_this_object_header_file(int)
static struct partial_symtab * find_corresponding_bincl_psymtab(char *, int)
static void dbx_read_symtab(struct partial_symtab *self, struct objfile *objfile)
void _initialize_dbxread(void)
void stabsect_build_psymtabs(struct objfile *objfile, char *stab_name, char *stabstr_name, char *text_name)
EXTERN struct subfile * current_subfile
static struct header_file_location * next_bincl
#define COFF_STABS_SYMBOL_SIZE
struct obstack objfile_obstack
void null_cleanup(void *arg)
static void read_ofile_symtab(struct objfile *, struct partial_symtab *)
void common_block_start(char *name, struct objfile *objfile)
bfd_byte * default_symfile_relocate(struct objfile *objfile, asection *sectp, bfd_byte *buf)
EXTERN unsigned int symnum
static void lbrac_mismatch_complaint(int arg1)
void block_set_scope(struct block *block, const char *scope, struct obstack *obstack)
static struct objfile * dbxread_objfile
CORE_ADDR gdbarch_addr_bits_remove(struct gdbarch *gdbarch, CORE_ADDR addr)
struct pending_block * old_blocks
#define STRING_TABLE_OFFSET
static unsigned int symbuf_left
#define SYMBOL_DEMANGLED_NAME(symbol)
struct stab_section_list * next
void patch_subfile_names(struct subfile *subfile, char *name)
struct partial_symbol ** next
void scan_file_globals(struct objfile *objfile)
#define DBX_STAB_SECTION(o)
void init_psymbol_list(struct objfile *, int)
static void fill_symbuf(bfd *)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
struct partial_symtab * start_psymtab_common(struct objfile *, const char *, CORE_ADDR, struct partial_symbol **, struct partial_symbol **)
static struct cleanup * make_cleanup_free_bincl_list(struct objfile *objfile)
void fputs_filtered(const char *linebuffer, struct ui_file *stream)
static void stabs_seek(int sym_offset)
static bfd_byte * stabs_data
#define SECT_OFF_DATA(objfile)
void free_current_contents(void *ptr)
#define MSYMBOL_SIZE(msymbol)
static void read_dbx_dynamic_symtab(struct objfile *objfile)
void buildsym_new_init(void)
void complaint(struct complaints **complaints, const char *fmt,...)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
int is_vtable_name(const char *name)
#define ANOFFSET(secoff, whichone)
struct gdbarch * get_objfile_arch(const struct objfile *objfile)
EXTERN struct pending * local_symbols
EXTERN int n_allocated_this_object_header_files
static void repeated_header_complaint(const char *arg1, int arg2)
struct header_file * header_files
#define next_symbol_text(objfile)
struct symbol * define_symbol(CORE_ADDR valu, char *string, int desc, int type, struct objfile *objfile)
struct context_stack * pop_context(void)
const char * get_last_source_file(void)
static void dbx_free_symfile_info(struct objfile *objfile, void *arg)
static void add_bincl_to_list(struct partial_symtab *, char *, int)
static unsigned string_table_offset
EXTERN int previous_stab_code
static int startswith(const char *string, const char *pattern)
#define N_ALLOCATED_HEADER_FILES(OBJFILE)
struct cleanup * make_cleanup_discard_minimal_symbols(void)
int gdbarch_sofun_address_maybe_missing(struct gdbarch *gdbarch)
#define DBX_TEXT_SECTION(o)
static char * last_function_name
void wrap_here(char *indent)
int number_of_dependencies
static void dbx_symfile_finish(struct objfile *)
static char * dbx_next_symbol_text(struct objfile *)
#define DBX_SYMBOL_SIZE(o)
char * cp_canonicalize_string(const char *string)
const char * objfile_name(const struct objfile *objfile)
#define DBX_STRINGTAB_SIZE_SIZE
struct compunit_symtab * start_symtab(struct objfile *objfile, const char *name, const char *comp_dir, CORE_ADDR start_addr)
#define N_HEADER_FILES(OBJFILE)
void * read_symtab_private
EXTERN int n_this_object_header_files
struct partial_symtab * allocate_psymtab(const char *, struct objfile *) ATTRIBUTE_NONNULL(1)
void init_minimal_symbol_collection(void)
void add_psymbol_to_list(const char *, int, int, domain_enum, enum address_class, struct psymbol_allocation_list *, long, CORE_ADDR, enum language, struct objfile *)
PTR xrealloc(PTR ptr, size_t size)
static unsigned int next_file_string_table_offset
const char const char int
void sort_pst_symbols(struct objfile *, struct partial_symtab *)
#define DBX_SYMTAB_OFFSET(o)
static CORE_ADDR lowest_text_address
void void void void void void void void void perror_with_name(const char *string) ATTRIBUTE_NORETURN
static char * stringtab_global
#define DBX_SYMFILE_INFO(o)
static void dbx_psymtab_to_symtab_1(struct objfile *, struct partial_symtab *)
enum language deduce_language_from_filename(const char *filename)
void ref_add(int refnum, struct symbol *sym, char *stabs, CORE_ADDR value)
#define GCC_COMPILED_FLAG_SYMBOL
#define HEADER_FILES(OBJFILE)
struct partial_symtab * 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)
struct partial_symtab ** dependencies
int symbol_reference_defined(char **string)
struct ui_file * gdb_stderr
void record_debugformat(const char *format)
struct complaints * symfile_complaints
#define INTERNALIZE_SYMBOL(intern, extern, abfd)
struct minimal_symbol * minsym
const char * gdbarch_static_transform_name(struct gdbarch *gdbarch, const char *name)
const struct quick_symbol_functions psym_functions
void really_free_pendings(void *dummy)
#define OBJSTAT(objfile, expr)
EXTERN int * this_object_header_files
record_line_ftype record_line
EXTERN CORE_ADDR last_source_start_addr
#define SYMBOL_LANGUAGE(symbol)
static void cp_set_block_scope(const struct symbol *symbol, struct block *block, struct obstack *obstack)
void default_symfile_offsets(struct objfile *objfile, const struct section_addr_info *addrs)
static struct external_nlist symbuf[4096]
void start_subfile(const char *name)
static struct stab_section_list * symbuf_sections
struct partial_symbol ** list
static void init_bincl_list(int, struct objfile *)
static void unknown_symtype_complaint(const char *arg1)
void(* read_symtab)(struct partial_symtab *, struct objfile *)
static void dbx_new_init(struct objfile *)
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
static unsigned int symbuf_read
EXTERN char *(* next_symbol_text_func)(struct objfile *)
static struct partial_symtab * start_psymtab(struct objfile *, char *, CORE_ADDR, int, struct partial_symbol **, struct partial_symbol **)
void elfstab_build_psymtabs(struct objfile *objfile, asection *stabsect, file_ptr stabstroffset, unsigned int stabstrsize)
static void function_outside_compilation_unit_complaint(const char *arg1)
const struct objfile_data * dbx_objfile_data_key
struct context_stack * push_context(int desc, CORE_ADDR valu)
static int bincls_allocated
#define SECT_OFF_BSS(objfile)
void stabsread_init(void)
static void add_new_header_file(char *, int)
static void dbx_symfile_read(struct objfile *, int)
struct compunit_symtab * compunit_symtab
struct section_offsets * section_offsets
void gdb_flush(struct ui_file *file)
void process_one_symbol(int type, int desc, CORE_ADDR valu, char *name, const struct section_offsets *section_offsets, struct objfile *objfile)
int gdbarch_static_transform_name_p(struct gdbarch *gdbarch)
EXTERN int within_function
void install_minimal_symbols(struct objfile *objfile)
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
EXTERN unsigned char processing_acc_compilation
unsigned int cp_entire_prefix_len(const char *name)
void error(const char *fmt,...)
struct symbol * ref_search(int refnum)
#define FILE_STRING_OFFSET(p)
#define DBX_DATA_SECTION(o)
void init_header_files(void)
void do_cleanups(struct cleanup *old_chain)
struct block * finish_block(struct symbol *symbol, struct pending **listhead, struct pending_block *old_blocks, CORE_ADDR start, CORE_ADDR end)
static CORE_ADDR find_stab_function_addr(char *namestring, const char *filename, struct objfile *objfile)