+2020-03-16 Tom Tromey <tromey@adacore.com>
+
+ PR gdb/25663:
+ * dwarf2/read.c (dwarf2_name): Strip leading namespaces after
+ putting value into bcache.
+
2020-03-16 Simon Marchi <simon.marchi@efficios.com>
PR gdb/21500
if (demangled == nullptr)
return nullptr;
- const char *base;
-
DW_STRING (attr) = objfile->intern (demangled.get ());
DW_STRING_IS_CANONICAL (attr) = 1;
-
- /* Strip any leading namespaces/classes, keep only the base name.
- DW_AT_name for named DIEs does not contain the prefixes. */
- base = strrchr (DW_STRING (attr), ':');
- if (base && base > DW_STRING (attr) && base[-1] == ':')
- return &base[1];
- else
- return DW_STRING (attr);
}
+
+ /* Strip any leading namespaces/classes, keep only the base name.
+ DW_AT_name for named DIEs does not contain the prefixes. */
+ const char *base = strrchr (DW_STRING (attr), ':');
+ if (base && base > DW_STRING (attr) && base[-1] == ':')
+ return &base[1];
+ else
+ return DW_STRING (attr);
}
break;