From d4a6e522216e2050b84f56351eb5d1d08ea7ff29 Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 5 Jun 2001 22:01:20 +0000 Subject: [PATCH] 2001-06-05 Martin Hunt * generic/gdbtk.c (_initialize_gdbtk): Don't close console yet. (gdbtk_init): Wait until after tcl/tk stuff is all initialized to close console (on Windows) and redirect ouput. --- gdb/gdbtk/ChangeLog | 5 +++++ gdb/gdbtk/generic/gdbtk.c | 25 ++++++++++++------------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog index a8fb2bf2bb..fd36bf9d21 100644 --- a/gdb/gdbtk/ChangeLog +++ b/gdb/gdbtk/ChangeLog @@ -1,3 +1,8 @@ +2001-06-05 Martin Hunt + * generic/gdbtk.c (_initialize_gdbtk): Don't close console yet. + (gdbtk_init): Wait until after tcl/tk stuff is all initialized + to close console (on Windows) and redirect ouput. + 2001-06-05 Martin Hunt * library/globalpref.itb(build_win): Don't change directory diff --git a/gdb/gdbtk/generic/gdbtk.c b/gdb/gdbtk/generic/gdbtk.c index 894d308e5b..1bf6825173 100644 --- a/gdb/gdbtk/generic/gdbtk.c +++ b/gdb/gdbtk/generic/gdbtk.c @@ -380,15 +380,6 @@ gdbtk_init (argv0) old_chain = make_cleanup (cleanup_init, 0); - /* close old output and send new to GDBTK */ - ui_file_delete (gdb_stdout); - ui_file_delete (gdb_stderr); - gdb_stdout = gdbtk_fileopen (); - gdb_stderr = gdbtk_fileopen (); - gdb_stdlog = gdbtk_fileopen (); - gdb_stdtarg = gdbtk_fileopen (); - uiout = cli_out_new (gdb_stdout); - /* First init tcl and tk. */ Tcl_FindExecutable (argv0); gdbtk_interp = Tcl_CreateInterp (); @@ -502,6 +493,18 @@ gdbtk_init (argv0) Tcl_SetVar (gdbtk_interp, "external_editor_command", external_editor_command, 0); + /* close old output and send new to GDBTK */ + ui_file_delete (gdb_stdout); + ui_file_delete (gdb_stderr); + gdb_stdout = gdbtk_fileopen (); + gdb_stderr = gdbtk_fileopen (); + gdb_stdlog = gdbtk_fileopen (); + gdb_stdtarg = gdbtk_fileopen (); + uiout = cli_out_new (gdb_stdout); + +#ifdef __CYGWIN32__ + (void) FreeConsole (); +#endif /* find the gdb tcl library and source main.tcl */ @@ -593,11 +596,7 @@ _initialize_gdbtk () if (use_windows) { /* Tell the rest of the world that Gdbtk is now set up. */ - init_ui_hook = gdbtk_init; -#ifdef __CYGWIN32__ - (void) FreeConsole (); -#endif } #ifdef __CYGWIN32__ else -- 2.11.0