aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtk.c
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-05-17 02:36:13 +0000
committerFred Fish <fnf@specifix.com>1996-05-17 02:36:13 +0000
commit5bac2b50e214842ff064da8690073479d3007976 (patch)
treeb386a4198a855aa602f2fd963b8d5db533f4821b /gdb/gdbtk.c
parent954a4a2ab18ba02f274e6fd4304aa8c17c016d95 (diff)
downloadgdb-5bac2b50e214842ff064da8690073479d3007976.zip
gdb-5bac2b50e214842ff064da8690073479d3007976.tar.gz
gdb-5bac2b50e214842ff064da8690073479d3007976.tar.bz2
* gdbtk.tcl (gdb_prompt): Set this early on.
(create_command_window): Use gdb_prompt rather than "(gdb) ". (gdbtk_tcl_preloop): Proc executed just prior to Tk main loop. (tclsh): If an evaluation window already exists, just bring it to the front instead of trying to create another. * gdbtk.c (tk_command_loop): New function. (gdbtk_init): Call tk_command_loop rather than Tk_MainLoop.
Diffstat (limited to 'gdb/gdbtk.c')
-rw-r--r--gdb/gdbtk.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gdb/gdbtk.c b/gdb/gdbtk.c
index 08b483e..6234e4a 100644
--- a/gdb/gdbtk.c
+++ b/gdb/gdbtk.c
@@ -1111,6 +1111,16 @@ gdbtk_call_command (cmdblk, arg, from_tty)
(*cmdblk->function.cfunc)(arg, from_tty);
}
+/* This function is called instead of gdb's internal command loop. This is the
+ last chance to do anything before entering the main Tk event loop. */
+
+static void
+tk_command_loop ()
+{
+ Tcl_Eval (interp, "gdbtk_tcl_preloop");
+ Tk_MainLoop ();
+}
+
static void
gdbtk_init ()
{
@@ -1160,7 +1170,7 @@ gdbtk_init ()
Tcl_CreateCommand (interp, "gdb_get_breakpoint_info", call_wrapper,
gdb_get_breakpoint_info, NULL);
- command_loop_hook = Tk_MainLoop;
+ command_loop_hook = tk_command_loop;
print_frame_info_listing_hook = null_routine;
query_hook = gdbtk_query;
flush_hook = gdbtk_flush;