+2021-02-02 Tom de Vries <tdevries@suse.de>
+
+ PR symtab/24620
+ * dwarf2/index-write.c (write_one_signatured_type): Skip if
+ psymtab == nullptr.
+
2021-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
* Makefile.in (HFILES_NO_SRCDIR): Add corefile.h.
struct signatured_type *entry = (struct signatured_type *) *slot;
partial_symtab *psymtab = entry->per_cu.v.psymtab;
+ if (psymtab == nullptr)
+ {
+ /* We can end up here when processing a skeleton CU referring to a
+ .dwo file that hasn't been found. There's not much we can do in
+ such a case, so skip this CU. */
+ return 1;
+ }
+
write_psymbols (info->symtab, info->psyms_seen,
psymtab->global_psymbols, info->cu_index,
0);
+2021-02-02 Tom de Vries <tdevries@suse.de>
+
+ PR symtab/24620
+ * gdb.dwarf2/fission-reread.exp: Add test-case.
+
2021-02-01 Tom de Vries <tdevries@suse.de>
* gdb.dwarf2/fission-base.S: Pass -DDWO=$dwo.
gdb_unload
# If we get this far gdb didn't crash, nor did an error occur.
pass "$testfile - unload"
+
+# Test-case for PR24620: Delete the .dwo file and verify that
+# save gdb-index doesn't crash.
+remote_file target delete $dwo
+clean_restart $binfile
+set output_dir [standard_output_file ""]
+set cmd "save gdb-index"
+gdb_test_multiple "$cmd $output_dir" $cmd {
+ -re -wrap "Cannot use an index to create the index.*" {
+ unsupported $gdb_test_name
+ }
+ -re "^$cmd \[^\r\n\]*\r\n$gdb_prompt $" {
+ pass $gdb_test_name
+ }
+}