From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 373 invoked by alias); 17 Feb 2003 17:04:05 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 366 invoked from network); 17 Feb 2003 17:04:05 -0000 Received: from unknown (HELO redhat.com) (66.30.22.225) by 172.16.49.205 with SMTP; 17 Feb 2003 17:04:05 -0000 Received: by redhat.com (Postfix, from userid 201) id 621951BCA4; Mon, 17 Feb 2003 12:04:07 -0500 (EST) Date: Mon, 17 Feb 2003 17:04:00 -0000 From: Christopher Faylor To: insight@sources.redhat.com Subject: Re: Insight build problem on cygwin (tentative patch enclosed) Message-ID: <20030217170407.GC5837@redhat.com> Reply-To: insight@sourceware.org Mail-Followup-To: insight@sources.redhat.com References: <83040F98B407E6428FEC18AC720F5D732DB7CA@exchange.tropicnetworks.com> <1045176482.1490.50.camel@lindt.uglyboxes.com> <1045499585.1668.11.camel@lindt.uglyboxes.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-q1/txt/msg00135.txt.bz2 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)