aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-07-13 22:02:05 +0000
committerTom Tromey <tromey@redhat.com>2010-07-13 22:02:05 +0000
commitb3b272e108b18608b5b9e7d6ae6173b09f19820d (patch)
tree5183ae9756bb68b27d23601dcce98b03d541c79a /gdb/dwarf2read.c
parentbb3fa9d02ef94efbcbed615d34874433a03fe9ca (diff)
downloadgdb-b3b272e108b18608b5b9e7d6ae6173b09f19820d.zip
gdb-b3b272e108b18608b5b9e7d6ae6173b09f19820d.tar.gz
gdb-b3b272e108b18608b5b9e7d6ae6173b09f19820d.tar.bz2
* dwarf2read.c (dwarf2_read_index): Correctly set 'total_size'.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 6dcd243..6ac503e 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]);