diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-05-07 22:51:55 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-05-07 22:51:55 +0000 |
commit | 2b4855ab6b8e69b375c49df490db63ececf17da8 (patch) | |
tree | fa50b31fc2d7328ee97a0468805e0a05a3f7fd03 /gdb/observer.c | |
parent | ba3e8e46435a896352acc4be831145dfec819f5f (diff) | |
download | gdb-2b4855ab6b8e69b375c49df490db63ececf17da8.zip gdb-2b4855ab6b8e69b375c49df490db63ececf17da8.tar.gz gdb-2b4855ab6b8e69b375c49df490db63ececf17da8.tar.bz2 |
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.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/observer.c b/gdb/observer.c index 53916ce..6bdcdf5 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" |