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

Re: [RFA] display.exp: don't kill remote target


Nick Duffek wrote:
> 
> display.exp contains a few "kill" and related commands that have
> unexpected effects when testing remote targets.  This patch skips
> those commands if [target_info exists use_gdb_stub].
> 
> No regressions on i686-pc-linux-gnu or sparc-sun-solaris2.5.1.  Okay to
> apply?
> 

Yes.  But before you check it in make me a favor: rename the second "kill"
to "kill again" so we don't have two tests with the same identification string
in the same test file.

Thanks.

Fernando


> ChangeLog:
> 
>         * gdb.base/display.exp: Don't kill running stub.
> 
> Nick
> 
> Index: gdb/testsuite/gdb.base/display.exp
> ===================================================================
> diff -up gdb/testsuite/gdb.base/display.exp gdb/testsuite/gdb.base/display.exp
> --- gdb/testsuite/gdb.base/display.exp  Thu Nov 16 19:28:43 2000
> +++ gdb/testsuite/gdb.base/display.exp  Thu Nov 16 19:28:37 2000
> @@ -49,22 +49,23 @@ gdb_load ${binfile}
> 
>  # Some coverage stuff
>  #
> -gdb_test "kill" ".*The program is not being run.*"
> -gdb_test "detach" ".*"
> -gdb_test "run" ".*"
> +if ![target_info exists use_gdb_stub] {
> +    gdb_test "kill" ".*The program is not being run.*"
> +    gdb_test "detach" ".*"
> +    gdb_test "run" ".*"
> 
> -gdb_load ${binfile}
> -gdb_test "kill" ".*"
> -gdb_test "detach" ".*"
> +    gdb_load ${binfile}
> +    gdb_test "kill" ".*"
> +    gdb_test "detach" ".*"
> +
> +    gdb_exit
> +    gdb_start
> +    gdb_reinitialize_dir $srcdir/$subdir
> +    gdb_load ${binfile}
> +}
> 
>  # Ok, on to real life
>  #
> -
> -gdb_exit
> -gdb_start
> -gdb_reinitialize_dir $srcdir/$subdir
> -gdb_load ${binfile}
> -
>  if ![runto_main] then {
>      fail "Could not run to main - other tests will fail."
>      continue

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

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