summaryrefslogtreecommitdiff
path: root/gdb/linux-thread-db.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2011-05-10 16:53:23 +0000
committerDoug Evans <dje@google.com>2011-05-10 16:53:23 +0000
commit84e578fbe67910f19ed0bbbc4e8aebd0f87c462a (patch)
tree913caccda7e412c55dba0287b11d7a797d54f7b0 /gdb/linux-thread-db.c
parent7e665af3af6fdf33dfcbecaa95ccdaa34b285008 (diff)
downloadbinutils-gdb-84e578fbe67910f19ed0bbbc4e8aebd0f87c462a.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);