This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: another index follow-up
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 13 Jul 2010 16:01:07 -0600
- Subject: FYI: another index follow-up
Maxim Grigoriev pointed out another build failure caused by the index
merge.
I don't have any theory about how this slipped through :(
I have built this branch dozens of times, and sent it through the
compile farm builder any number of times as well.
Tom
ChangeLog:
2010-07-13 Tom Tromey <tromey@redhat.com>
* dwarf2read.c (dwarf2_read_index): Correctly set 'total_size'.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.416
diff -u -r1.416 dwarf2read.c
--- dwarf2read.c 13 Jul 2010 21:06:48 -0000 1.416
+++ dwarf2read.c 13 Jul 2010 21:59:50 -0000
@@ -1761,12 +1761,9 @@
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 @@
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]);