summaryrefslogtreecommitdiff
path: root/gdb/linux-thread-db.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2011-05-10 16:53:18 +0000
committerDoug Evans <dje@google.com>2011-05-10 16:53:18 +0000
commit10dfcaa51cc1ea3e49016de66bd408caded2e9d8 (patch)
tree327350f82f7f33b2b3a0126eb794710dc6c73c05 /gdb/linux-thread-db.c
parent3248de0b35901423585ea213f7d5985fe5146b38 (diff)
downloadgdb-10dfcaa51cc1ea3e49016de66bd408caded2e9d8.tar.gz
* linux-thread-db.c (set_libthread_db_search_path): New function.
(_initialize_thread_db): Add setter for libthread-db-search-path. gdbserver/ * thread-db.c (thread_db_handle_monitor_command): Handle elided path. doc/ * gdb.texinfo (Threads): If an empty path is provided for libthread-db-search-path it is reset to its default value. (Server): Ditto.
Diffstat (limited to 'gdb/linux-thread-db.c')
-rw-r--r--gdb/linux-thread-db.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 2700a65865e..42035181524 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -75,6 +75,17 @@
static char *libthread_db_search_path;
+static void
+set_libthread_db_search_path (char *ignored, int from_tty,
+ struct cmd_list_element *c)
+{
+ if (*libthread_db_search_path == '\0')
+ {
+ xfree (libthread_db_search_path);
+ libthread_db_search_path = xstrdup (LIBTHREAD_DB_SEARCH_PATH);
+ }
+}
+
/* If non-zero, print details of libthread_db processing. */
static int libthread_db_debug;
@@ -1719,8 +1730,10 @@ _initialize_thread_db (void)
Set search path for libthread_db."), _("\
Show the current search path or libthread_db."), _("\
This path is used to search for libthread_db to be loaded into \
-gdb itself."),
- NULL,
+gdb itself.\n\
+Its value is a colon (':') separate list of directories to search.\n\
+Setting the search path to an empty list resets it to its default value."),
+ set_libthread_db_search_path,
NULL,
&setlist, &showlist);