aboutsummaryrefslogtreecommitdiff
path: root/gdb/observer.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-04-15 14:29:21 +0000
committerAndrew Cagney <cagney@redhat.com>2004-04-15 14:29:21 +0000
commit7a46442073403bcb8560c4763768aecee620846b (patch)
tree7804ba214359560a69ce42a7d5723e3bc0102d8f /gdb/observer.c
parente36ad5279939b02e2506528bcd786f94480549b2 (diff)
downloadfsf-binutils-gdb-7a46442073403bcb8560c4763768aecee620846b.zip
fsf-binutils-gdb-7a46442073403bcb8560c4763768aecee620846b.tar.gz
fsf-binutils-gdb-7a46442073403bcb8560c4763768aecee620846b.tar.bz2
2004-04-15 Andrew Cagney <cagney@redhat.com>
* observer.c (normal_stop_subject, observer_notify_normal_stop) (observer_normal_stop_notification_stub) (observer_attach_normal_stop, observer_detach_normal_stop): Delete, replaced by #include "observer.inc". * infrun.c (normal_stop): Pass "stop_bpstat" to observer_notify_normal_stop. * Makefile.in (observer_inc): Define. (observer.o): Update dependencies. (observer.h, observer.inc): New rules. * observer.h: Delete file. * observer.sh: New file. Index: doc/ChangeLog 2004-04-08 Andrew Cagney <cagney@redhat.com> * observer.texi (GDB Observers): Rework, provide generic observer definitions and then a list of observable events.
Diffstat (limited to 'gdb/observer.c')
-rw-r--r--gdb/observer.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/gdb/observer.c b/gdb/observer.c
index fce5f92..20bc8aa 100644
--- a/gdb/observer.c
+++ b/gdb/observer.c
@@ -159,37 +159,6 @@ generic_observer_notify (struct observer_list *subject, const void *args)
}
}
-/* normal_stop notifications. */
-
-static struct observer_list *normal_stop_subject = NULL;
-
-static void
-observer_normal_stop_notification_stub (const void *data,
- const void *unused_args)
-{
- observer_normal_stop_ftype *notify = (observer_normal_stop_ftype *) data;
- (*notify) ();
-}
-
-struct observer *
-observer_attach_normal_stop (observer_normal_stop_ftype *f)
-{
- return generic_observer_attach (&normal_stop_subject,
- &observer_normal_stop_notification_stub,
- (void *) f);
-}
-
-void
-observer_detach_normal_stop (struct observer *observer)
-{
- generic_observer_detach (&normal_stop_subject, observer);
-}
-
-void
-observer_notify_normal_stop (void)
-{
- generic_observer_notify (normal_stop_subject, NULL);
-}
/* The following code is only used to unit-test the observers from our
testsuite. DO NOT USE IT within observer.c (or anywhere else for
@@ -220,3 +189,4 @@ observer_test_third_notification_function (void)
observer_test_third_observer++;
}
+#include "observer.inc"