This is the mail archive of the gdb@sources.redhat.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]
Other format: [Raw text]

Re: GDB honouring RPATH in binaries.


On Thu, Feb 20, 2003 at 04:05:48PM -0500, Paul Koning wrote:
> >>>>> "Kevin" == Kevin Buettner <kevinb at redhat dot 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...)

Yeah, I used to see this a lot too (until we made solib-absolute-prefix
automatic in our tools).  Unfortunately there is no clear hook to
figure out if a target is remote or local; and a lot of people actually
do use gdbserver to talk to localhost... and then there's no way to
know if it's the same root or not.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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