+2007-03-29 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * 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 <brobecker@adacore.com>
* stabsread.c (add_undefined_type): Add extra parameter.
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 *);
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;
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;
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 ()
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). */
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)
{
{
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)
/* 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;
}
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;