This is the mail archive of the
mailing list for the GDB project.
Re: [patch/testsuite] MI inferior's output in remote target
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Yao Qi <yao at codesourcery dot com>
- Date: Mon, 29 Aug 2011 14:37:39 +0100
- Subject: Re: [patch/testsuite] MI inferior's output in remote target
- References: <4E4E6234.email@example.com>
On Friday 19 August 2011 14:16:36, Yao Qi wrote:
> I noticed one test fail when testing gdb with my remote stub,
> FAIL: gdb.mi/mi-console.exp: Testing console output inferior output
> (time out)
> The remote stub is able to "transfer" remote IO to host via `remote
> fileio' packets, and output is printed to gdb_stdtarg or gdb_stdtargerr
> (as indicated in remote-fileio.c:remote_fileio_func_write). Here are
> two problems,
> 1. In mi-console.exp, it is expected to read inferior's output from
> another tty (a separate tty from gdb's), but the output is printed in
> the same tty as gdb's.
> 2. In MI, gdb_stdtarg and gdb_stdtargerr is initialized by
> mi_console_file_new (raw_stdout, "@", '"'). So, the output printed to
> them is prefixed with "@".
> I tried to fix these two problems , but it doesn't work.
>  I tried to fix these two problems by opening a new ui_file when
> inferior-tty is changed, and update gdb_stdtarg/gdb_stdtargerr to it.
Let's discuss what _should_ be happening, and if indeed this is
a gdb bug to fix. I think it does make sense that if the frontend
wants inferior output in a separate channel, then we shouldn't
"@"-prefix the inferior output, as the prefix's whole purpose is
to be able to untangle the inferior's output from regular MI output.
Does anyone know of any frontend out where such a change would break
Why didn't your original attempt work?
> I suggest that we check the inferior's
> output if gdb,noinferiorio is false and is not a remote target.
A quick grep tells me this is probably happening on the sims too.