This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


> Due to the BFD change, a CORE_ADDR is now an unsigned long long with 64 Bits.
> When casting 32 bit pointers to a CORE_ADDR in solib.c, the sign bit of the
> pointer gets extended

Weird.  GCC seems to do that too (albeit with a warning "cast from
pointer to integer of different size").

The best solution I could think of was to change "(CORE_ADDR)lm"
(where lm is a void*) to "(CORE_ADDR)(size_t)lm".  At least for me
that seems to work (on a small test case).  Hardly elegant, but better
than manually anding with 0xffffffff I guess.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]