diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-06-18 15:50:33 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-06-18 15:50:33 +0000 |
commit | 92fac8075afdfdd75ab752de80c1e7b0cbcc5303 (patch) | |
tree | 0253f73c8de338e292e1470ff049ed7f9adfb418 /gdb/dwarf2read.c | |
parent | e83a675fce2845c8a7e420ef86ff46a9d3ea7ca7 (diff) | |
download | gdb-92fac8075afdfdd75ab752de80c1e7b0cbcc5303.zip gdb-92fac8075afdfdd75ab752de80c1e7b0cbcc5303.tar.gz gdb-92fac8075afdfdd75ab752de80c1e7b0cbcc5303.tar.bz2 |
gdb/
* dwarf2read.c (write_psymtabs_to_index): Ignore NULL PSYMTAB.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index a902b70..316bb86 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); |