else
t = pend->t;
- /* Alpha cc unnamed structs do not get a tag name. */
- if (sh->iss == 0)
+ /* Do not set the tag name if it is a compiler generated tag name
+ (.Fxx or .xxfake or empty) for unnamed struct/union/enums.
+ Alpha cc puts out an sh->iss of zero for those. */
+ if (sh->iss == 0 || name[0] == '.' || name[0] == '\0')
TYPE_TAG_NAME (t) = NULL;
else
TYPE_TAG_NAME (t) = obconcat (¤t_objfile->symbol_obstack,
if (type_code == TYPE_CODE_ENUM)
{
/* This is a non-empty enum. */
+
+ /* DEC c89 has the number of enumerators in the sh.value field,
+ not the type length, so we have to compensate for that
+ incompatibility quirk.
+ This might do the wrong thing for an enum with one or two
+ enumerators and gcc -gcoff -fshort-enums, but these cases
+ are hopefully rare enough. */
+ if (TYPE_LENGTH (t) == TYPE_NFIELDS (t))
+ TYPE_LENGTH (t) = TARGET_INT_BIT / HOST_CHAR_BIT;
for (ext_tsym = ext_sh + external_sym_size;
;
ext_tsym += external_sym_size)
if (tp == (struct type *) NULL)
tp = init_type (type_code, 0, 0, (char *) NULL, current_objfile);
+ /* DEC c89 produces cross references to qualified aggregate types,
+ dereference them. */
+ while (TYPE_CODE (tp) == TYPE_CODE_PTR
+ || TYPE_CODE (tp) == TYPE_CODE_ARRAY)
+ tp = tp->target_type;
+
/* Make sure that TYPE_CODE(tp) has an expected type code.
Any type may be returned from cross_ref if file indirect entries
are corrupted. */
if (pr->isym == -1)
{
/* Static procedure at address pr->adr. Sigh. */
+ /* FIXME-32x64. assuming pr->adr fits in long. */
complain (&pdr_static_symbol_complaint, (unsigned long) pr->adr);
return;
}
add_symbol_to_list (s, &local_symbols);
}
}
- else if (sh.st == stLabel && sh.index != indexNil)
+ else if (sh.st == stLabel)
{
- /* Handle encoded stab line number. */
- record_line (current_subfile, sh.index, valu);
+ if (sh.index == indexNil)
+ {
+ /* This is what the gcc2_compiled and __gnu_compiled_*
+ show up as. So don't complain. */
+ ;
+ }
+ else
+ /* Handle encoded stab line number. */
+ record_line (current_subfile, sh.index, valu);
}
else if (sh.st == stProc || sh.st == stStaticProc || sh.st == stEnd)
/* These are generated by gcc-2.x, do not complain */
CORE_ADDR adr;
int last;
{
+ /* DEC c89 sometimes produces zero linenos which confuse gdb.
+ Change them to something sensible. */
+ if (lineno == 0)
+ lineno = 1;
if (last == 0)
last = -2; /* make sure we record first line */