* defs.h (deprecated_registers_changed_hook): Delete declaration.
authorDaniel Jacobowitz <drow@false.org>
Thu, 29 Mar 2007 18:55:01 +0000 (18:55 +0000)
committerDaniel Jacobowitz <drow@false.org>
Thu, 29 Mar 2007 18:55:01 +0000 (18:55 +0000)
* 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.

gdb/ChangeLog
gdb/defs.h
gdb/interps.c
gdb/mi/mi-interp.c
gdb/regcache.c
gdb/top.c
gdb/tui/tui-hooks.c

index fc36440..d7d3665 100644 (file)
@@ -1,3 +1,17 @@
+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.
index c793ea4..e26692c 100644 (file)
@@ -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 *);
index 53616b6..3e6de2f 100644 (file)
@@ -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;
index 0dd0c01..8e6c9b5 100644 (file)
@@ -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;
index bbb7801..a8fdac9 100644 (file)
@@ -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 ()
index c380ac9..1681524 100644 (file)
--- 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). */
index d1e61ff..4defb28 100644 (file)
@@ -124,26 +124,10 @@ 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)
 {
   struct frame_info *fi;
@@ -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;