OSDN Git Service

2001-06-05 Martin Hunt <hunt@redhat.com>
authorhunt <hunt>
Tue, 5 Jun 2001 22:01:20 +0000 (22:01 +0000)
committerhunt <hunt>
Tue, 5 Jun 2001 22:01:20 +0000 (22:01 +0000)
* 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
gdb/gdbtk/generic/gdbtk.c

index a8fb2bf..fd36bf9 100644 (file)
@@ -1,3 +1,8 @@
+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.
+       
 2001-06-05  Martin Hunt  <hunt@redhat.com>
 
        * library/globalpref.itb(build_win): Don't change directory
index 894d308..1bf6825 100644 (file)
@@ -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