From 8577f3622e227d9fa0ba20c7c8fb4b60ce446543 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Fri, 25 Jun 2004 19:44:22 +0000 Subject: [PATCH] 2004-06-25 Andrew Cagney * generic/gdbtk.h: "ui_loop_hook" was deprecated, update. * generic/gdbtk-hooks.c (gdbtk_add_hooks, x_event): Ditto. * generic/gdbtk-cmds.c: Ditto. --- gdb/gdbtk/ChangeLog | 6 ++++++ gdb/gdbtk/generic/gdbtk-cmds.c | 6 +++--- gdb/gdbtk/generic/gdbtk-hooks.c | 23 ++++++++++++----------- gdb/gdbtk/generic/gdbtk.h | 5 +++-- gdb/gdbtk/library/interface.tcl | 19 ++++++++++--------- 5 files changed, 34 insertions(+), 25 deletions(-) diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog index 3760bc5232..256af6bf05 100644 --- a/gdb/gdbtk/ChangeLog +++ b/gdb/gdbtk/ChangeLog @@ -1,3 +1,9 @@ +2004-06-25 Andrew Cagney + + * generic/gdbtk.h: "ui_loop_hook" was deprecated, update. + * generic/gdbtk-hooks.c (gdbtk_add_hooks, x_event): Ditto. + * generic/gdbtk-cmds.c: Ditto. + 2004-06-24 Andrew Cagney * generic/gdbtk-hooks.c (gdbtk_add_hooks): Update references to diff --git a/gdb/gdbtk/generic/gdbtk-cmds.c b/gdb/gdbtk/generic/gdbtk-cmds.c index f253e0b334..11e12b5cf9 100644 --- a/gdb/gdbtk/generic/gdbtk-cmds.c +++ b/gdb/gdbtk/generic/gdbtk-cmds.c @@ -517,9 +517,9 @@ gdb_force_quit (ClientData clientData, Tcl_Interp *interp, * 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. diff --git a/gdb/gdbtk/generic/gdbtk-hooks.c b/gdb/gdbtk/generic/gdbtk-hooks.c index 9d6ef4c225..5bb9a166c5 100644 --- a/gdb/gdbtk/generic/gdbtk-hooks.c +++ b/gdb/gdbtk/generic/gdbtk-hooks.c @@ -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, int len) } -/* 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, int len) * 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, int len) * 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) { diff --git a/gdb/gdbtk/generic/gdbtk.h b/gdb/gdbtk/generic/gdbtk.h index aa4b4cb106..c46b285b50 100644 --- a/gdb/gdbtk/generic/gdbtk.h +++ b/gdb/gdbtk/generic/gdbtk.h @@ -139,8 +139,9 @@ extern void gdbtk_restore_result_ptr (void *); /* 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; /* diff --git a/gdb/gdbtk/library/interface.tcl b/gdb/gdbtk/library/interface.tcl index b614d714be..cca6f37757 100644 --- a/gdb/gdbtk/library/interface.tcl +++ b/gdb/gdbtk/library/interface.tcl @@ -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 -- 2.11.0