diff options
author | David Carlton <carlton@bactrian.org> | 2003-05-28 22:31:11 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2003-05-28 22:31:11 +0000 |
commit | a2becb14955d4c66860a6ef54f776e99752fe4f0 (patch) | |
tree | 731b0079ff06ffbaa65b7360914a6c6b4ec18a20 | |
parent | d150fe7f77d2f601f08297a7ca89e76ba6bf6a57 (diff) | |
download | gdb-a2becb14955d4c66860a6ef54f776e99752fe4f0.zip gdb-a2becb14955d4c66860a6ef54f776e99752fe4f0.tar.gz gdb-a2becb14955d4c66860a6ef54f776e99752fe4f0.tar.bz2 |
2003-05-28 David Carlton <carlton@bactrian.org>
* dwarf2read.c (determine_prefix): Handle anonymous
classes/structures.
-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); } |