]> sourceware.org Git - systemtap.git/commitdiff
PR10538: Use {...} for naming anonymous types
authorJosh Stone <jistone@redhat.com>
Wed, 19 Aug 2009 21:40:53 +0000 (14:40 -0700)
committerJosh Stone <jistone@redhat.com>
Wed, 19 Aug 2009 21:40:53 +0000 (14:40 -0700)
* tapsets.cxx (dwarf_type_name): Handle NULL dwarf_diename.

tapsets.cxx

index 3d38a3ce700df682b10a3c65b3ac95d571c7057f..aee0183559341ceb8ef536abf369c3d8968fe0b2 100644 (file)
@@ -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;
     }
 
This page took 0.04578 seconds and 5 git commands to generate.