2003-05-19 David Carlton <carlton@bactrian.org>
[deliverable/binutils-gdb.git] / gdb / observer.c
index 92ec48e614fb261726018d684f21aa7f62e6f601..6815d0f9c833093464919ae3dbc7ca31cfbea96e 100644 (file)
@@ -190,3 +190,33 @@ 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!  */
+
+/* Since this code will not be used within GDB, it will trigger
+   a warning if we decide to compile with -Wunused-function.
+   This is ok for now.  (brobecker 2003-03-18)  */
+static int observer_test_first_observer = 0;
+static int observer_test_second_observer = 0;
+static int observer_test_third_observer = 0;
+
+static void
+observer_test_first_notification_function (void)
+{
+  observer_test_first_observer++;
+}
+
+static void
+observer_test_second_notification_function (void)
+{
+  observer_test_second_observer++;
+}
+
+static void
+observer_test_third_notification_function (void)
+{
+  observer_test_third_observer++;
+}
+
This page took 0.023716 seconds and 4 git commands to generate.