diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1994-01-12 21:27:51 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1994-01-12 21:27:51 +0000 |
commit | a8c498978eecdb6878e16f65fcc01bdcf528b04d (patch) | |
tree | 25fc08f70fba842f7ff8be93f8ee344bcf8ba253 /gdb/mdebugread.c | |
parent | 92f345b9e4d9df098fefd545b6b85698e0b996ea (diff) | |
download | gdb-a8c498978eecdb6878e16f65fcc01bdcf528b04d.zip gdb-a8c498978eecdb6878e16f65fcc01bdcf528b04d.tar.gz gdb-a8c498978eecdb6878e16f65fcc01bdcf528b04d.tar.bz2 |
* mdebugread.c (parse_symbol): Do not set TYPE_TAG_NAME for
compiler generated tag names.
* mdebugread.c (parse_type): Handle cross references to qualified
aggregate types.
* valops.c (value_struct_elt): Improve error message if the
address of a method is requested from an object instance.
* valops.c (search_struct_method): Make name_matched non-static
to get it initialized correctly.
Diffstat (limited to 'gdb/mdebugread.c')
-rw-r--r-- | gdb/mdebugread.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index c23dac0..ca6aa83 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -993,8 +993,10 @@ parse_symbol (sh, ax, ext_sh, bigend) 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, @@ -1011,7 +1013,7 @@ parse_symbol (sh, ax, ext_sh, bigend) { /* This is a non-empty enum. */ - /* c89 has the number of enumerators in the sh.value field, + /* 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 @@ -1425,6 +1427,12 @@ parse_type (fd, ax, aux_index, bs, bigend, sym_name) 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. */ |