From: Johannes Overmann <Johannes.Overmann@arm.com>
To: gdb@sources.redhat.com
Subject: Not seeing target output in GDB/MI
Date: Fri, 10 Dec 2004 10:12:00 -0000 [thread overview]
Message-ID: <41B97648.5040107@arm.com> (raw)
Hi,
I am trying to use the GDB/MI interface of gdb 6.2.1 and my biggest problem
is currently that the output to stdout of my target program beeging debugged
is beeing block buffered. I am using pipes to communicate with gdb and the
output from gdb itself (e.g. responses from commands) does not seem to be
block buffered, it is line buffered which is what I also need for the target
output, which I get over the same file descriptor (pipe).
I am using gdb to debug a simple test program on Linux. No remote debugging
or something special at all.
The fact that the target output is buffered leads to the behavior that when
single stepping over some printf() calls I do not see the output during these
steps. I see the output when the program beeing debugged exits or when I do
a lot of output (the buffer gets flushed).
In DDD I do not see this behavior, but I saw that DDD uses a tty to
communicate with gdb and output to ttys is apparently line buffered.
I can factor out two simple questions:
- Is there a way to see the target output (stdout) unbuffered or line buffered
and still using pipes to comminucate with gdb?
- Why is the target output not visible in the target-stream-output described in the
MI documentation (e.g. prefixed by @)? I see it just as any other output
coming from gdb without any indication that it comes from the target.
Any help on this is greatly appreciated.
Regards,
Johannes
next reply other threads:[~2004-12-10 10:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-10 10:12 Johannes Overmann [this message]
2004-12-10 13:38 ` Daniel Jacobowitz
2004-12-12 15:25 ` Andrew Cagney
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=41B97648.5040107@arm.com \
--to=johannes.overmann@arm.com \
--cc=gdb@sources.redhat.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