OSDN Git Service

Revert below change.
authorcgf <cgf>
Mon, 17 Feb 2003 18:49:11 +0000 (18:49 +0000)
committercgf <cgf>
Mon, 17 Feb 2003 18:49:11 +0000 (18:49 +0000)
gdb/gdbtk/ChangeLog
gdb/gdbtk/generic/gdbtk.c

index 46018c1..4efc84f 100644 (file)
@@ -1,5 +1,9 @@
 2003-02-17  Christopher Faylor  <cgf@redhat.com>
 
+       Revert below change.
+
+2003-02-17  Christopher Faylor  <cgf@redhat.com>
+
        * gdbtk/gdbtk.c (tk_procs): Make file global.  Declare at top.
        (_initialize_gdbtk): Move interp_add from here.
        (gdb_tk): Call interp_add here.  Pass correct uiout to interp_new.
index fe24489..3fb975b 100644 (file)
@@ -69,7 +69,6 @@ extern void _initialize_gdbtk (void);
 static sigset_t nullsigmask;
 static struct sigaction act1, act2;
 static struct itimerval it_on, it_off;
-static const struct interp_procs tk_procs;
 
 static void
 x_event_wrapper (int signo)
@@ -594,7 +593,6 @@ gdbtk_init (char *argv0)
   gdb_stdlog = gdbtk_fileopen ();
   gdb_stdtarg = gdbtk_fileopen ();
   uiout = cli_out_new (gdb_stdout);
-  interp_add (interp_new ("gdbtk", NULL, uiout, &tk_procs));
 
 #ifdef __CYGWIN32__
   (void) FreeConsole ();
@@ -751,19 +749,22 @@ gdbtk_command_loop (void *data)
 }
 
 /* Come here during initialize_all_files () */
-static const struct interp_procs tk_procs =
-{
-  tk_init,
-  gdbtk_resume,
-  gdbtk_suspend,
-  gdbtk_exec,
-  gdbtk_prompt_p,
-  gdbtk_command_loop,
-};
 
 void
 _initialize_gdbtk ()
 {
+  static const struct interp_procs tk_procs =
+  {
+    tk_init,
+    gdbtk_resume,
+    gdbtk_suspend,
+    gdbtk_exec,
+    gdbtk_prompt_p,
+    gdbtk_command_loop,
+  };
+
+  interp_add (interp_new ("gdbtk", NULL, NULL, &tk_procs));
+
   /* FIXME: cagney/2003-02-12: This is wrong.  The initialization
      should be done via the init function.  */
   if (use_windows)