aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc/gdb.texinfo
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2009-05-15 16:53:45 +0000
committerPaul Pluzhnikov <ppluzhnikov@google.com>2009-05-15 16:53:45 +0000
commit17a37d488c16b07d3a1f069ef727e2e53c622722 (patch)
tree7caff201046bdcd0eeecbc877162c49dfd64dc8a /gdb/doc/gdb.texinfo
parentd127ecce68b9052033148696008a8a905f661301 (diff)
downloadgdb-17a37d488c16b07d3a1f069ef727e2e53c622722.zip
gdb-17a37d488c16b07d3a1f069ef727e2e53c622722.tar.gz
gdb-17a37d488c16b07d3a1f069ef727e2e53c622722.tar.bz2
2009-05-15 Paul Pluzhnikov <ppluzhnikov@google.com>
* NEWS: Mention set/show libthread-db-search-path. * gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): New define. (LIBTHREAD_DB_SO): Moved from linux-thread-db.c * linux-thread-db.c (libthread_db_search_path): New setting. (thread_db_handle): New variable (replaces using_thread_db). (try_thread_db_load_1): New function. (try_thread_db_load, thread_db_load_search): Likewise. (dladdr_to_soname): Likewise. (thread_db_load): Iterate over possibly multiple libthread_db's. (check_for_thread_db): Attempt to load new libthread_db. (thread_db_detach, thread_db_wait): Unload libthread_db. (thread_db_mourn_inferior): Likewise. (_initialize_thread_db): Add new libthread-db-search-path option. Defer loading of libthread_db to check_for_thread_db. * solib.c (libpthread_name_p): New function. (libpthread_solib_p): Call it. * solib.h (libpthread_name_p): New prototype.
Diffstat (limited to 'gdb/doc/gdb.texinfo')
-rw-r--r--gdb/doc/gdb.texinfo35
1 files changed, 35 insertions, 0 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 0940790..b7bf14e 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -2430,6 +2430,9 @@ a command to apply a command to a list of threads
@item thread-specific breakpoints
@item @samp{set print thread-events}, which controls printing of
messages on thread start and exit.
+@item @samp{set libthread-db-search-path @var{path}}, which lets
+the user specify which @code{libthread_db} to use if the default choice
+isn't compatible with the program.
@end itemize
@quotation
@@ -2648,6 +2651,38 @@ programs with multiple threads.
@xref{Set Watchpoints,,Setting Watchpoints}, for information about
watchpoints in programs with multiple threads.
+@table @code
+@kindex set libthread-db-search-path
+@cindex search path for @code{libthread_db}
+@item set libthread-db-search-path @r{[}@var{path}@r{]}
+If this variable is set, @var{path} is a colon-separated list of
+directories @value{GDBN} will use to search for @code{libthread_db}.
+If you omit @var{path}, @samp{libthread-db-search-path} will be reset to
+an empty list.
+
+On @sc{gnu}/Linux and Solaris systems, @value{GDBN} uses a ``helper''
+@code{libthread_db} library to obtain information about threads in the
+inferior process. @value{GDBN} will use @samp{libthread-db-search-path}
+to find @code{libthread_db}. If that fails, @value{GDBN} will continue
+with default system shared library directories, and finally the directory
+from which @code{libpthread} was loaded in the inferior process.
+
+For any @code{libthread_db} library @value{GDBN} finds in above directories,
+@value{GDBN} attempts to initialize it with the current inferior process.
+If this initialization fails (which could happen because of a version
+mismatch between @code{libthread_db} and @code{libpthread}), @value{GDBN}
+will unload @code{libthread_db}, and continue with the next directory.
+If none of @code{libthread_db} libraries initialize successfully,
+@value{GDBN} will issue a warning and thread debugging will be disabled.
+
+Setting @code{libthread-db-search-path} is currently implemented
+only on some platforms.
+
+@kindex show libthread-db-search-path
+@item show libthread-db-search-path
+Display current libthread_db search path.
+@end table
+
@node Processes
@section Debugging Programs with Multiple Processes