This is the mail archive of the 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: [patch/testsuite] MI inferior's output in remote target

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 [1], but it doesn't work.  

> [1] 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.

Pedro Alves

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