This is the mail archive of the gdb@sources.redhat.com 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]

Re: Broken MI output


On Thu, Mar 03, 2005 at 05:10:35PM +0300, Karganov Konstantin wrote:
> Hello.
> 
> I tried to run hello-world application under "gdb -i=mi"
> and got the following:
> 
> -------------------------
> ~"GNU gdb 6.3\n"
> ~"Copyright 2004 Free Software Foundation, Inc.\n"
> ~"GDB is free software, covered by the GNU General Public License, and you 
> are\n"
> ~"welcome to change it and/or distribute copies of it under certain 
> conditions.\n"
> ~"Type \"show copying\" to see the conditions.\n"
> ~"There is absolutely no warranty for GDB.  Type \"show warranty\" for 
> details.\n"
> ~"This GDB was configured as \"i686-pc-linux-gnu\"..."
> ~"Using host libthread_db library \"/lib/libthread_db.so.1\".\n"
> ~"\n"
> (gdb)
> run
> &"run\n"
>  Hello world!
> ~"Current language:  auto; currently c\n"
> ^done,reason="exited-normally"
> (gdb)
> -------------------------
> 
> Two lines here are out of the grammar syntax: "run" line, that is only 
> echo of the terminal, that doesnt go out of the debugger (presents only in 
> debugger stdin) and the " Hello world!" line that is an application output 
> mixed with MI output. The second line goes out of the debugger stdout and 
> surely breaks MI-parser. 
> Am I right that this is a bug ("@ c-string" format is missing) that needs 
> to be fixed?

The echoing should be turned off from the GDB side. There are several
ways to do this. Are you communicating with GDB through a pipe, pty?

The inferior output needs to be redirected to another pty using the
console 'tty' command. This will "unmix" the inferior output and the MI
output.

Thanks,
Bob Rossi


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