From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Larmour To: Andrew Cagney Cc: insight@sourceware.cygnus.com, gdb-patches@sourceware.cygnus.com Subject: Re: Insight remote output doesn't output to console window immediately Date: Thu, 13 Apr 2000 18:36:00 -0000 Message-id: <38F67617.D1A2A6B3@redhat.co.uk> References: <38F6404E.5959A4E0@redhat.co.uk> <38F65D4D.8B390EFA@cygnus.com> X-SW-Source: 2000-q2/msg00073.html Andrew Cagney wrote: > > There is no need for another hook. Even the existing hooks > (gdbtk_fputs() and gdbtk_flush()) can, in theory, deleted. To see how > it should work, check the MI (mi/mi-main.c) - it maintains a separate > stream. I thought I'd have a look at seeing if I could do this. But it's well beyond me (for my spare time anyway), sorry. > As for a quick hack? > > My first guess is to, when the GUI is enabled (ie not CLI mode), > re-route gdb_stdtarg to gdb_stdout. That might be suitable for the > branch. However, the trunk, needs to start taking advantage of ``struct > ui_out''. That's easy enough - see attached. I recommend it go in the trunk as well for now unless someone is going to start implementing ui_out for gdbtk RSN. Should I check this in to the trunk and the branch then? BTW, have you noticed that there's a ChangeLog-gdbtk in both gdbtk/ and gdbtk/generic, as well as a ChangeLog in gdbtk/library? Is it deliberate? Jifl 2000-04-14 Jonathan Larmour * gdbtk.c (gdbtk_init): For now, reset gdb_stdtarg to gdb_stdout when using gdbtk. -- Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762 "Plan to be spontaneous tomorrow." || These opinions are all my own fault Index: gdbtk/generic/gdbtk.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v retrieving revision 1.1.1.1 diff -u -5 -p -r1.1.1.1 gdbtk.c --- gdbtk/generic/gdbtk.c 2000/02/07 00:19:42 1.1.1.1 +++ gdbtk/generic/gdbtk.c 2000/04/14 01:29:28 @@ -528,10 +528,14 @@ gdbtk_find_main"; /* fputs_unfiltered_hook = NULL; *//* Force errors to stdout/stderr */ fputs_unfiltered_hook = gdbtk_fputs; + /* set gdb_stdtarg for now until gdbtk is changed to use struct ui_out. */ + + gdb_stdtarg = gdb_stdout; + if (Tcl_GlobalEval (gdbtk_interp, (char *) script) != TCL_OK) { char *msg; /* Force errorInfo to be set up propertly. */