diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 13 |
2 files changed, 16 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 840d982..0041204 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-05-28 David Carlton <carlton@bactrian.org> + + * dwarf2read.c (determine_prefix): Handle anonymous + classes/structures. + 2003-05-23 David Carlton <carlton@bactrian.org> * Makefile.in (cp-namespace.o): Depend on frame_h. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 71508fb..55d31d1 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -6030,9 +6030,18 @@ determine_prefix (struct die_info *die) case DW_TAG_class_type: case DW_TAG_structure_type: { - if (parent_prefix != NULL) - return typename_concat (parent_prefix, dwarf2_name (parent)); + { + const char *parent_name = dwarf2_name (parent); + + if (parent_name != NULL) + return typename_concat (parent_prefix, dwarf2_name (parent)); + else + /* FIXME: carlton/2003-05-28: I'm not sure what the + best thing to do here is. */ + return typename_concat (parent_prefix, + "<<anonymous class>>"); + } else return class_name (parent); } |