This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/633: fully qualified pathnames in solib_map_sections() and remote debugging
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 12 Aug 2002 14:38:01 -0000
- Subject: Re: gdb/633: fully qualified pathnames in solib_map_sections() and remote debugging
- Reply-to: Daniel Jacobowitz <drow at mvista dot com>
The following reply was made to PR gdb/633; it has been noted by GNATS.
From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <ac131313@ges.redhat.com>
Cc: Kevin Buettner <kevinb@redhat.com>, jorma.laaksonen@hut.fi,
gdb-gnats@sources.redhat.com, gdb@sources.redhat.com
Subject: Re: gdb/633: fully qualified pathnames in solib_map_sections() and remote debugging
Date: Mon, 12 Aug 2002 10:38:03 -0400
On Mon, Aug 12, 2002 at 10:28:33AM -0400, Andrew Cagney wrote:
>
> >>> I think the search order needs some revision though:
> >>> - A cross debugger should not search $PATH or $LD_LIBRARY_PATH
> >
> >>
> >>I agree with this.
> >>
> >
> >>> - A cross debugger may, or may not, want to look for the unmodified
> >>> path; I suspect that we only want to look for unmodified relative
> >>> paths, not unmodified absolute ones.
> >
> >>
> >>I agree regarding absolute paths.
> >>
> >>For relative paths, I'm not convinced that it's all that useful to
> >>look at the unmodified path. (Doing so requires that you have your
> >>cwd set correctly, right?)
> >
> >
> >Yes; I think that's not too unreasonable, though. I can go either way
> >on this one; I believe it never comes up in GNU/Linux since the linker
> >fills in the full path in the link map. Not 100% sure of that,
> >however.
> >
> >
> >>> With those changes you would have to explicitly specify the path to
> >>> DSOs in a cross debugger via solib-absolute-prefix and
> >>> solib-search-path,
> >
> >>
> >>I think this would be good...
> >>
> >
> >>> and GDB would stop picking up the host libpthread.so
> >>> and making gdbserver segfault...
> >
> >>
> >>...and this too!
> >
> >
> >This leaves only the question of "how". I don't want to change the
> >behavior for a native debugger using the remote protocol; just for
> >non-native debuggers. How should I check for this? Using configury to
> >do it seems contrary to the direction gdbarch is going (i.e. a both
> >native and cross debugger in one binary).
>
> This is a target environment thing? So why not ask the target:
>
> target_getenv()
> -> qGetenv:<STRING>
> <- value
No (although I will get back to qGetenv later... :). We're discussing
the behavior of the function solib.c:solib_open. It should vary
depending on whether the current target is native or not, and I don't
know how to figure that out correctly.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer