gdb/
[deliverable/binutils-gdb.git] / gdb / top.c
index a138480e5e43d10a4e3df463601dab087fe40f6d..061ad48f41e756cc22032490543f7a77037e8d10 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -47,6 +47,7 @@
 #include "gdbthread.h"
 #include "python/python.h"
 #include "interps.h"
+#include "observer.h"
 
 /* readline include files.  */
 #include "readline/readline.h"
@@ -1559,6 +1560,15 @@ show_exec_done_display_p (struct ui_file *file, int from_tty,
                            "asynchronous execution commands is %s.\n"),
                    value);
 }
+
+/* "set" command for the gdb_datadir configuration variable.  */
+
+static void
+set_gdb_datadir (char *args, int from_tty, struct cmd_list_element *c)
+{
+  observer_notify_gdb_datadir_changed ();
+}
+
 static void
 init_main (void)
 {
@@ -1666,7 +1676,7 @@ Use \"on\" to enable the notification, and \"off\" to disable it."),
                            _("Show GDB's data directory."),
                            _("\
 When set, GDB uses the specified path to search for data files."),
-                           NULL, NULL,
+                           set_gdb_datadir, NULL,
                            &setlist,
                            &showlist);
 }
This page took 0.035371 seconds and 4 git commands to generate.