Severe regression in corefile.exp with Solaris 2.7 sparc + hack

Jim Kingdon kingdon@redhat.com
Tue Mar 7 19:37:00 GMT 2000


> Of the two choices, I prefer manually anding with 0xffffffff.  The
> cast that you suggest will only yield the desired results when
> sizeof(void *) == sizeof(size_t).

Shrug.  Various provisions of ISO C make it pretty darn likely that
sizeof(void *) == sizeof(size_t).  But you're right, it isn't a
guarantee (and would be ugly even if it were).

> I think there must be a better solution than the one that Peter
> proposes.  However, I don't know what it is either.

Something like "extract_address (&lm->field, sizeof (lm->field))" I
think.  I didn't suggest that at first because I thought it would
require massive solib.c changes to use separate internal and external
structures like in BFD.  But I guess that isn't true, I guess you can
just change the cast to a call to extract_address.


More information about the Gdb-patches mailing list