This is the mail archive of the gdb-patches@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]

Re: [PATCH 0/6] Introduce $inferior_spawn_id, make interrupt.exp work with GDBserver


On 02/23/2015 01:54 PM, Pedro Alves wrote:
> After fixing a gdbserver syscall restart issue, I thought of adding a
> new test to exercise syscall restarting.  Then I recalled that we
> already have interrupt.exp for that.  However, that test is skipped on
> gdbserver, because it relies on inferior i/o.
> 
> When testing with gdbserver, inferior are spawned by gdbserver, on
> gdbserver's pty, and so gdb_test_multiple/gdb_expect, don't see the
> inferior's i/o.
> 
> This series introduces a mechanism that allows tests to match inferior
> i/o separately from gdb i/o, like:
> 
>   send_inferior "echo me\n"
>   gdb_test_multiple "continue" "test msg" {
>     -i "$inferior_spawn_id" -re "echo me\r\necho\r\n" {
>       ...
>     }
>     -i "$gdb_spawn_id" -re "error.*$gdb_prompt $" {
>       ...
>     }
>   }
> 
> and then adjusts interrupt.exp to use the new mechanism.
> 
> I took the idea from Don Breazeal's use of $server_spawn_id here
> <https://sourceware.org/ml/gdb-patches/2015-01/msg00689.html>, and
> generalized it.
> 
> A couple bugs had to be fixed along the way, and I took the change to
> clean up interrupt.exp to use gdb_test_multiple instead of gdb_expect
> too.  interrupt.exp now passes against gdbserver here, on x86_64
> Fedora 20 (It fails with gdbserver/-m32 testing in the exact same way
> it fails on native/-m32 testing, due to a kernel bug).
> 

I've now pushed this series in.

Thanks,
Pedro Alves


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