This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] gdb.python/py-events.exp: Disable multi-inferior for gdbserver [Re: Regression (or a new FAIL?): gdb.python/py-events.exp]
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, Kevin Pouget <kevin dot pouget at gmail dot com>, Tom Tromey <tromey at redhat dot com>
- Date: Wed, 26 Oct 2011 14:48:58 +0100
- Subject: Re: [patch] gdb.python/py-events.exp: Disable multi-inferior for gdbserver [Re: Regression (or a new FAIL?): gdb.python/py-events.exp]
- References: <BANLkTinM3j98XgLoXeAk8TLxKSgh2QzYHw@mail.gmail.com> <CAPftXUJc60qhy8NR_MpGBHH2WUYp+b=aNKoEa2SdOp2J5YYH=Q@mail.gmail.com> <20111009181654.GA4629@host1.jankratochvil.net>
On Sunday 09 October 2011 19:16:54, Jan Kratochvil wrote:
> On Wed, 05 Oct 2011 16:55:28 +0200, Kevin Pouget wrote:
> > what do you want me to do with that, certainly fill a bug report,
> > shall I change anything in my patch?
>
> I realized gdbserver supports multi-inferior by attaching each new inferior
> but it does not yet support (=remote.c ignores) `set detach-on-fork off' at
> all.
Right, there's no support for following forks or execs in the RSP yet.
> Therefore proposing the patch below. I will check it in in some time.
> gdb/testsuite/
> 2011-10-09 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * gdb.python/py-events.exp: New comment for `set detach-on-fork off'.
> (inferior 2, Inferior 2 terminated.): Run them only if not remote.
>
> --- a/gdb/testsuite/gdb.python/py-events.exp
> +++ b/gdb/testsuite/gdb.python/py-events.exp
> @@ -53,6 +53,7 @@ gdb_breakpoint "main" {temporary}
>
> gdb_test "run" ".*event type: new_objfile.*new objfile name.*" "New objfile notification"
"run" doesn't work with "target remote" either. If that is succeeding,
it's because it's actually running the default native target,
which is obviously bogus. If that can't be fixed easily, we should skip
the test on remote targets. But if you see failures related to fork
afterwards, maybe that because you have a customboard file that runs
in extended-remote?
>
> +# Ignored for [is_remote target].
> gdb_test_no_output "set detach-on-fork off" ""
>
> gdb_test "Test_Events" "Event testers registered."
> @@ -75,8 +76,10 @@ gdb_test "continue" ".*event type: continue.*
> .*exit code: 12.*
> .*exit inf: 1.*" "Inferior 1 terminated."
>
> -gdb_test "inferior 2" ".*Switching to inferior 2.*"
> -gdb_test "continue" ".*event type: continue.*
> +if ![is_remote target] {
> + gdb_test "inferior 2" ".*Switching to inferior 2.*"
> + gdb_test "continue" ".*event type: continue.*
> .*event type: exit.*
> .*exit code: 12.*
> .*exit inf: 2.*" "Inferior 2 terminated."
> +}
>
--
Pedro Alves