aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1991-11-20 00:20:43 +0000
committerFred Fish <fnf@specifix.com>1991-11-20 00:20:43 +0000
commit0db97eedc1c069234da49f9780ca55ced173acd4 (patch)
tree795bbee36f4a6d667aab18d5421fef4dd0ff9a42 /gdb
parent44828c3918fd3a1439a4a1b3f96d67a258efb824 (diff)
downloadgdb-0db97eedc1c069234da49f9780ca55ced173acd4.zip
gdb-0db97eedc1c069234da49f9780ca55ced173acd4.tar.gz
gdb-0db97eedc1c069234da49f9780ca55ced173acd4.tar.bz2
Ignore names invented by helpful compilers for anonymous structs, unions,
and enums.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/dwarfread.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 857b907..679155b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
Tue Nov 19 07:53:55 1991 Fred Fish (fnf at cygnus.com)
+ * dwarfread.c (enum_type, struct_type): Ignore names invented by
+ helpful compilers for anonymous structs, unions, and enums.
+
* c-exp.y, m2-exp.y: Add defines for yymaxdepth, yy_yys, and
yy_yyv, so multiple parsers produced by SVR4 versions of yacc
can coexist in the same executable without collision.
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index 98cb95b..551d771 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -909,7 +909,9 @@ DEFUN(struct_type, (dip, thisdie, enddie),
TYPE_CODE (type) = TYPE_CODE_UNDEF;
break;
}
- if (dip -> at_name == NULL)
+ /* Some compilers try to be helpful by inventing "fake" names for anonymous
+ enums, structures, and unions, like "~0fake". Thanks, but no thanks. */
+ if (dip -> at_name == NULL || *dip -> at_name == '~')
{
tpart2 = "{...}";
}
@@ -1325,7 +1327,9 @@ DEFUN(enum_type, (dip), struct dieinfo *dip)
}
TYPE_CODE (type) = TYPE_CODE_ENUM;
tpart1 = "enum ";
- if (dip -> at_name == NULL)
+ /* Some compilers try to be helpful by inventing "fake" names for anonymous
+ enums, structures, and unions, like "~0fake". Thanks, but no thanks. */
+ if (dip -> at_name == NULL || *dip -> at_name == '~')
{
tpart2 = "{...}";
} else {