aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/dwarf2read.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2fb4b87..ef77fdb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2019-04-17 Tom Tromey <tromey@adacore.com>
+
+ * dwarf2read.c (dwarf2_init_complex_target_type): Check "tt"
+ against nullptr before use.
+
2019-04-17 Alan Hayward <alan.hayward@arm.com>
* nat/linux-waitpid.c (linux_debug): Call debug_vprintf.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 0873028..16bf240 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -17566,7 +17566,7 @@ dwarf2_init_complex_target_type (struct dwarf2_cu *cu,
/* If the type we found doesn't match the size we were looking for, then
pretend we didn't find a type at all, the complex target type we
create will then be nameless. */
- if (TYPE_LENGTH (tt) * TARGET_CHAR_BIT != bits)
+ if (tt != nullptr && TYPE_LENGTH (tt) * TARGET_CHAR_BIT != bits)
tt = nullptr;
const char *name = (tt == nullptr) ? nullptr : TYPE_NAME (tt);