From: Jonathan Larmour <jlarmour@redhat.co.uk>
To: insight@sourceware.cygnus.com, gdb@sourceware.cygnus.com
Subject: Insight remote output doesn't output to console window immediately
Date: Thu, 13 Apr 2000 14:46:00 -0000 [thread overview]
Message-ID: <38F6404E.5959A4E0@redhat.co.uk> (raw)
[ Sent to gdb and insight lists since ]
I've found a problem in insight that is surprisingly old - I can't imagine
how it's lived so long actually: output from a remote target doesn't get
sent to the console window as it arrives. Instead it is buffered up.
I believe the problem is because of Cagney's change to remote.c on July 2nd
1999 which changed remote_console_output to operate on the gdb_stdtarg
stream rather than gdb_stdout. But, in main.c, gdb_stdtarg is #defined to
gdb_stderr. Which means that it matches the following code in
gdbtk/generic/gdbtk-hooks.c in gdbtk_fputs():
if (result_ptr != NULL)
{
if (result_ptr->flags & GDBTK_TO_RESULT)
...
else if (stream == gdb_stderr || result_ptr->flags &
GDBTK_ERROR_ONLY)
{
if (result_ptr->flags & GDBTK_ERROR_STARTED)
Tcl_AppendToObj (result_ptr->obj_ptr, (char *) ptr, -1);
else
{
Tcl_SetStringObj (result_ptr->obj_ptr, (char *) ptr, -1);
result_ptr->flags |= GDBTK_ERROR_STARTED;
}
i.e. it is appended to result_ptr, rather than calling gdbtk_tcl_fputs to
display it in the console window.
The only thing I'm wondering about is the fix. We could #define gdb_stdtarg
to gdb_stdout instead. Or we could add a hook with set_ui_file_flush() so
that the "gdb_flush (gdb_stdtarg);" at the end of remote_console_output()
would do the right thing. I simply don't know which is the more correct fix
before I implement it, although I suspect the latter.
Let me know - I'd like to sort this out soon because it affects Insight 5
(?) as well. Ta,
Jifl
--
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
next reply other threads:[~2000-04-13 14:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-13 14:46 Jonathan Larmour [this message]
2000-04-13 16:53 ` Andrew Cagney
2000-04-13 16:56 ` James Ingham
2000-04-13 18:36 ` Jonathan Larmour
2000-04-13 18:54 ` James Ingham
2000-04-13 19:49 ` Jonathan Larmour
2000-04-14 8:53 ` James Ingham
2000-04-17 13:07 ` Jonathan Larmour
2000-04-17 13:15 ` James Ingham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38F6404E.5959A4E0@redhat.co.uk \
--to=jlarmour@redhat.co.uk \
--cc=gdb@sourceware.cygnus.com \
--cc=insight@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).