summaryrefslogtreecommitdiffstats
path: root/gdb/annotate.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-07-28 17:53:52 +0000
committerTom Tromey <tromey@redhat.com>2008-07-28 17:53:52 +0000
commit7f4b89d1b63f8ba812b911639f264b8e7ff51285 (patch)
tree9f6fcf202733155f065bdb221bddc5f98c7b8a3f /gdb/annotate.c
parent8641e68297c9812b59ab59f786c00087d15feec9 (diff)
downloadppe42-binutils-7f4b89d1b63f8ba812b911639f264b8e7ff51285.tar.gz
ppe42-binutils-7f4b89d1b63f8ba812b911639f264b8e7ff51285.zip
* annotate.h (deprecated_annotate_starting_hook): Remove.
(deprecated_annotate_stopped_hook): Remove. (deprecated_annotate_exited_hook): Remove. * Makefile.in (annotate.o): Depend on observer_h. * top.c (deprecated_delete_breakpoint_hook): Remove. (deprecated_create_breakpoint_hook): Likewise. (deprecated_modify_breakpoint_hook): Likewise. * interps.c (clear_interpreter_hooks): Update for removed hooks. * breakpoint.c (mention): Don't call removed hook. (delete_breakpoint): Likewise. (disable_breakpoint): Likewise. (do_enable_breakpoint): Likewise. * annotate.c: Include observer.h. (breakpoint_changed): Change type of argument. (_initialize_annotate): Register observers. (deprecated_annotate_starting_hook): Remove. (deprecated_annotate_stopped_hook): Remove. (deprecated_annotate_exited_hook): Remove. (annotate_starting): Update for hook removal. (annotate_stopped): Likewise. (annotate_exited): Likewise. * defs.h (deprecated_delete_breakpoint_hook): Remove. (deprecated_create_breakpoint_hook): Likewise. (deprecated_modify_breakpoint_hook): Likewise.
Diffstat (limited to 'gdb/annotate.c')
-rw-r--r--gdb/annotate.c43
1 files changed, 12 insertions, 31 deletions
diff --git a/gdb/annotate.c b/gdb/annotate.c
index 98a37aea42..ed608b6248 100644
--- a/gdb/annotate.c
+++ b/gdb/annotate.c
@@ -23,6 +23,7 @@
#include "target.h"
#include "gdbtypes.h"
#include "breakpoint.h"
+#include "observer.h"
/* Prototypes for local functions. */
@@ -31,13 +32,11 @@ extern void _initialize_annotate (void);
static void print_value_flags (struct type *);
-static void breakpoint_changed (struct breakpoint *);
+static void breakpoint_changed (int);
+
-void (*deprecated_annotate_starting_hook) (void);
-void (*deprecated_annotate_stopped_hook) (void);
void (*deprecated_annotate_signalled_hook) (void);
void (*deprecated_annotate_signal_hook) (void);
-void (*deprecated_annotate_exited_hook) (void);
static int ignore_count_changed = 0;
@@ -99,28 +98,15 @@ annotate_watchpoint (int num)
void
annotate_starting (void)
{
-
- if (deprecated_annotate_starting_hook)
- deprecated_annotate_starting_hook ();
- else
- {
- if (annotation_level > 1)
- {
- printf_filtered (("\n\032\032starting\n"));
- }
- }
+ if (annotation_level > 1)
+ printf_filtered (("\n\032\032starting\n"));
}
void
annotate_stopped (void)
{
- if (deprecated_annotate_stopped_hook)
- deprecated_annotate_stopped_hook ();
- else
- {
- if (annotation_level > 1)
- printf_filtered (("\n\032\032stopped\n"));
- }
+ if (annotation_level > 1)
+ printf_filtered (("\n\032\032stopped\n"));
if (annotation_level > 1 && ignore_count_changed)
{
ignore_count_changed = 0;
@@ -131,13 +117,8 @@ annotate_stopped (void)
void
annotate_exited (int exitstatus)
{
- if (deprecated_annotate_exited_hook)
- deprecated_annotate_exited_hook ();
- else
- {
- if (annotation_level > 1)
- printf_filtered (("\n\032\032exited %d\n"), exitstatus);
- }
+ if (annotation_level > 1)
+ printf_filtered (("\n\032\032exited %d\n"), exitstatus);
}
void
@@ -578,7 +559,7 @@ annotate_array_section_end (void)
}
static void
-breakpoint_changed (struct breakpoint *b)
+breakpoint_changed (int bpno)
{
breakpoints_changed ();
}
@@ -588,7 +569,7 @@ _initialize_annotate (void)
{
if (annotation_level == 2)
{
- deprecated_delete_breakpoint_hook = breakpoint_changed;
- deprecated_modify_breakpoint_hook = breakpoint_changed;
+ observer_attach_breakpoint_deleted (breakpoint_changed);
+ observer_attach_breakpoint_modified (breakpoint_changed);
}
}
OpenPOWER on IntegriCloud