summaryrefslogtreecommitdiff
path: root/gdb/observer.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-05-07 22:51:55 +0000
committerAndrew Cagney <cagney@redhat.com>2004-05-07 22:51:55 +0000
commit49a61d011537d5aa339b49a00996be3790e6d538 (patch)
tree55a1e71a219d5c99d422e8134c7a2851ee39c065 /gdb/observer.c
parentfc8b50aabc27428e2a751b46ae150db413a6b3c3 (diff)
downloadgdb-49a61d011537d5aa339b49a00996be3790e6d538.tar.gz
2004-05-07 Andrew Cagney <cagney@redhat.com>
* observer.c: Include "commands.h" and "gdbcmd.h". (observer_debug, _initialize_observer): Add the command "set/show debug observer". * observer.sh: When observer debugging, log notify calls. * Makefile.in (observer.o): Update dependencies. Index: doc/ChangeLog 2004-05-07 Andrew Cagney <cagney@redhat.com> * observer.texi (GDB Observers): Add "Debugging" section. Include cross reference to "set/show debug observer". * gdb.texinfo (Debugging Output): Document "set/show debug observer".
Diffstat (limited to 'gdb/observer.c')
-rw-r--r--gdb/observer.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/observer.c b/gdb/observer.c
index 53916ced5da..6bdcdf5b452 100644
--- a/gdb/observer.c
+++ b/gdb/observer.c
@@ -52,6 +52,10 @@
#include "defs.h"
#include "observer.h"
+#include "command.h"
+#include "gdbcmd.h"
+
+static int observer_debug;
/* The internal generic observer. */
@@ -189,4 +193,18 @@ observer_test_third_notification_function (struct bpstats *bs)
observer_test_third_observer++;
}
+extern initialize_file_ftype _initialize_observer; /* -Wmissing-prototypes */
+
+void
+_initialize_observer (void)
+{
+ add_setshow_zinteger_cmd ("observer", class_maintenance, &observer_debug, "\
+Set observer debugging.\n\
+When non-zero, observer debugging is enabled.", "\
+Show observer debugging.\n\
+When non-zero, observer debugging is enabled.",
+ NULL, NULL,
+ &setdebuglist, &showdebuglist);
+}
+
#include "observer.inc"