diff options
author | Doug Evans <dje@google.com> | 2012-04-28 04:38:14 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2012-04-28 04:38:14 +0000 |
commit | 0fefef59324ddba64bbefdc63ef85b768f2e93d2 (patch) | |
tree | 132eee17ad346f2d903f6a16bbc14053f5c0a840 /gdb | |
parent | 2b88fef87046c884aa29a300fb400d3d8e5f2222 (diff) | |
download | gdb-0fefef59324ddba64bbefdc63ef85b768f2e93d2.zip gdb-0fefef59324ddba64bbefdc63ef85b768f2e93d2.tar.gz gdb-0fefef59324ddba64bbefdc63ef85b768f2e93d2.tar.bz2 |
* dwarf2read.c (dwarf2_read_index): Don't use index if symbol table
is empty.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b047f35..e364e13 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-04-27 Doug Evans <dje@google.com> + + * dwarf2read.c (dwarf2_read_index): Don't use index if symbol table + is empty. + 2012-04-27 Sergio Durigan Junior <sergiodj@redhat.com> Tom Tromey <tromey@redhat.com> 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; |