* dwarf2read.c (dwarf2_read_index): Correctly set 'total_size'.
This commit is contained in:
parent
bb3fa9d02e
commit
b3b272e108
2 changed files with 6 additions and 5 deletions
|
@ -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>
|
2010-07-13 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* dwarf2read.c (dwarf2_per_cu_text_offset): Fix reference to
|
* dwarf2read.c (dwarf2_per_cu_text_offset): Fix reference to
|
||||||
|
|
|
@ -1761,12 +1761,9 @@ find_slot_in_mapped_hash (struct mapped_index *index, const char *name,
|
||||||
static int
|
static int
|
||||||
dwarf2_read_index (struct objfile *objfile)
|
dwarf2_read_index (struct objfile *objfile)
|
||||||
{
|
{
|
||||||
struct stat st, obstat;
|
|
||||||
int fd;
|
|
||||||
char *addr;
|
char *addr;
|
||||||
struct mapped_index *map;
|
struct mapped_index *map;
|
||||||
offset_type val, *metadata;
|
offset_type *metadata;
|
||||||
char buf1[8], buf2[8];
|
|
||||||
const gdb_byte *cu_list;
|
const gdb_byte *cu_list;
|
||||||
offset_type cu_list_elements;
|
offset_type cu_list_elements;
|
||||||
|
|
||||||
|
@ -1781,7 +1778,7 @@ dwarf2_read_index (struct objfile *objfile)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
map = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct mapped_index);
|
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));
|
metadata = (offset_type *) (addr + sizeof (offset_type));
|
||||||
cu_list = addr + MAYBE_SWAP (metadata[0]);
|
cu_list = addr + MAYBE_SWAP (metadata[0]);
|
||||||
|
|
Loading…
Reference in a new issue