[PATCH] fix solib-svr4.c with 64-bit bfd
Kevin Buettner
kevinb@redhat.com
Thu Jan 17 11:47:00 GMT 2002
On Jan 18, 4:26am, TAKAI Kousuke wrote:
> I had encountered a bug in GDB 5.1 compiled for sparc-sun-solaris2.8,
> that GDB cannot resolve symbols in shared libraries in 32-bit environment.
> (I found this problem had been reported as PR gdb/266).
>
> I found that this seems to be because LM_ADDR() in solib-svr4.c
> sign-extends 32-bit address value into 64-bit CORE_ADDR type.
> I have no access to SVR4 spec, but under SunOS 5.7 and 5.8,
> <sys/link.h> says that `l_addr' is unsigned, and it seems that
> l_addr should be zero-extended.
>
> This is a patch to fix it.
[...]
Thanks for your patch.
While your patch fixes the problems that you're seeing on Solaris, it
breaks GDB on certain other platforms. In fact, your patch simply
reverts a change that was made last year to "fix" GDB on one of these
other platforms. I discuss this matter more fully in
http://sources.redhat.com/ml/gdb/2001-10/msg00036.html
I'll be revisiting this matter in a couple of weeks and will fix it
properly then. (The changes are a bit involved.)
Thanks again,
Kevin
More information about the Gdb-patches
mailing list