aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/dwarf2/read.c3
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp6
4 files changed, 16 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3c0c2db..6170d2d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2021-05-27 Tom de Vries <tdevries@suse.de>
+ PR symtab/27919
+ * dwarf2/read.c (process_psymtab_comp_unit):
+
+2021-05-27 Tom de Vries <tdevries@suse.de>
+
* dwarf2/read.c (find_partial_die): Fix "Cannot not" typo in dwarf
error.
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 0da87bb..4cc5b4f 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -7020,6 +7020,9 @@ process_psymtab_comp_unit (dwarf2_per_cu_data *this_cu,
cutu_reader reader (this_cu, per_objfile, nullptr, nullptr, false);
+ if (reader.comp_unit_die == nullptr)
+ return;
+
switch (reader.comp_unit_die->tag)
{
case DW_TAG_compile_unit:
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 968e623..22a99c0 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,12 @@
2021-05-27 Tom de Vries <tdevries@suse.de>
+ PR symtab/27919
+ PR testsuite/27920
+ * gdb.dwarf2/dw2-dummy-cu.exp: Use maint expand-symtabs instead of
+ -readnow.
+
+2021-05-27 Tom de Vries <tdevries@suse.de>
+
PR testsuite/27921
* gdb.dwarf2/gdb-index.exp (add_gdb_index): Rename to ...
(local_add_gdb_index): ... this.
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp b/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp
index 6739724..7871851 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dummy-cu.exp
@@ -27,13 +27,9 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "
return -1
}
-set saved_gdbflags $GDBFLAGS
-set GDBFLAGS "$GDBFLAGS -readnow"
-
clean_restart $executable
+gdb_test_no_output "maint expand-symtab"
# Something simple to verify gdb didn't crash, and has read in whatever symbol
# info is there.
gdb_test "info fun main" "main_end"
-
-set GDBFLAGS $saved_gdbflags