46 #include "filenames.h" 63 #include "coff/ecoff.h" 66 #include "aout/aout64.h" 67 #include "aout/stab_gnu.h" 75 #define ECOFF_IN_ELF(bfd) (bfd_get_flavour (bfd) == bfd_target_elf_flavour \ 76 && bfd_get_section_by_name (bfd, ".mdebug") != NULL) 103 #define PST_PRIVATE(p) ((struct symloc *)(p)->read_symtab_private) 104 #define FDR_IDX(p) (PST_PRIVATE(p)->fdr_idx) 105 #define CUR_BFD(p) (PST_PRIVATE(p)->cur_bfd) 106 #define DEBUG_SWAP(p) (PST_PRIVATE(p)->debug_swap) 107 #define DEBUG_INFO(p) (PST_PRIVATE(p)->debug_info) 108 #define PENDING_LIST(p) (PST_PRIVATE(p)->pending_list) 110 #define SC_IS_TEXT(sc) ((sc) == scText \ 111 || (sc) == scRConst \ 114 #define SC_IS_DATA(sc) ((sc) == scData \ 119 #define SC_IS_COMMON(sc) ((sc) == scCommon || (sc) == scSCommon) 120 #define SC_IS_BSS(sc) ((sc) == scBss) 121 #define SC_IS_SBSS(sc) ((sc) == scSBss) 122 #define SC_IS_UNDEF(sc) ((sc) == scUndefined || (sc) == scSUndefined) 148 _(
"guessed tag type of %s incorrectly"), arg1);
168 #define MIN_GLEVEL GLEVEL_0 169 #define compare_glevel(a,b) \ 170 (((a) == GLEVEL_3) ? ((b) < GLEVEL_3) : \ 171 ((b) == GLEVEL_3) ? -1 : (int)((b) - (a))) 229 const char **,
int,
const char *);
245 static struct type *
parse_type (
int,
union aux_ext *,
unsigned int,
int *,
327 return "<stripped file>";
340 const struct ecoff_debug_swap *swap,
341 struct ecoff_debug_info *info)
353 if (info->fdr == (FDR *) NULL)
360 (info->symbolic_header.ifdMax
362 fdr_src = (
char *) info->external_fdr;
364 + info->symbolic_header.ifdMax * swap->external_fdr_size);
366 for (; fdr_src < fdr_end; fdr_src += swap->external_fdr_size, fdr_ptr++)
367 (*swap->swap_fdr_in) (
objfile->
obfd, fdr_src, fdr_ptr);
379 "debugging support is limited.\n"),
382 "-g3 for best debugging support.\n"));
528 _(
"bad register number %d (max %d) in symbol %s"),
529 regnum, num_regs - 1, sym);
574 struct symbol *s,
int aclass_index,
struct block *b,
583 || sh->sc == scNil || sh->index == indexNil)
595 const bfd_size_type external_sym_size =
debug_swap->external_sym_size;
596 void (*
const swap_sym_in) (bfd *,
void *, SYMR *) =
debug_swap->swap_sym_in;
605 long svalue = sh->value;
608 if (ext_sh == (
char *) NULL)
622 if (sh->st != stEnd && sh->st != stBlock)
672 if (sh->sc == scRegister)
734 if (sh->st == stProc && sh->sc != scText)
736 char *ext_tsym = ext_sh;
737 int keep_counting = 1;
740 while (keep_counting)
742 ext_tsym += external_sym_size;
743 (*swap_sym_in) (
cur_bfd, ext_tsym, &tsym);
754 _(
"unknown symbol type 0x%x"), sh->st);
769 if (strcmp (
name,
"malloc") == 0
785 if (sh->st == stProc)
843 goto structured_common;
847 goto structured_common;
851 goto structured_common;
855 goto case_stBlock_code;
870 for (ext_tsym = ext_sh + external_sym_size;
872 ext_tsym += external_sym_size)
876 (*swap_sym_in) (
cur_bfd, ext_tsym, &tsym);
898 if (tsym.iss == issNull
914 if (tsym.index == indexNil
915 || (tsym.index == 0 && sh->value == 0))
920 &ax[tsym.index].a_ti,
922 if ((tir.bt == btNil || tir.bt == btVoid
923 || (tir.bt == btEnum && sh->value == 0))
929 if (tsym.value > max_value)
930 max_value = tsym.value;
941 if (tsym.sc == scVariant);
950 + ((
cur_fdr->isymBase + tsym.index - 1)
951 * external_sym_size));
972 _(
"declaration block contains " 973 "unhandled symbol type %d"),
1014 if (nfields > 1 && max_value == 0)
1033 if (sh->iss == 0 ||
name[0] ==
'.' ||
name[0] ==
'\0')
1037 name, (
char *) NULL);
1044 nfields *
sizeof (
struct field)));
1048 int unsigned_enum = 1;
1063 for (ext_tsym = ext_sh + external_sym_size;
1065 ext_tsym += external_sym_size)
1070 (*swap_sym_in) (
cur_bfd, ext_tsym, &tsym);
1072 if (tsym.st != stMember)
1158 else if (sh->sc == scText &&
1183 e->
pdr.framereg = -1;
1220 if (iparams == nparams)
1254 _(
"stEnd with storage class %d not handled"), sh->sc);
1377 static struct type *
1381 struct type **map_bt
1391 btMax,
struct type *);
1528 static struct type *
1529 parse_type (
int fd,
union aux_ext *ax,
unsigned int aux_index,
int *bs,
1530 int bigend,
const char *sym_name)
1533 struct type *tp = 0;
1537 if (aux_index == indexNil)
1541 if (aux_index >= (
debug_info->fdr + fd)->caux)
1549 (*
debug_swap->swap_tir_in) (bigend, &ax->a_ti, t);
1592 int width = AUX_GET_WIDTH (bigend, ax);
1595 if (bs == (
int *) NULL)
1600 if (t->bt == btShort && width == 8)
1602 else if (t->bt == btUShort && width == 8)
1604 else if (t->bt == btEnum)
1608 _(
"can't handle TIR fBitfield for %s"),
1618 if (t->bt == btIndirect)
1625 (*
debug_swap->swap_rndx_in) (bigend, &ax->a_rndx, rn);
1627 if (rn->rfd == 0xfff)
1629 rf = AUX_GET_ISYM (bigend, ax);
1638 _(
"unable to cross ref btIndirect for %s"), sym_name);
1644 rn->index, (
int *) NULL, xref_fh->fBigendian, sym_name);
1650 if (t->bt == btStruct ||
1662 if (tp == (
struct type *) NULL)
1701 if (
name[0] ==
'.' ||
name[0] ==
'\0')
1716 if (t->bt == btRange)
1722 if (tp == (
struct type *) NULL)
1749 if (t->bt == btTypedef)
1755 if (tp == (
struct type *) NULL)
1758 _(
"unable to cross ref btTypedef for %s"), sym_name);
1764 if (t->bt == btRange)
1780 #define PARSE_TQ(tq) \ 1781 if (t->tq != tqNil) \ 1782 ax += upgrade_type(fd, &tp, t->tq, ax, bigend, sym_name); \ 1798 (*
debug_swap->swap_tir_in) (bigend, &ax->a_ti, t);
1805 _(
"illegal TIR continued for %s"), sym_name);
1819 const char *sym_name)
1848 (*
debug_swap->swap_rndx_in) (bigend, &ax->a_rndx, &rndx);
1854 rf = AUX_GET_ISYM (bigend, ax);
1861 id, (
int *) NULL, bigend, sym_name);
1868 _(
"illegal array index type for %s, assuming int"),
1875 lower = AUX_GET_DNLOW (bigend, ax);
1877 upper = AUX_GET_DNHIGH (bigend, ax);
1879 rf = AUX_GET_WIDTH (bigend, ax);
1938 const struct block *b;
1949 _(
"can't handle PDR for static proc at 0x%lx"),
1950 (
unsigned long) pr->adr);
1973 + ((
cur_fdr->isymBase + pr->isym)
1979 if (search_symtab != NULL)
2095 if (es->ifd != ifdNil)
2108 if (
SC_IS_UNDEF (es->asym.sc) || es->asym.sc == scNil)
2111 switch (es->asym.st)
2143 switch (es->asym.st)
2187 unsigned char *base;
2189 int delta, count, lineno = 0;
2191 if (fh->cbLine == 0)
2196 for (j = 0; j < fh->cpd; j++, pr++)
2200 unsigned char *halt;
2203 if (pr->iline == ilineNil ||
2204 pr->lnLow == -1 || pr->lnHigh == -1)
2210 if (j != (fh->cpd - 1))
2211 halt = base + pr[1].cbLineOffset;
2213 halt = base + fh->cbLine;
2214 base += pr->cbLineOffset;
2216 adr = pst->
textlow + pr->adr - lowest_pdr_addr;
2219 for (lineno = pr->lnLow; base < halt;)
2221 count = *base & 0x0f;
2222 delta = *base++ >> 4;
2227 delta = (base[0] << 8) | base[1];
2228 if (delta >= 0x8000)
2236 if (lt->
nitems >= maxlines)
2239 _(
"guessed size of linetable for %s incorrectly"),
2253 _(
"function `%s' appears to be defined " 2254 "outside of all compilation units"),
2269 switch (storage_class)
2330 const bfd_size_type external_sym_size =
debug_swap->external_sym_size;
2331 const bfd_size_type external_rfd_size =
debug_swap->external_rfd_size;
2332 const bfd_size_type external_ext_size =
debug_swap->external_ext_size;
2333 void (*
const swap_ext_in) (bfd *,
void *, EXTR *) =
debug_swap->swap_ext_in;
2334 void (*
const swap_sym_in) (bfd *,
void *, SYMR *) =
debug_swap->swap_sym_in;
2335 void (*
const swap_rfd_in) (bfd *,
void *, RFDT *) =
debug_swap->swap_rfd_in;
2347 int textlow_not_set = 1;
2350 const char **psymtab_include_list;
2351 int includes_allocated;
2357 int dependencies_used, dependencies_allocated;
2361 asection *text_sect;
2362 int relocatable = 0;
2370 text_sect = bfd_get_section_by_name (
cur_bfd,
".text");
2371 if (text_sect != NULL
2372 && (bfd_get_section_flags (
cur_bfd, text_sect) & SEC_RELOC))
2376 sizeof (EXTR) * hdr->iextMax);
2378 includes_allocated = 30;
2380 psymtab_include_list = (
const char **) alloca (includes_allocated *
2381 sizeof (
const char *));
2384 dependencies_allocated = 30;
2385 dependencies_used = 0;
2413 fdr_to_pst[-1].pst = pst;
2426 ext_block =
XNEWVEC (EXTR, hdr->iextMax);
2430 ext_out_end = ext_out + hdr->iextMax * external_ext_size;
2432 for (; ext_out < ext_out_end; ext_out += external_ext_size, ext_in++)
2433 (*swap_ext_in) (
cur_bfd, ext_out, ext_in);
2437 ext_in_end = ext_in + hdr->iextMax;
2438 for (; ext_in < ext_in_end; ext_in++)
2441 if (ext_in->ifd >= -1
2442 && ext_in->ifd < hdr->ifdMax
2443 && ext_in->asym.iss >= 0
2444 && ext_in->asym.iss < hdr->issExtMax)
2445 fdr_to_pst[ext_in->ifd].n_globals++;
2450 for (f_idx = -1; f_idx < hdr->ifdMax; f_idx++)
2452 fdr_to_pst[f_idx].globals_offset = s_idx;
2453 s_idx += fdr_to_pst[f_idx].n_globals;
2454 fdr_to_pst[f_idx].n_globals = 0;
2490 ext_in_end = ext_in + hdr->iextMax;
2491 for (; ext_in < ext_in_end; ext_in++)
2498 if (ext_in->ifd < -1 || ext_in->ifd >= hdr->ifdMax)
2501 _(
"bad ifd for external symbol: %d (max %ld)"),
2502 ext_in->ifd, hdr->ifdMax);
2505 if (ext_in->asym.iss < 0 || ext_in->asym.iss >= hdr->issExtMax)
2508 _(
"bad iss for external symbol: %ld (max %ld)"),
2509 ext_in->asym.iss, hdr->issExtMax);
2513 extern_tab[fdr_to_pst[ext_in->ifd].globals_offset
2514 + fdr_to_pst[ext_in->ifd].n_globals++] = *ext_in;
2517 if (
SC_IS_UNDEF (ext_in->asym.sc) || ext_in->asym.sc == scNil)
2525 switch (ext_in->asym.st)
2604 if (sbss_sect_index == -1)
2632 for (f_idx = 0; f_idx < hdr->ifdMax; f_idx++)
2642 fdr_to_pst[f_idx].pst = NULL;
2651 if (relocatable ||
textlow != 0)
2664 memset (pst->read_symtab_private, 0, sizeof (
struct symloc));
2691 case langCplusplusV2:
2702 pst->texthigh = pst->textlow;
2715 + (fh->isymBase + 1) * external_sym_size),
2717 if (strcmp (
debug_info->ss + fh->issBase + sh.iss,
2727 const char *namestring;
2731 + (fh->isymBase +
cur_sdx) * external_sym_size),
2733 type_code = ECOFF_UNMARK_STAB (sh.index);
2734 if (!ECOFF_IS_STAB (&sh))
2736 if (sh.st == stProc || sh.st == stStaticProc)
2741 if (sh.st == stStaticProc)
2743 namestring =
debug_info->ss + fh->issBase + sh.iss;
2750 procaddr = sh.value;
2752 isym = AUX_GET_ISYM (fh->fBigendian,
2758 + ((fh->isymBase + isym - 1)
2759 * external_sym_size)),
2767 && (pst->textlow == 0 || procaddr < pst->
textlow))
2768 pst->textlow = procaddr;
2769 if (high > pst->texthigh)
2770 pst->texthigh = high;
2773 else if (sh.st == stStatic)
2788 namestring =
debug_info->ss + fh->issBase + sh.iss;
2799 namestring =
debug_info->ss + fh->issBase + sh.iss;
2812 char *stabstring =
debug_info->ss + fh->issBase + sh.iss;
2813 int len = strlen (stabstring);
2815 while (stabstring[len - 1] ==
'\\')
2818 char *stabstring1 = stabstring;
2830 * external_sym_size),
2832 stabstring2 =
debug_info->ss + fh->issBase + sh2.iss;
2833 len2 = strlen (stabstring2);
2837 && stabstring !=
debug_info->ss + fh->issBase + sh.iss)
2839 = (
char *)
xrealloc (stabstring, len + len2 + 1);
2842 stabstring = (
char *)
xmalloc (len + len2 + 1);
2843 strcpy (stabstring, stabstring1);
2845 strcpy (stabstring + len, stabstring2);
2855 case N_TEXT | N_EXT:
2856 case N_NBTEXT | N_EXT:
2861 case N_DATA | N_EXT:
2862 case N_NBDATA | N_EXT:
2869 case N_NBBSS | N_EXT:
2870 case N_SETV | N_EXT:
2899 case N_UNDF | N_EXT:
2918 case N_INDR | N_EXT:
2920 case N_SETA | N_EXT:
2922 case N_SETT | N_EXT:
2924 case N_SETD | N_EXT:
2926 case N_SETB | N_EXT:
2936 static int prev_so_symnum = -10;
2945 textlow_not_set = 1;
2947 textlow_not_set = 0;
2949 if (prev_so_symnum !=
symnum - 1)
2955 dependencies_used = 0;
2965 namestring = stabstring;
2969 if (*namestring ==
'\000')
2977 p = lbasename (namestring);
2978 if (p != namestring && *p ==
'\000')
3002 namestring = stabstring;
3029 if (pst && filename_cmp (namestring, pst->filename) == 0)
3035 for (i = 0; i < includes_used; i++)
3036 if (filename_cmp (namestring,
3037 psymtab_include_list[i]) == 0)
3046 psymtab_include_list[includes_used++] = namestring;
3047 if (includes_used >= includes_allocated)
3049 const char **orig = psymtab_include_list;
3051 psymtab_include_list = (
const char **)
3052 alloca ((includes_allocated *= 2) *
3053 sizeof (
const char *));
3054 memcpy (psymtab_include_list, orig,
3055 includes_used *
sizeof (
const char *));
3079 namestring = stabstring;
3080 p = (
char *) strchr (namestring,
':');
3130 if (p >= namestring + 2
3131 || (p == namestring + 1
3132 && namestring[0] !=
' '))
3152 if (p != namestring)
3179 while ((*p >=
'0' && *p <=
'9')
3180 || *p ==
'(' || *p ==
',' || *p ==
')' 3203 while (*p && *p !=
';' && *p !=
',')
3209 if (*p ==
'\\' || (*p ==
'?' && p[1] ==
'\0'))
3214 for (q = p; *q && *q !=
':'; q++)
3227 while (*p && *p !=
',')
3246 int name_len = p - namestring;
3249 memcpy (
name, namestring, name_len);
3250 name[name_len] =
'\0';
3270 int name_len = p - namestring;
3273 memcpy (
name, namestring, name_len);
3274 name[name_len] =
'\0';
3328 _(
"unknown symbol descriptor `%c'"), p[1]);
3349 dependencies_used = 0;
3393 _(
"unknown symbol type %s"),
3398 && stabstring !=
debug_info->ss + fh->issBase + sh.iss)
3415 * external_sym_size)),
3418 if (ECOFF_IS_STAB (&sh))
3426 || (sh.index == indexNil
3427 && (sh.st != stStatic || sh.sc == scAbs)))
3436 minsym_value = sh.value;
3478 if (sh.index >= hdr->iauxMax)
3486 new_sdx = AUX_GET_ISYM (fh->fBigendian,
3495 _(
"bad proc end in aux found from symbol %s"),
3507 if (sh.st == stProc && sh.sc != scText)
3521 if (sh.st == stProc)
3532 procaddr = sh.value;
3537 + ((fh->isymBase +
cur_sdx - 1)
3538 * external_sym_size)),
3545 && (pst->textlow == 0 || procaddr < pst->
textlow))
3546 pst->textlow = procaddr;
3548 high = procaddr + sh.value;
3549 if (high > pst->texthigh)
3550 pst->texthigh = high;
3587 if ((sh.sc == scInfo
3605 _(
"bad aux index at block symbol %s"),
name);
3641 ext_ptr = &extern_tab[fdr_to_pst[f_idx].globals_offset];
3642 cur_sdx = fdr_to_pst[f_idx].n_globals;
3654 _(
"failed internal consistency check"));
3661 svalue = psh->value;
3721 fdr_to_pst[f_idx].pst
3723 psymtab_include_list, includes_used,
3725 dependency_list, dependencies_used,
3728 dependencies_used = 0;
3741 save_pst = fdr_to_pst[f_idx].pst;
3742 if (save_pst != NULL
3749 && save_pst->
textlow >= pst->textlow
3750 && save_pst->
textlow < pst->texthigh
3751 && save_pst->
texthigh > pst->texthigh)
3761 for (f_idx = 0; f_idx < hdr->ifdMax; f_idx++)
3764 pst = fdr_to_pst[f_idx].pst;
3775 pst->number_of_dependencies = 0;
3781 for (s_idx = 1; s_idx < fh->crfd; s_idx++)
3787 + (fh->rfdBase + s_idx) * external_rfd_size),
3789 if (rh < 0 || rh >= hdr->ifdMax)
3802 pst->dependencies[pst->number_of_dependencies++]
3803 = fdr_to_pst[rh].pst;
3824 const bfd_size_type external_sym_size =
debug_swap->external_sym_size;
3825 void (*
const swap_sym_in) (bfd *,
void *, SYMR *) =
debug_swap->swap_sym_in;
3826 char *ext_sym = ((
char *)
debug_info->external_sym
3827 + ((fh->isymBase +
cur_sdx + 1) * external_sym_size));
3844 (*swap_sym_in) (
cur_bfd, ext_sym, &sh);
3845 if (sh.st != stMember)
3848 if (sh.index == indexNil
3849 || (sh.index == 0 && svalue == 0))
3853 + fh->iauxBase + sh.index)->a_ti,
3855 if ((tir.bt != btNil
3857 && (tir.bt != btEnum || svalue != 0))
3858 || tir.tq0 != tqNil)
3870 (*swap_sym_in) (
cur_bfd, ext_sym, &sh);
3871 if (sh.st != stMember)
3881 ext_sym += external_sym_size;
3915 bfd_size_type external_sym_size;
3916 bfd_size_type external_pdr_size;
3917 void (*swap_sym_in) (bfd *,
void *, SYMR *);
3918 void (*swap_pdr_in) (bfd *,
void *, PDR *);
3924 int last_symtab_ended = 0;
3967 external_sym_size =
debug_swap->external_sym_size;
3968 external_pdr_size =
debug_swap->external_pdr_size;
3980 if (fh != (FDR *) NULL && fh->csym >= 2)
3986 + (fh->isymBase + 1) * external_sym_size),
3988 if (strcmp (
debug_info->ss + fh->issBase + sh.iss,
4018 + (fh->isymBase +
cur_sdx) * external_sym_size),
4023 if (ECOFF_IS_STAB (&sh) || (
name[0] ==
'#'))
4025 int type_code = ECOFF_UNMARK_STAB (sh.index);
4048 last_symtab_ended = 1;
4052 last_symtab_ended = 0;
4058 else if (
name[0] ==
'#')
4078 e->
pdr.framereg = -1;
4082 else if (sh.st == stLabel)
4084 if (sh.index == indexNil)
4099 else if (sh.st == stProc || sh.st == stStaticProc
4100 || sh.st == stStatic || sh.st == stEnd)
4105 _(
"unknown stabs symbol %s"),
name);
4108 if (! last_symtab_ended)
4130 pr_block =
XNEWVEC (PDR, fh->cpd);
4134 + fh->ipdFirst * external_pdr_size);
4135 pdr_end = pdr_ptr + fh->cpd * external_pdr_size;
4139 pdr_ptr += external_pdr_size, pdr_in++)
4141 (*swap_pdr_in) (
cur_bfd, pdr_ptr, pdr_in);
4145 if (pdr_in == pr_block)
4146 lowest_pdr_addr = pdr_in->adr;
4147 else if (pdr_in->adr < lowest_pdr_addr)
4148 lowest_pdr_addr = pdr_in->adr;
4152 pdr_in_end = pdr_in + fh->cpd;
4153 for (; pdr_in < pdr_in_end; pdr_in++)
4173 maxlines = 2 * fh->cline;
4206 + fh->isymBase * external_sym_size);
4207 sym_end = sym_ptr + fh->csym * external_sym_size;
4208 while (sym_ptr < sym_end)
4213 (*swap_sym_in) (
cur_bfd, sym_ptr, &sh);
4216 sym_ptr, fh->fBigendian,
4218 sym_ptr += c * external_sym_size;
4233 pr_block =
XNEWVEC (PDR, fh->cpd);
4238 + fh->ipdFirst * external_pdr_size);
4239 pdr_end = pdr_ptr + fh->cpd * external_pdr_size;
4243 pdr_ptr += external_pdr_size, pdr_in++)
4245 (*swap_pdr_in) (
cur_bfd, pdr_ptr, pdr_in);
4249 if (pdr_in == pr_block)
4250 lowest_pdr_addr = pdr_in->adr;
4251 else if (pdr_in->adr < lowest_pdr_addr)
4252 lowest_pdr_addr = pdr_in->adr;
4256 pst, lowest_pdr_addr);
4257 if (lines->
nitems < fh->cline)
4262 pdr_in_end = pdr_in + fh->cpd;
4263 for (; pdr_in < pdr_in_end; pdr_in++)
4304 "procedures\n\t%4d labels\n",
4333 if (sh->index == indexNil)
4336 ax =
debug_info->external_aux + fh->iauxBase + sh->index;
4337 (*
debug_swap->swap_tir_in) (fh->fBigendian, &ax->a_ti, &tir);
4338 if (tir.bt != btStruct && tir.bt != btUnion && tir.bt != btEnum)
4342 (*
debug_swap->swap_rndx_in) (fh->fBigendian, &ax->a_rndx, rn);
4343 if (rn->rfd == 0xfff)
4344 rf = AUX_GET_ISYM (fh->fBigendian, ax + 1);
4361 const char **pname,
int bigend,
const char *sym_name)
4374 (*
debug_swap->swap_rndx_in) (bigend, &ax->a_rndx, rn);
4377 if (rn->rfd == 0xfff)
4380 rf = AUX_GET_ISYM (bigend, ax + 1);
4392 *pname =
"<undefined>";
4401 if (rn->rfd == 0xfff && rn->index == 0)
4403 *pname =
"<undefined>";
4411 if (rn->index >= fh->csym)
4414 *pname =
"<illegal>";
4426 + ((fh->isymBase + rn->index)
4431 if ((sh.sc != scInfo
4432 || (sh.st != stBlock && sh.st != stTypedef && sh.st != stIndirect
4433 && sh.st != stStruct && sh.st != stUnion
4434 && sh.st != stEnum))
4438 *pname =
"<illegal>";
4443 *pname =
debug_info->ss + fh->issBase + sh.iss;
4452 if ((sh.iss == 0 && sh.st == stTypedef) || sh.st == stIndirect)
4472 + fh->iauxBase + sh.index)->a_ti,
4474 if (tir.tq0 != tqNil)
4476 _(
"illegal tq0 in forward typedef for %s"), sym_name);
4481 *pname =
"<undefined>";
4489 + fh->iauxBase + sh.index + 1),
4491 fh->fBigendian, sym_name);
4513 _(
"illegal bt %d in forward typedef for %s"), tir.bt,
4520 else if (sh.st == stTypedef)
4602 *
sizeof (bv->
block)));
4688 sizeof (
struct block *),
4796 * sizeof (lt->item))));
4820 static struct block *
4851 static struct type *
4869 const struct ecoff_debug_swap *swap, asection *sec)
4872 struct ecoff_debug_info *info;
4880 info = ((
struct ecoff_debug_info *)
4882 sizeof (
struct ecoff_debug_info)));
4884 if (!(*swap->read_debug_info) (abfd, sec, info))
4885 error (
_(
"Error reading ECOFF debugging information: %s"),
4886 bfd_errmsg (bfd_get_error ()));
#define ALL_OBJFILE_PSYMTABS(objfile, p)
static int cross_ref(int, union aux_ext *, struct type **, enum type_code, const char **, int, const char *)
void free_header_files(void)
static int add_line(struct linetable *, int, CORE_ADDR, int)
char * hex_string(LONGEST num)
const char * symtab_to_filename_for_display(struct symtab *symtab)
static int mdebug_register_index
#define TYPE_RANGE_DATA(thistype)
#define compare_glevel(a, b)
static const char * range
void stabsread_new_init(void)
static struct blockvector * new_bvect(int)
static void record_minimal_symbol(minimal_symbol_reader &reader, const char *name, const CORE_ADDR address, enum minimal_symbol_type ms_type, int storage_class, struct objfile *objfile)
const struct floatformat ** gdbarch_double_format(struct gdbarch *gdbarch)
#define OBSTACK_CALLOC(OBSTACK, NUMBER, TYPE)
int gdbarch_ecoff_reg_to_regnum(struct gdbarch *gdbarch, int ecoff_regnr)
static void parse_lines(FDR *, PDR *, struct linetable *, int, struct partial_symtab *, CORE_ADDR)
#define SECT_OFF_TEXT(objfile)
struct type * create_static_range_type(struct type *result_type, struct type *index_type, LONGEST low_bound, LONGEST high_bound)
#define COMPUNIT_DEBUGFORMAT(cust)
#define SYMBOL_PRINT_NAME(symbol)
struct type * init_type(struct objfile *objfile, enum type_code code, int bit, const char *name)
void symbol_set_symtab(struct symbol *symbol, struct symtab *symtab)
struct type * builtin_void
struct linetable_entry item[1]
#define MDEBUG_EFI_SYMBOL_NAME
static void bad_rfd_entry_complaint(const char *arg1, int arg2, int arg3)
int hashname(const char *name)
#define TYPE_LOW_BOUND(range_type)
void add_symbol_to_list(struct symbol *symbol, struct pending **listhead)
int gdbarch_int_bit(struct gdbarch *gdbarch)
EXTERN unsigned char processing_gcc_compilation
static void reg_value_complaint(int regnum, int num_regs, const char *sym)
struct type * create_array_type(struct type *result_type, struct type *element_type, struct type *range_type)
#define TYPE_NAME(thistype)
#define TYPE_FIELD_ARTIFICIAL(thistype, n)
static const char * fdr_name(FDR *f)
#define INIT_CPLUS_SPECIFIC(type)
static void function_outside_compilation_unit_complaint(const char *arg1)
#define TYPE_HIGH_BOUND(range_type)
void set_last_source_file(const char *name)
enum domain_enum_tag domain_enum
struct compunit_symtab * allocate_compunit_symtab(struct objfile *objfile, const char *name)
#define SYMBOL_SET_LINKAGE_NAME(symbol, linkage_name)
struct parse_stack * next
const struct objfile_type * objfile_type(struct objfile *objfile)
struct compunit_symtab * end_symtab(CORE_ADDR end_addr, int section)
#define SYMBOL_CLASS(symbol)
void * memset(T *s, int c, size_t n)=delete
void internal_error(const char *file, int line, const char *fmt,...)
static int compare_blocks(const void *arg1, const void *arg2)
static int has_opaque_xref(FDR *, SYMR *)
struct type * make_pointer_type(struct type *type, struct type **typeptr)
static void parse_external(EXTR *, int, struct section_offsets *, struct objfile *)
struct type * nodebug_data_symbol
#define BLOCKVECTOR_BLOCK(blocklist, n)
struct block_symbol lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
int gdbarch_num_regs(struct gdbarch *gdbarch)
#define SET_FIELD_BITPOS(thisfld, bitpos)
static void parse_procedure(PDR *pr, struct compunit_symtab *search_symtab, struct partial_symtab *pst)
void add_psymbol_to_list(const char *, int, int, domain_enum, enum address_class, std::vector< partial_symbol *> *, CORE_ADDR, enum language, struct objfile *)
#define TYPE_PROTOTYPED(t)
#define TYPE_FIELD_TYPE(thistype, n)
struct ecoff_debug_info * debug_info
static void parse_partial_symbols(minimal_symbol_reader &, struct objfile *)
void printf_filtered(const char *format,...)
static struct type * new_type(char *)
static int n_undef_symbols
void mdebug_build_psymtabs(minimal_symbol_reader &reader, struct objfile *objfile, const struct ecoff_debug_swap *swap, struct ecoff_debug_info *info)
#define BLOCK_FUNCTION(bl)
EXTERN struct subfile * current_subfile
int gdbarch_num_pseudo_regs(struct gdbarch *gdbarch)
int is_cplus_marker(int c)
struct type * init_integer_type(struct objfile *objfile, int bit, int unsigned_p, const char *name)
#define SYMTAB_BLOCKVECTOR(symtab)
EXTERN unsigned int symnum
static const struct objfile_data * basic_type_data
static const char * mdebug_next_symbol_text(struct objfile *)
#define SYMBOL_ACLASS_INDEX(symbol)
#define SYMBOL_VALUE_ADDRESS(symbol)
static struct type * basic_type(int bt, struct objfile *objfile)
static void bad_tag_guess_complaint(const char *arg1)
CORE_ADDR gdbarch_addr_bits_remove(struct gdbarch *gdbarch, CORE_ADDR addr)
#define SYMBOL_DOMAIN(symbol)
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)
int gdbarch_sp_regnum(struct gdbarch *gdbarch)
#define SYMBOL_SET_LANGUAGE(symbol, language, obstack)
void * xzalloc(size_t size)
struct type * init_pointer_type(struct objfile *objfile, int bit, const char *name, struct type *target_type)
static void unexpected_type_code_complaint(const char *arg1)
void scan_file_globals(struct objfile *objfile)
static void add_block(struct block *, struct symtab *)
struct partial_symtab * start_psymtab_common(struct objfile *, const char *, CORE_ADDR, std::vector< partial_symbol *> &, std::vector< partial_symbol *> &)
char * obconcat(struct obstack *obstackp,...)
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 fputs_filtered(const char *linebuffer, struct ui_file *stream)
static struct symbol * mylookup_symbol(const char *, const struct block *, domain_enum, enum address_class)
#define SECT_OFF_DATA(objfile)
void buildsym_new_init(void)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
#define ANOFFSET(secoff, whichone)
struct gdbarch * get_objfile_arch(const struct objfile *objfile)
static const struct ecoff_debug_swap * debug_swap
EXTERN struct pending * local_symbols
void add_compunit_symtab_to_objfile(struct compunit_symtab *cu)
void _initialize_mdebugread(void)
#define TYPE_TARGET_STUB(t)
static int upgrade_type(int, struct type **, int, union aux_ext *, int, const char *)
#define next_symbol_text(objfile)
static void handle_psymbol_enumerators(struct objfile *, FDR *, int, CORE_ADDR)
#define BLOCK_SUPERBLOCK(bl)
struct type * alloc_type(struct objfile *objfile)
const char * get_last_source_file(void)
static void pop_parse_stack(void)
int gdbarch_double_bit(struct gdbarch *gdbarch)
EXTERN int previous_stab_code
#define SYMBOL_LINKAGE_NAME(symbol)
#define complaint(COMPLAINTS, FMT,...)
static void unknown_ext_complaint(const char *arg1)
static struct linetable * shrink_linetable(struct linetable *)
int gdbarch_sofun_address_maybe_missing(struct gdbarch *gdbarch)
#define SET_FIELD_ENUMVAL(thisfld, enumval)
static void push_parse_stack(void)
static void add_symbol(struct symbol *, struct symtab *, struct block *)
static void mdebug_read_symtab(struct partial_symtab *self, struct objfile *objfile)
void printf_unfiltered(const char *format,...)
int number_of_dependencies
#define TYPE_FIELDS(thistype)
static int mdebug_regparm_index
static int n_undef_labels
void elfmdebug_build_psymtabs(struct objfile *objfile, const struct ecoff_debug_swap *swap, asection *sec)
#define FIELD_BITSIZE(thisfld)
#define ECOFF_IN_ELF(bfd)
void * read_symtab_private
std::vector< partial_symbol * > static_psymbols
enum language pst_language
struct dictionary * dict_create_linear_expandable(enum language language)
#define SYMBOL_VALUE(symbol)
static struct symbol * new_symbol(const char *)
#define SYMBOL_VALUE_CHAIN(symbol)
struct partial_symtab * allocate_psymtab(const char *, struct objfile *) ATTRIBUTE_NONNULL(1)
int get_section_index(struct objfile *objfile, const char *section_name)
const struct ecoff_debug_swap * debug_swap
struct type * builtin_int
void wrap_here(const char *indent)
PTR xrealloc(PTR ptr, size_t size)
#define COMPUNIT_BLOCKVECTOR(cust)
static struct compunit_symtab * new_symtab(const char *, int, struct objfile *)
static struct type * parse_type(int, union aux_ext *, unsigned int, int *, int, const char *)
static struct mdebug_pending ** pending_list
#define SYMBOL_SET_NAMES(symbol, linkage_name, len, copy_name, objfile)
static struct ecoff_debug_info * debug_info
#define TYPE_TARGET_TYPE(thistype)
struct symbol * allocate_symbol(struct objfile *objfile)
struct partial_symtab * pst
struct partial_symtab * next
enum language deduce_language_from_filename(const char *filename)
struct minimal_symbol * record_with_info(const char *name, CORE_ADDR address, enum minimal_symbol_type ms_type, int section)
#define SYMBOL_BLOCK_VALUE(symbol)
#define TYPE_CODE(thistype)
std::vector< partial_symbol * > global_psymbols
struct partial_symtab ** dependencies
struct complaints * symfile_complaints
const char * gdbarch_static_transform_name(struct gdbarch *gdbarch, const char *name)
void dict_add_symbol(struct dictionary *dict, struct symbol *sym)
int register_symbol_register_impl(enum address_class aclass, const struct symbol_register_ops *ops)
struct symtab * allocate_symtab(struct compunit_symtab *cust, const char *filename)
#define TYPE_NFIELDS(thistype)
record_line_ftype record_line
int gdbarch_float_bit(struct gdbarch *gdbarch)
enum language compunit_language(const struct compunit_symtab *cust)
struct type * init_complex_type(struct objfile *objfile, const char *name, struct type *target_type)
#define SYMBOL_LANGUAGE(symbol)
#define COMPUNIT_FILETABS(cust)
static enum language psymtab_language
#define BLOCKVECTOR_NBLOCKS(blocklist)
struct mdebug_pending ** pending_list
static struct partial_symtab * new_psymtab(const char *, struct objfile *)
struct type * nodebug_text_symbol
#define TYPE_TAG_NAME(type)
static void add_pending(FDR *fh, char *sh, struct type *t)
void(* read_symtab)(struct partial_symtab *, struct objfile *)
#define FIELD_NAME(thisfld)
static struct mdebug_pending * is_pending_symbol(FDR *fh, char *sh)
#define TYPE_ALLOC(t, size)
#define SYMBOL_TYPE(symbol)
const struct floatformat ** gdbarch_float_format(struct gdbarch *gdbarch)
static void psymtab_to_symtab_1(struct objfile *objfile, struct partial_symtab *, const char *)
#define TYPE_LENGTH(thistype)
#define SECT_OFF_BSS(objfile)
static struct parse_stack * top_stack
#define TYPE_ZALLOC(t, size)
struct compunit_symtab * compunit_symtab
struct section_offsets * section_offsets
void gdb_flush(struct ui_file *file)
static int mdebug_reg_to_regnum(struct symbol *sym, struct gdbarch *gdbarch)
#define SYMBOL_VALUE_BYTES(symbol)
static void add_data_symbol(SYMR *sh, union aux_ext *ax, int bigend, struct symbol *s, int aclass_index, struct block *b, struct objfile *objfile, const char *name)
struct dictionary * dict_create_hashed_expandable(enum language language)
static void sort_blocks(struct symtab *)
static const struct symbol_register_ops mdebug_register_funcs
int gdbarch_static_transform_name_p(struct gdbarch *gdbarch)
static struct objfile * mdebugread_objfile
static void basic_type_complaint(int arg1, const char *arg2)
static int found_ecoff_debugging_info
static char stabs_symbol[]
#define SYMTAB_LINETABLE(symtab)
void error(const char *fmt,...)
static struct linetable * new_linetable(int)
struct type * lookup_pointer_type(struct type *type)
#define ALL_BLOCK_SYMBOLS(block, iter, sym)
struct mdebug_pending * next
EXTERN const char *(* next_symbol_text_func)(struct objfile *)
void init_header_files(void)
static int parse_symbol(SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, struct section_offsets *section_offsets, struct objfile *objfile)
EXTERN struct symbol * global_sym_chain[HASHSIZE]
void do_cleanups(struct cleanup *old_chain)
struct parse_stack * prev
#define FIELD_TYPE(thisfld)
struct type * lookup_function_type(struct type *type)
#define SYMBOL_IS_ARGUMENT(symbol)
struct partial_symtab * psymtabs
static FDR * get_rfd(int cf, int rf)
__extension__ enum domain_enum_tag domain
static struct block * new_block(enum block_type, enum language)
struct type * init_float_type(struct objfile *objfile, int bit, const char *name, const struct floatformat **floatformats)
static void index_complaint(const char *arg1)