diff options
author | Fred Fish <fnf@specifix.com> | 1991-11-20 00:20:43 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1991-11-20 00:20:43 +0000 |
commit | 0db97eedc1c069234da49f9780ca55ced173acd4 (patch) | |
tree | 795bbee36f4a6d667aab18d5421fef4dd0ff9a42 /gdb/dwarfread.c | |
parent | 44828c3918fd3a1439a4a1b3f96d67a258efb824 (diff) | |
download | gdb-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/dwarfread.c')
-rw-r--r-- | gdb/dwarfread.c | 8 |
1 files changed, 6 insertions, 2 deletions
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 { |