This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]