This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Updates for deprecated ui_loop_hook


Needs to be integrated into the event loop.

Andrew
2004-06-25  Andrew Cagney  <cagney@gnu.org>

	* generic/gdbtk.h: "ui_loop_hook" was deprecated, update.
	* generic/gdbtk-hooks.c (gdbtk_add_hooks, x_event): Ditto.
	* generic/gdbtk-cmds.c: Ditto.

Index: generic/gdbtk-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
retrieving revision 1.81
diff -p -u -r1.81 gdbtk-cmds.c
--- generic/gdbtk-cmds.c	15 Jun 2004 01:01:44 -0000	1.81
+++ generic/gdbtk-cmds.c	25 Jun 2004 19:43:57 -0000
@@ -517,9 +517,9 @@ gdb_force_quit (ClientData clientData, T
  * stop the target. If, after some short time, this fails, a dialog
  * should appear allowing the user to detach.
  *
- * The global GDBTK_FORCE_DETACH is set when we wish to detach
- * from a target. This value is returned by ui_loop_hook (x_event),
- * indicating to callers that they should detach.
+ * The global GDBTK_FORCE_DETACH is set when we wish to detach from a
+ * target. This value is returned by deprecated_ui_loop_hook
+ * (x_event), indicating to callers that they should detach.
  *
  * Read the comments before x_event to find out how we (try) to keep
  * gdbtk alive while some other event loop has stolen control from us.
Index: generic/gdbtk-hooks.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-hooks.c,v
retrieving revision 1.36
diff -p -u -r1.36 gdbtk-hooks.c
--- generic/gdbtk-hooks.c	24 Jun 2004 22:07:45 -0000	1.36
+++ generic/gdbtk-hooks.c	25 Jun 2004 19:43:57 -0000
@@ -143,7 +143,7 @@ gdbtk_add_hooks (void)
   deprecated_target_wait_hook = gdbtk_wait;
   deprecated_ui_load_progress_hook = gdbtk_load_hash;
 
-  ui_loop_hook = x_event;
+  deprecated_ui_loop_hook = x_event;
   deprecated_pre_add_symbol_hook = gdbtk_pre_add_symbol;
   deprecated_post_add_symbol_hook = gdbtk_post_add_symbol;
   deprecated_file_changed_hook = gdbtk_file_changed;
@@ -354,9 +354,9 @@ gdbtk_memory_changed (CORE_ADDR addr, in
 }
 
 
-/* This hook is installed as the ui_loop_hook, which is used in several
- * places to keep the gui alive (x_event runs gdbtk's event loop). Users
- * include:
+/* This hook is installed as the deprecated_ui_loop_hook, which is
+ * used in several places to keep the gui alive (x_event runs gdbtk's
+ * event loop). Users include:
  * - ser-tcp.c in socket reading code
  * - ser-unix.c in serial port reading code
  * - built-in simulators while executing
@@ -366,11 +366,11 @@ gdbtk_memory_changed (CORE_ADDR addr, in
  * to an elaborate scheme to keep the gui alive.
  *
  * For simulators and socket or serial connections on all hosts, we
- * rely on ui_loop_hook (x_event) to keep us going. If the user
- * requests a detach (as a result of pressing the stop button -- see
- * comments before gdb_stop in gdbtk-cmds.c), it sets the global
- * GDBTK_FORCE_DETACH, which is the value that x_event returns to
- * it's caller. It is up to the caller of x_event to act on this
+ * rely on deprecated_ui_loop_hook (x_event) to keep us going. If the
+ * user requests a detach (as a result of pressing the stop button --
+ * see comments before gdb_stop in gdbtk-cmds.c), it sets the global
+ * GDBTK_FORCE_DETACH, which is the value that x_event returns to it's
+ * caller. It is up to the caller of x_event to act on this
  * information.
  *
  * For native unix, we simply set an interval timer which calls
@@ -378,8 +378,9 @@ gdbtk_memory_changed (CORE_ADDR addr, in
  * loop. See comments before gdbtk_start_timer and gdb_stop_timer
  * in gdbtk.c.
  *
- * For native windows (and a few other targets, like the v850 ICE),
- * we rely on the target_wait loops to call ui_loop_hook to keep us alive. */
+ * For native windows (and a few other targets, like the v850 ICE), we
+ * rely on the target_wait loops to call deprecated_ui_loop_hook to
+ * keep us alive.  */
 int
 x_event (int signo)
 {
Index: generic/gdbtk.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.h,v
retrieving revision 1.8
diff -p -u -r1.8 gdbtk.h
--- generic/gdbtk.h	25 Feb 2003 21:36:22 -0000	1.8
+++ generic/gdbtk.h	25 Jun 2004 19:43:57 -0000
@@ -139,8 +139,9 @@ extern void gdbtk_restore_result_ptr (vo
 /* GDB context identifier */
 extern int gdb_context;
 
-/* Internal flag used to tell callers of ui_loop_hook whether they should
-   detach from the target. See explanations before x_event and gdb_stop. */
+/* Internal flag used to tell callers of deprecated_ui_loop_hook
+   whether they should detach from the target. See explanations before
+   x_event and gdb_stop. */
 extern int gdbtk_force_detach;
 
 /*
Index: library/interface.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/interface.tcl,v
retrieving revision 1.50
diff -p -u -r1.50 interface.tcl
--- library/interface.tcl	24 Jun 2004 22:07:46 -0000	1.50
+++ library/interface.tcl	25 Jun 2004 19:43:57 -0000
@@ -1492,15 +1492,16 @@ proc gdbtk_detached {} {
 # the debugger must be able to keep gui alive while target_wait is
 # blocking (so that the user can interrupt or detach from it).
 # 
-# The best solution for this is to capture gdb deep down where it
-# can block. For _any_ target board, this will be in either
-# serial or socket code. These places call ui_loop_hook to 
-# keep us alive. For native unix, we use an interval timer.
-# Simulators either call ui_loop_hook directly (older sims, at least)
-# or they call gdb's os_poll_quit callback, where we insert a call
-# to ui_loop_hook. Some targets (like v850ice and windows native)
-# require a call to ui_loop_hook directly in target_wait. See comments
-# before gdb_stop and x_event to find out more about how this is accomplished.
+# The best solution for this is to capture gdb deep down where it can
+# block. For _any_ target board, this will be in either serial or
+# socket code. These places call deprecated_ui_loop_hook to keep us
+# alive. For native unix, we use an interval timer.  Simulators either
+# call deprecated_ui_loop_hook directly (older sims, at least) or they
+# call gdb's os_poll_quit callback, where we insert a call to
+# deprecated_ui_loop_hook. Some targets (like v850ice and windows
+# native) require a call to deprecated_ui_loop_hook directly in
+# target_wait. See comments before gdb_stop and x_event to find out
+# more about how this is accomplished.
 #
 # The stop button's behavior:
 # Pressing the stop button should attempt to stop the target. If, after

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]