This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Severe regression in corefile.exp with Solaris 2.7 sparc + hack
- To: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>
- Subject: Re: Severe regression in corefile.exp with Solaris 2.7 sparc + hack
- From: Jim Kingdon <kingdon at redhat dot com>
- Date: 07 Mar 2000 14:17:48 -0800
- CC: gdb-patches at sourceware dot cygnus dot com
- References: <200003072113.WAA26253@reisser.regent.e-technik.tu-muenchen.de>
> 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.