aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2003-02-20 18:25:27 +0000
committerKevin Buettner <kevinb@redhat.com>2003-02-20 18:25:27 +0000
commitcf466558d0faa40bd6cc78b7f4e983c5a3ec883b (patch)
tree0155efb67714900d5866bf1ec6c62e76fa0aea2f
parentde5ad195ef7f521cd021746f49f8c4c5c64e7872 (diff)
downloadgdb-cf466558d0faa40bd6cc78b7f4e983c5a3ec883b.zip
gdb-cf466558d0faa40bd6cc78b7f4e983c5a3ec883b.tar.gz
gdb-cf466558d0faa40bd6cc78b7f4e983c5a3ec883b.tar.bz2
* solib.c (reload_shared_libraries): New function.
(_initialize_solib): Add callbacks for ``set solib-search-path'' and ``set solib-absolute-prefix''.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/solib.c9
2 files changed, 15 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bdc87b4..9e9a387 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2003-02-20 Kevin Buettner <kevinb@redhat.com>
+
+ * solib.c (reload_shared_libraries): New function.
+ (_initialize_solib): Add callbacks for ``set solib-search-path''
+ and ``set solib-absolute-prefix''.
+
2003-02-20 David Carlton <carlton@math.stanford.edu>
* symtab.h (SYMBOL_PRINT_NAME): Rename from SYMBOL_SOURCE_NAME;
diff --git a/gdb/solib.c b/gdb/solib.c
index a49614b..da71798 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -844,6 +844,13 @@ no_shared_libraries (char *ignored, int from_tty)
do_clear_solib (NULL);
}
+static void
+reload_shared_libraries (char *ignored, int from_tty)
+{
+ no_shared_libraries (NULL, from_tty);
+ solib_add (NULL, from_tty, NULL, auto_solib_add);
+}
+
void
_initialize_solib (void)
{
@@ -873,6 +880,7 @@ inferior. Otherwise, symbols must be loaded manually, using `sharedlibrary'.",
For other (relative) files, you can add values using `set solib-search-path'.",
&setlist);
add_show_from_set (c, &showlist);
+ set_cmd_cfunc (c, reload_shared_libraries);
set_cmd_completer (c, filename_completer);
/* Set the default value of "solib-absolute-prefix" from the sysroot, if
@@ -885,5 +893,6 @@ For other (relative) files, you can add values using `set solib-search-path'.",
This takes precedence over the environment variables PATH and LD_LIBRARY_PATH.",
&setlist);
add_show_from_set (c, &showlist);
+ set_cmd_cfunc (c, reload_shared_libraries);
set_cmd_completer (c, filename_completer);
}