gdb/633: fully qualified pathnames in solib_map_sections() and remote debugging
Kevin Buettner
kevinb@redhat.com
Fri Aug 9 16:12:00 GMT 2002
On Aug 6, 9:20am, Daniel Jacobowitz wrote:
> Global variable SOLIB_ABSOLUTE_PREFIX is used as a prefix directory
> to search for shared libraries if they have an absolute path.
>
> Global variable SOLIB_SEARCH_PATH is used as a prefix directory
> (or set of directories, as in LD_LIBRARY_PATH) to search for all
> shared libraries if not found in SOLIB_ABSOLUTE_PREFIX.
>
> Search order:
> * If path is absolute, look in SOLIB_ABSOLUTE_PREFIX.
> * If path is absolute or relative, look for it literally (unmodified).
> * Look in SOLIB_SEARCH_PATH.
> * Look in inferior's $PATH.
> * Look in inferior's $LD_LIBRARY_PATH.
>
>
> 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?)
> 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!
Kevin
More information about the Gdb
mailing list