From: Daniel Jacobowitz Date: Thu, 29 Mar 2007 18:55:01 +0000 (+0000) Subject: * defs.h (deprecated_registers_changed_hook): Delete declaration. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3adda9d8c4a9d6d4487953adca344413d94a7ad2;p=binutils-gdb.git * defs.h (deprecated_registers_changed_hook): Delete declaration. * interps.c (clear_interpreter_hooks): Do not clear deprecated_registers_changed_hook. * regcache.c (registers_changed): Do not call it. * top.c (deprecated_registers_changed_hook): Do not define it. * mi/mi-interp.c (mi_command_loop): Do not clear it. * tui/tui-hooks.c (tui_install_hooks): Do not install it. (tui_remove_hooks): Do not remove it. (tui_selected_frame_level_changed_hook): Check for negative level. Use get_selected_frame. (tui_registers_changed_hook): Deleted. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fc3644008ac..d7d366578ef 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,17 @@ +2007-03-29 Daniel Jacobowitz + + * defs.h (deprecated_registers_changed_hook): Delete declaration. + * interps.c (clear_interpreter_hooks): Do not clear + deprecated_registers_changed_hook. + * regcache.c (registers_changed): Do not call it. + * top.c (deprecated_registers_changed_hook): Do not define it. + * mi/mi-interp.c (mi_command_loop): Do not clear it. + * tui/tui-hooks.c (tui_install_hooks): Do not install it. + (tui_remove_hooks): Do not remove it. + (tui_selected_frame_level_changed_hook): Check for negative level. + Use get_selected_frame. + (tui_registers_changed_hook): Deleted. + 2007-03-29 Joel Brobecker * stabsread.c (add_undefined_type): Add extra parameter. diff --git a/gdb/defs.h b/gdb/defs.h index c793ea4c57e..e26692ca7a5 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -1135,7 +1135,6 @@ 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_registers_changed_hook) (void); extern void (*deprecated_readline_begin_hook) (char *, ...) ATTRIBUTE_FPTR_PRINTF_1; extern char *(*deprecated_readline_hook) (char *); diff --git a/gdb/interps.c b/gdb/interps.c index 53616b63615..3e6de2f6d8e 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -329,7 +329,6 @@ clear_interpreter_hooks (void) deprecated_delete_breakpoint_hook = 0; deprecated_modify_breakpoint_hook = 0; deprecated_interactive_hook = 0; - deprecated_registers_changed_hook = 0; deprecated_readline_begin_hook = 0; deprecated_readline_hook = 0; deprecated_readline_end_hook = 0; diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index 0dd0c01568d..8e6c9b5bc24 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -349,7 +349,6 @@ mi_command_loop (int mi_version) deprecated_delete_breakpoint_hook = 0; deprecated_modify_breakpoint_hook = 0; deprecated_interactive_hook = 0; - deprecated_registers_changed_hook = 0; deprecated_readline_begin_hook = 0; deprecated_readline_hook = 0; deprecated_readline_end_hook = 0; diff --git a/gdb/regcache.c b/gdb/regcache.c index bbb7801ef7c..a8fdac96e68 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -464,9 +464,6 @@ registers_changed (void) for (i = 0; i < current_regcache->descr->nr_raw_registers; i++) set_register_cached (i, 0); - - if (deprecated_registers_changed_hook) - deprecated_registers_changed_hook (); } /* DEPRECATED_REGISTERS_FETCHED () diff --git a/gdb/top.c b/gdb/top.c index c380ac9ed45..1681524dc6c 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -271,11 +271,6 @@ void (*deprecated_detach_hook) (void); void (*deprecated_interactive_hook) (void); -/* Called when the registers have changed, as a hint to a GUI - to minimize window update. */ - -void (*deprecated_registers_changed_hook) (void); - /* Tell the GUI someone changed the register REGNO. -1 means that the caller does not know which register changed or that several registers have changed (see value_assign). */ diff --git a/gdb/tui/tui-hooks.c b/gdb/tui/tui-hooks.c index d1e61ffd14b..4defb284e64 100644 --- a/gdb/tui/tui-hooks.c +++ b/gdb/tui/tui-hooks.c @@ -124,25 +124,9 @@ tui_query_hook (const char * msg, va_list argp) return retval; } -/* Prevent recursion of deprecated_registers_changed_hook(). */ +/* Prevent recursion of deprecated_register_changed_hook(). */ static int tui_refreshing_registers = 0; -static void -tui_registers_changed_hook (void) -{ - struct frame_info *fi; - - fi = get_selected_frame (NULL); - if (tui_refreshing_registers == 0) - { - tui_refreshing_registers = 1; -#if 0 - tui_check_data_values (fi); -#endif - tui_refreshing_registers = 0; - } -} - static void tui_register_changed_hook (int regno) { @@ -230,7 +214,11 @@ tui_selected_frame_level_changed_hook (int level) { struct frame_info *fi; - fi = deprecated_safe_get_selected_frame (); + /* Negative level means that the selected frame was cleared. */ + if (level < 0) + return; + + fi = get_selected_frame (NULL); /* Ensure that symbols for this frame are read in. Also, determine the source language of this frame, and switch to it if desired. */ if (fi) @@ -289,7 +277,6 @@ tui_install_hooks (void) /* Install the event hooks. */ tui_old_event_hooks = deprecated_set_gdb_event_hooks (&tui_event_hooks); - deprecated_registers_changed_hook = tui_registers_changed_hook; deprecated_register_changed_hook = tui_register_changed_hook; deprecated_detach_hook = tui_detach_hook; } @@ -302,7 +289,6 @@ tui_remove_hooks (void) deprecated_selected_frame_level_changed_hook = 0; deprecated_print_frame_info_listing_hook = 0; deprecated_query_hook = 0; - deprecated_registers_changed_hook = 0; deprecated_register_changed_hook = 0; deprecated_detach_hook = 0;