From 966940426dbd5c44d7f25b0f2bd6b28cf829c384 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 19 Aug 2009 14:40:53 -0700 Subject: [PATCH] PR10538: Use {...} for naming anonymous types * tapsets.cxx (dwarf_type_name): Handle NULL dwarf_diename. --- tapsets.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.43.5