aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2012-04-28 04:38:14 +0000
committerDoug Evans <dje@google.com>2012-04-28 04:38:14 +0000
commit0fefef59324ddba64bbefdc63ef85b768f2e93d2 (patch)
tree132eee17ad346f2d903f6a16bbc14053f5c0a840 /gdb/dwarf2read.c
parent2b88fef87046c884aa29a300fb400d3d8e5f2222 (diff)
downloadfsf-binutils-gdb-0fefef59324ddba64bbefdc63ef85b768f2e93d2.zip
fsf-binutils-gdb-0fefef59324ddba64bbefdc63ef85b768f2e93d2.tar.gz
fsf-binutils-gdb-0fefef59324ddba64bbefdc63ef85b768f2e93d2.tar.bz2
* dwarf2read.c (dwarf2_read_index): Don't use index if symbol table
is empty.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 7ae3b86..a591714 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;