aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/dwarf2/read.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 748788a..d480ff4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2020-02-21 Ali Tamur <tamur@google.com>
+
+ * dwarf2/read.c (dwarf2_name): Add null check.
+
2020-02-20 Tom Tromey <tom@tromey.com>
* dwarf2/read.c (dwarf2_find_containing_comp_unit): Use ">", not
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index f998fe6..46d510e 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -21756,6 +21756,8 @@ dwarf2_name (struct die_info *die, struct dwarf2_cu *cu)
{
gdb::unique_xmalloc_ptr<char> demangled
(gdb_demangle (DW_STRING (attr), DMGL_TYPES));
+ if (demangled == nullptr)
+ return nullptr;
const char *base;