This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[RFA] Fix error messages when tcl/tk not found
- To: <insight at sources dot redhat dot com>
- Subject: [RFA] Fix error messages when tcl/tk not found
- From: "Martin M. Hunt" <hunt at redhat dot com>
- Date: Tue, 5 Jun 2001 14:53:03 -0700 (PDT)
If init.tcl is not found, nothing is currently displayed.
2001-06-05 Martin Hunt <hunt@redhat.com>
* 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.
Index: gdbtk.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v
retrieving revision 1.13
diff -p -r1.13 gdbtk.c
*** gdbtk.c 2001/05/10 18:04:23 1.13
--- gdbtk.c 2001/06/05 21:48:04
*************** gdbtk_init (argv0)
*** 380,394 ****
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 ();
--- 380,385 ----
*************** gdbtk_init (argv0)
*** 502,507 ****
--- 493,510 ----
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 */
*************** _initialize_gdbtk ()
*** 593,603 ****
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
--- 596,602 ----