From: Josh Stone Date: Wed, 19 Aug 2009 21:40:53 +0000 (-0700) Subject: PR10538: Use {...} for naming anonymous types X-Git-Tag: release-1.0~141 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=966940426dbd5c44d7f25b0f2bd6b28cf829c384;p=systemtap.git PR10538: Use {...} for naming anonymous types * tapsets.cxx (dwarf_type_name): Handle NULL dwarf_diename. --- diff --git a/tapsets.cxx b/tapsets.cxx index 3d38a3ce7..aee018355 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; }