From: Tom Tromey Date: Tue, 13 Jul 2010 22:02:05 +0000 (+0000) Subject: * dwarf2read.c (dwarf2_read_index): Correctly set 'total_size'. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3b272e108b18608b5b9e7d6ae6173b09f19820d;p=binutils-gdb.git * dwarf2read.c (dwarf2_read_index): Correctly set 'total_size'. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cb0c6cd37a5..36c94f9fe31 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-07-13 Tom Tromey + + * dwarf2read.c (dwarf2_read_index): Correctly set 'total_size'. + 2010-07-13 Tom Tromey * dwarf2read.c (dwarf2_per_cu_text_offset): Fix reference to diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 6dcd2433163..6ac503e2f28 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1761,12 +1761,9 @@ find_slot_in_mapped_hash (struct mapped_index *index, const char *name, static int dwarf2_read_index (struct objfile *objfile) { - struct stat st, obstat; - int fd; char *addr; struct mapped_index *map; - offset_type val, *metadata; - char buf1[8], buf2[8]; + offset_type *metadata; const gdb_byte *cu_list; offset_type cu_list_elements; @@ -1781,7 +1778,7 @@ dwarf2_read_index (struct objfile *objfile) return 0; map = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct mapped_index); - map->total_size = st.st_size; + map->total_size = dwarf2_per_objfile->gdb_index.size; metadata = (offset_type *) (addr + sizeof (offset_type)); cu_list = addr + MAYBE_SWAP (metadata[0]);