* 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 fc3644008ac02ec8aab55902b45ff65f316176f1..d7d366578ef1e1d6bb3584d7ba2d36843249ea0e 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 c793ea4c57e27d9180684b2d05ece983f7ece768..e26692ca7a541d0a68f9b572c7929dd452ae4fa0 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 53616b636153720fbdc9e603b7d1edf3ef32ed7c..3e6de2f6d8ee6eaff1457c4ce056ad7d50288aa9 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 0dd0c01568d69853ca052aa86c01f9af3269d594..8e6c9b5bc2461086b11ccbd31c019d607aac1309 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 bbb7801ef7cecf77f0d376341827f19bbf9aa883..a8fdac96e6828375a9f29ae2509edbda67a24a89 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 c380ac9ed451b3863e1c078cc0b59f6a78a9da7a..1681524dc6c9f2ed811d289dac94a44c62929e55 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 d1e61ffd14b835cb6383cf2816cb1728e510a486..4defb284e6475f2cf23262c44c81a908a0f94ea4 100644 (file)
@@ -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;