This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/6] Introduce $inferior_spawn_id, make interrupt.exp work with GDBserver
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 07 Apr 2015 18:31:09 +0100
- Subject: Re: [PATCH 0/6] Introduce $inferior_spawn_id, make interrupt.exp work with GDBserver
- Authentication-results: sourceware.org; auth=none
- References: <1424699660-11727-1-git-send-email-palves at redhat dot com>
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