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 09/29/2011 12:47 PM, Yao Qi wrote:
>> > 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
>> > things?
> Your description on "what should be happening" above is reasonable and 
> correct to me.  I think of this problem again, and it looks 
> mi-support.exp:proc mi_gdb_test doesn't handle remote testing when 
> checking inferior's output.
> At the end of mi_gdb_test, it expects the output from 
> mi_inferior_spawn_id.  It is wrong in remote testing, because in 
> remote testing, IO is transfered back to gdb.  So in remote testing, 
> we should use gdb_expect instead of `expect -i mi_inferior_spawn_id' 
> to expect the inferior's output from gdb.  This doesn't fix this 
> problem, but make some progress, because test case can get inferior's 
> output, but still doesn't match.
>> > 
>> > Why didn't your original attempt work?
>> > 
> I look at my work again, and think my original attempt works, but 
> expect is unable to get these output.  During test, inferior-tty is 
> set to `/dev/pts/55', for example, and update 
> gdb_stdtarg/gdb_stdtargerr to a new ui-file created for `/dev/pts/55'.
> At that moment, expect is getting gdb's output, and unable to get 
> output from another pty in the same process.  That is the limitation
> of expect, if I read "Exploring  Exect" book correctly.  If my
> understand is correct here, the problem #2 in my first post is unable
> to fix.  So I change test case mi-console.exp to match @-prefixed output 
> from gdb in remote testing.
>>> >> 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.
>> > 
> I don't understand your bit here, could you elaborate a little please?
> 2011-09-28  Yao Qi  <>
>         * gdb.mi/mi-console.exp: Set a different pattern to match output in
> 	remote test.
>         * lib/mi-support.exp (default_mi_gdb_start): Set separate_inferior_pty
> 	when arg is separate-inferior-tty and test is not running for remote
> 	target.
> 	(mi_gdb_test): Check inferior's output in remote test.


Yao (éå) 

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