MI interface: where is the stdout of the debugged program?

Aurelian Melinte ame01@gmx.net
Sun Mar 7 00:47:00 GMT 2010


Hi,

My apologies if this has been asked before.

I am experimenting with MI through a perl script. The program debugged 
is using stdout to print some diagnostics messages but I do not the 
debugee stdout messages coming through to the perl script. All I get are 
the gdb messages.

Reading from 
http://sources.redhat.com/gdb/current/onlinedocs/gdb.html#GDB_002fMI-General-Design 
I am under the impression I should get the debugee stdout as well: |"@" 
|string-output:The target output stream contains any textual output from 
the running target. This is only present when GDB's event loop is truly 
asynchronous, which is currently only the case for remote targets"

I am opening my MI session with:

$pid = open2(*Reader, *Writer, "gdb -annotate 3 --interpreter=mi $exec");
# ... issue some commands to get the target running:  ...
while (<Reader>) {
   print "$_";
}

Regards,
a.





More information about the Gdb mailing list