This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Insight remote output doesn't output to console window immediately
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: Insight remote output doesn't output to console window immediately
- From: Jonathan Larmour <jlarmour at redhat dot co dot uk>
- Date: Fri, 14 Apr 2000 02:36:23 +0100
- CC: insight at sourceware dot cygnus dot com, gdb-patches at sourceware dot cygnus dot com
- Organization: Red Hat UK Ltd.
- References: <38F6404E.5959A4E0@redhat.co.uk> <38F65D4D.8B390EFA@cygnus.com>
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 <jlarmour@redhat.co.uk>
* 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. */