diff options
author | Tom Tromey <tromey@redhat.com> | 2008-07-28 17:53:52 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2008-07-28 17:53:52 +0000 |
commit | 7f4b89d1b63f8ba812b911639f264b8e7ff51285 (patch) | |
tree | 9f6fcf202733155f065bdb221bddc5f98c7b8a3f /gdb | |
parent | 8641e68297c9812b59ab59f786c00087d15feec9 (diff) | |
download | gdb-7f4b89d1b63f8ba812b911639f264b8e7ff51285.zip gdb-7f4b89d1b63f8ba812b911639f264b8e7ff51285.tar.gz gdb-7f4b89d1b63f8ba812b911639f264b8e7ff51285.tar.bz2 |
* 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')
-rw-r--r-- | gdb/ChangeLog | 27 | ||||
-rw-r--r-- | gdb/Makefile.in | 2 | ||||
-rw-r--r-- | gdb/annotate.c | 43 | ||||
-rw-r--r-- | gdb/annotate.h | 3 | ||||
-rw-r--r-- | gdb/breakpoint.c | 11 | ||||
-rw-r--r-- | gdb/defs.h | 3 | ||||
-rw-r--r-- | gdb/interps.c | 3 | ||||
-rw-r--r-- | gdb/top.c | 7 |
8 files changed, 41 insertions, 58 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a93bee8..1c0129c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,32 @@ 2008-07-28 Tom Tromey <tromey@redhat.com> + * 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. + +2008-07-28 Tom Tromey <tromey@redhat.com> + * main.c (captured_main): Don't use BEFORE_MAIN_LOOP_HOOK. 2008-07-27 Daniel Jacobowitz <dan@codesourcery.com> diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 312a8df..a24e29b 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1908,7 +1908,7 @@ amd64-tdep.o: amd64-tdep.c $(defs_h) $(arch_utils_h) $(block_h) \ $(regset_h) $(symfile_h) $(gdb_assert_h) $(amd64_tdep_h) \ $(i387_tdep_h) annotate.o: annotate.c $(defs_h) $(annotate_h) $(value_h) $(target_h) \ - $(gdbtypes_h) $(breakpoint_h) + $(gdbtypes_h) $(breakpoint_h) $(observer_h) arch-utils.o: arch-utils.c $(defs_h) $(arch_utils_h) $(buildsym_h) \ $(gdbcmd_h) $(inferior_h) $(gdb_string_h) $(regcache_h) \ $(gdb_assert_h) $(sim_regno_h) $(gdbcore_h) $(osabi_h) $(version_h) \ diff --git a/gdb/annotate.c b/gdb/annotate.c index 98a37ae..ed608b6 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); } } diff --git a/gdb/annotate.h b/gdb/annotate.h index bbc274f..6fb1954 100644 --- a/gdb/annotate.h +++ b/gdb/annotate.h @@ -99,8 +99,5 @@ extern void annotate_elt_rep_end (void); extern void annotate_elt (void); extern void annotate_array_section_end (void); -extern void (*deprecated_annotate_starting_hook) (void); -extern void (*deprecated_annotate_stopped_hook) (void); extern void (*deprecated_annotate_signalled_hook) (void); extern void (*deprecated_annotate_signal_hook) (void); -extern void (*deprecated_annotate_exited_hook) (void); diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 3324f20..5f2404d 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -4890,10 +4890,7 @@ mention (struct breakpoint *b) /* FIXME: This is misplaced; mention() is called by things (like hitting a watchpoint) other than breakpoint creation. It should be possible to clean this up and at the same time replace the - random calls to breakpoint_changed with this hook, as has already - been done for deprecated_delete_breakpoint_hook and so on. */ - if (deprecated_create_breakpoint_hook) - deprecated_create_breakpoint_hook (b); + random calls to breakpoint_changed with this hook. */ observer_notify_breakpoint_created (b->number); if (b->ops != NULL && b->ops->print_mention != NULL) @@ -7213,8 +7210,6 @@ delete_breakpoint (struct breakpoint *bpt) if (bpt->type == bp_none) return; - if (deprecated_delete_breakpoint_hook) - deprecated_delete_breakpoint_hook (bpt); observer_notify_breakpoint_deleted (bpt->number); if (breakpoint_chain == bpt) @@ -7868,8 +7863,6 @@ disable_breakpoint (struct breakpoint *bpt) update_global_location_list (0); - if (deprecated_modify_breakpoint_hook) - deprecated_modify_breakpoint_hook (bpt); observer_notify_breakpoint_modified (bpt->number); } @@ -7993,8 +7986,6 @@ have been allocated for other watchpoints.\n"), bpt->number); update_global_location_list (1); breakpoints_changed (); - if (deprecated_modify_breakpoint_hook) - deprecated_modify_breakpoint_hook (bpt); observer_notify_breakpoint_modified (bpt->number); } @@ -1053,9 +1053,6 @@ extern int (*deprecated_query_hook) (const char *, va_list) extern void (*deprecated_warning_hook) (const char *, va_list) ATTRIBUTE_FPTR_PRINTF(1,0); extern void (*deprecated_flush_hook) (struct ui_file * stream); -extern void (*deprecated_create_breakpoint_hook) (struct breakpoint * b); -extern void (*deprecated_delete_breakpoint_hook) (struct breakpoint * bpt); -extern void (*deprecated_modify_breakpoint_hook) (struct breakpoint * bpt); extern void (*deprecated_interactive_hook) (void); extern void (*deprecated_readline_begin_hook) (char *, ...) ATTRIBUTE_FPTR_PRINTF_1; diff --git a/gdb/interps.c b/gdb/interps.c index 194ac62..3bb7811 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -336,9 +336,6 @@ clear_interpreter_hooks (void) /*print_frame_more_info_hook = 0; */ deprecated_query_hook = 0; deprecated_warning_hook = 0; - deprecated_create_breakpoint_hook = 0; - deprecated_delete_breakpoint_hook = 0; - deprecated_modify_breakpoint_hook = 0; deprecated_interactive_hook = 0; deprecated_readline_begin_hook = 0; deprecated_readline_hook = 0; @@ -246,13 +246,6 @@ void (*deprecated_readline_begin_hook) (char *, ...); char *(*deprecated_readline_hook) (char *); void (*deprecated_readline_end_hook) (void); -/* Called as appropriate to notify the interface of the specified breakpoint - conditions. */ - -void (*deprecated_create_breakpoint_hook) (struct breakpoint * bpt); -void (*deprecated_delete_breakpoint_hook) (struct breakpoint * bpt); -void (*deprecated_modify_breakpoint_hook) (struct breakpoint * bpt); - /* Called as appropriate to notify the interface that we have attached to or detached from an already running process. */ |