summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-08-19 14:40:53 -0700
committerJosh Stone <jistone@redhat.com>2009-08-19 14:40:53 -0700
commit966940426dbd5c44d7f25b0f2bd6b28cf829c384 (patch)
treeed11d5086ffeca70fdb4523dbf4a53f3ed3565e1
parentb57ba9b863f0bd99f70d9e4d64c5a11ec75f7317 (diff)
downloadsystemtap-steved-966940426dbd5c44d7f25b0f2bd6b28cf829c384.tar.gz
systemtap-steved-966940426dbd5c44d7f25b0f2bd6b28cf829c384.tar.xz
systemtap-steved-966940426dbd5c44d7f25b0f2bd6b28cf829c384.zip
PR10538: Use {...} for naming anonymous types
* tapsets.cxx (dwarf_type_name): Handle NULL dwarf_diename.
-rw-r--r--tapsets.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 3d38a3ce..aee01835 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -5604,7 +5604,9 @@ dwarf_type_name(Dwarf_Die& type_die, string& c_type)
}
if (done)
{
- c_type.append(dwarf_diename(&type_die));
+ // this follows gdb precedent that anonymous structs/unions
+ // are displayed as "struct {...}" and "union {...}".
+ c_type.append(dwarf_diename(&type_die) ?: "{...}");
return true;
}