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] gdb.python/py-events.exp: Disable multi-inferior for gdbserver [Re: Regression (or a new FAIL?): gdb.python/py-events.exp]


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


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