From 84e578fbe67910f19ed0bbbc4e8aebd0f87c462a Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Tue, 10 May 2011 16:53:23 +0000 Subject: * 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. --- gdb/linux-thread-db.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'gdb/linux-thread-db.c') 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); -- cgit v1.2.1