From f5ebfba0cad0523f81fe510be73c90edd6e2b17b Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 13 Jan 2003 17:59:49 +0000 Subject: [PATCH] * gdb.texinfo (Files): Document solib-absolute-prefix and solib-search-path. --- gdb/doc/ChangeLog | 5 +++++ gdb/doc/gdb.texinfo | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index daa6a8eaa5..6aacaab860 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2003-01-13 Daniel Jacobowitz + + * gdb.texinfo (Files): Document solib-absolute-prefix and + solib-search-path. + 2003-01-09 Michael Chastain * gdbint.texinfo (Configuring @value{GDBN} for Release): Delete. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 8bfce2f0ca..bb67bc35c0 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -9719,6 +9719,49 @@ Mb). Display the current autoloading size threshold, in megabytes. @end table +Shared libraries are also supported in many cross or remote debugging +configurations. A copy of the target's libraries need to be present on the +host system; they need to be the same as the target libraries, although the +copies on the target can be stripped as long as the copies on the host are +not. + +You need to tell @value{GDBN} where the target libraries are, so that it can +load the correct copies---otherwise, it may try to load the host's libraries. +@value{GDBN} has two variables to specify the search directories for target +libraries. + +@table @code +@kindex set solib-absolute-prefix +@item set solib-absolute-prefix @var{path} +If this variable is set, @var{path} will be used as a prefix for any +absolute shared library paths; many runtime loaders store the absolute +paths to the shared library in the target program's memory. If you use +@samp{solib-absolute-prefix} to find shared libraries, they need to be laid +out in the same way that they are on the target, with e.g.@: a +@file{/usr/lib} hierarchy under @var{path}. + +You can set the default value of @samp{solib-absolute-prefix} by using the +configure-time @samp{--with-sysroot} option. + +@kindex show solib-absolute-prefix +@item show solib-absolute-prefix +Display the current shared library prefix. + +@kindex set solib-search-path +@item set solib-search-path @var{path} +If this variable is set, @var{path} is a colon-separated list of directories +to search for shared libraries. @samp{solib-search-path} is used after +@samp{solib-absolute-prefix} fails to locate the library, or if the path to +the library is relative instead of absolute. If you want to use +@samp{solib-search-path} instead of @samp{solib-absolute-prefix}, be sure to +set @samp{solib-absolute-prefix} to a nonexistant directory to prevent +@value{GDBN} from finding your host's libraries. + +@kindex show solib-search-path +@item show solib-search-path +Display the current shared library search path. +@end table + @node Symbol Errors @section Errors reading symbol files