* dwarf2read.c (dwarf2_read_index): Correctly set 'total_size'.
authorTom Tromey <tromey@redhat.com>
Tue, 13 Jul 2010 22:02:05 +0000 (22:02 +0000)
committerTom Tromey <tromey@redhat.com>
Tue, 13 Jul 2010 22:02:05 +0000 (22:02 +0000)
gdb/ChangeLog
gdb/dwarf2read.c

index cb0c6cd37a5ca9da5c44c8ce480b2ae078ecf24b..36c94f9fe313f93f69e1d8b396dc4c03ab724e93 100644 (file)
@@ -1,3 +1,7 @@
+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
index 6dcd24331638bf6bab0c7d31a93b9f38fef46e57..6ac503e2f28460699692b1f3c88d6a25e68f4dbe 100644 (file)
@@ -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]);
This page took 0.037512 seconds and 4 git commands to generate.