+2010-07-13 Tom Tromey <tromey@redhat.com>
+
+ * dwarf2read.c (dwarf2_read_index): Correctly set 'total_size'.
+
2010-07-13 Tom Tromey <tromey@redhat.com>
* dwarf2read.c (dwarf2_per_cu_text_offset): Fix reference to
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;
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]);