Re: GDB honouring RPATH in binaries.

Kevin Buettner
2003-02-20T20:18:10Z

On Feb 20, 4:05pm, Paul Koning wrote:

> >>>>> "Kevin" == Kevin Buettner <kevinb@redhat.com> writes:
>
> Kevin> For remote targets, you must have solib-absolute-prefix set.
> Kevin> Searching host libraries (whether found via RPATH or some
> Kevin> other means) is almost invariably wrong.
>
> I'd omit "almost". In fact, it would be useful if gdb could complain
> for a remote debug when solib-absolute-prefix isn't set. That would
> eliminate a lot of confusion when people forget to set it. When
> debugging MIPS code, gdb is perfectly happy to load shared file symbol
> tables from /usr/lib, even though those are x86 binaries! The result
> is utter chaos, of course. It would be helpful if gdb prevented that
> sort of simple user error. (I suppose another way to avoid that is to
> have gdb check that the shared library it's examining is at least
> meant for the same processor family, and I suppose the same
> endianness...)

Another somewhat more subtle problem is when the user does have
solib-absolute-prefix set, but, somehow, a mismatch between the
libraries stored in the host's sysroot and the target occurs.

It might be useful to compare the bytes in the readonly sections as
found on the target and host's sysroot to make sure that the file
is likely the same. (I think Daniel J mentioned something about
doing a checksum a while back.)

Kevin