From: Doug Evans Date: Sat, 28 Apr 2012 04:38:14 +0000 (+0000) Subject: * dwarf2read.c (dwarf2_read_index): Don't use index if symbol table X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0fefef59324ddba64bbefdc63ef85b768f2e93d2;p=binutils-gdb.git * dwarf2read.c (dwarf2_read_index): Don't use index if symbol table is empty. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b047f3505b1..e364e13930f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-04-27 Doug Evans + + * dwarf2read.c (dwarf2_read_index): Don't use index if symbol table + is empty. + 2012-04-27 Sergio Durigan Junior Tom Tromey diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 7ae3b8616cd..a5917140ec9 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -2192,6 +2192,10 @@ dwarf2_read_index (struct objfile *objfile) map->constant_pool = addr + MAYBE_SWAP (metadata[i]); + /* Don't use the index if it's empty. */ + if (map->symbol_table_slots == 0) + return 0; + if (!create_cus_from_index (objfile, cu_list, cu_list_elements)) return 0;