From 92fac8075afdfdd75ab752de80c1e7b0cbcc5303 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Tue, 18 Jun 2013 15:50:33 +0000 Subject: [PATCH] gdb/ * dwarf2read.c (write_psymtabs_to_index): Ignore NULL PSYMTAB. --- gdb/ChangeLog | 4 ++++ gdb/dwarf2read.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8a291ac4fa1..1743bfa1403 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2013-06-18 Jan Kratochvil + + * dwarf2read.c (write_psymtabs_to_index): Ignore NULL PSYMTAB. + 2013-06-17 Pierre Muller * corelow.c (core_open): Print GDB signal name instead of target diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index a902b70fd01..316bb861c00 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -21270,6 +21270,12 @@ write_psymtabs_to_index (struct objfile *objfile, const char *dir) struct psymtab_cu_index_map *map; void **slot; + /* CU of a shared file from 'dwz -m' may be unused by this main file. + It may be referenced from a local scope but in such case it does not + need to be present in .gdb_index. */ + if (psymtab == NULL) + continue; + if (psymtab->user == NULL) recursively_write_psymbols (objfile, psymtab, symtab, psyms_seen, i); -- 2.30.2