This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: Insight build problem on cygwin (tentative patch enclosed)
On Mon, Feb 17, 2003 at 11:49:05AM -0500, Rolf Campbell wrote:
>It does 0.8 seconds of absolutely nothing (no text output, no error
>message, nothing), then terminates.
I can duplicate this. I don't know what I was doing when I "tested"
this net release but it fails miserably to debug anything. How
embarrassing.
The problem is that uiout is being set to NULL in interp_set() because
that is what is stored in the interpreter structure set up in
_initialize_gdbtk.
I've included a patch below. I made it as minimal as possible so
that it is obvious what I did. It may make more sense to move
gdbtk_init later in the code and include the static definition of
tk_procs into it.
Boy, this interp stuff sure screwed things up. Aren't we supposed to
not severely break existing functionality when we check in new gdb
features?
cgf
Index: gdbtk.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v
retrieving revision 1.33
diff -u -p -r1.33 gdbtk.c
--- gdbtk.c 12 Feb 2003 16:02:03 -0000 1.33
+++ gdbtk.c 17 Feb 2003 17:01:40 -0000
@@ -69,6 +69,7 @@ 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)
@@ -593,6 +594,7 @@ 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 ();
@@ -749,22 +751,19 @@ 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)