This is the mail archive of the 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: [patch][rfc] Allow GDB to search for the right

On Thu, Apr 30, 2009 at 11:55 AM, Joel Brobecker <> wrote:

>> 1. If libthread_db_search_path is set, use it *before* trying to load
>> ? ?libthread_db from the same directory where libpthread was loaded in the
>> ? ?inferior.
> From my naive perspective (never really had a need for this feature),
> it seems better to check the path before checking the path that was
> used by the inferior. ?Otherwise, if the local host has a library
> at the same location but that's different from the library used
> by the inferior, we wouldn't be able to force the debugger to use
> a different library, would we?

Assume inferior is using remote:/a/b/c/

If host has local:/a/b/c/ which is incompatible with
remote:/a/b/c/, then
will fail, and GDB will proceed to try other paths in

But I see your point: if local:/a/b/c/ "agrees"
to work with the inferior (td_ta_new returns TD_OK), yet is the wrong one
to use for some reason, there is no way for the user to force GDB to use
an alternate libthread_db.

I'll invert the order of search, get rid of symbol lookup, and send an
updated patch shortly.

Paul Pluzhnikov

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