[PATCH] Fix linespec.c vs padding on 32bit targets
Andrew Pinski
andrew.pinski@caviumnetworks.com
Fri Dec 9 05:40:00 GMT 2011
Hi,
The problem here is there is padding in address_entry so
iterative_hash_object on the full object cannot be done as the padding
would be some junk. This causes lots of gdb failures on
mips64-linux-gnu.
OK? Tested on mips64-linux-gnu.
Thanks,
Andrew Pinski
PS I don't have write access for gdb.
gdb/ChangeLog:
* linespec.c (hash_address_entry): Use iterative_hash_object on each
field rather than the struct itself.
-------------- next part --------------
? .elfread.c.swp
Index: linespec.c
===================================================================
RCS file: /cvs/src/src/gdb/linespec.c,v
retrieving revision 1.133
diff -u -p -r1.133 linespec.c
--- linespec.c 6 Dec 2011 19:57:47 -0000 1.133
+++ linespec.c 9 Dec 2011 03:49:07 -0000
@@ -253,8 +253,9 @@ static hashval_t
hash_address_entry (const void *p)
{
const struct address_entry *aep = p;
-
- return iterative_hash_object (*aep, 0);
+ hashval_t hash;
+ hash = iterative_hash_object (aep->pspace, 0);
+ return iterative_hash_object (aep->addr, hash);
}
/* An equality function for address_entry. */
More information about the Gdb-patches
mailing list