[PATCH v2 1/3] Target remote mode fork and exec tests

Pedro Alves palves@redhat.com
Tue Dec 8 12:58:00 GMT 2015


On 12/07/2015 10:14 PM, Don Breazeal wrote:

> +# In remote mode we cannot use the 'set args' command, and this
> +# test requires it.
> +if { [target_info exists gdb_protocol] } then {
> +    if { [target_info gdb_protocol] == "remote" } then {
> +	continue
> +    }
>  }
>  

It looks a little odd to me not to merge that into a single if:

if { [target_info exists gdb_protocol]
     && [target_info gdb_protocol] == "remote" } {
   continue
}


>  if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
> diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
> index 2b34b6c..d5a915b 100644
> --- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp
> +++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp
> @@ -20,6 +20,14 @@
>  #
>  # See https://sourceware.org/bugzilla/show_bug.cgi?id=18600
>  
> +# In remote mode, we cannot continue debugging after all
> +# inferiors have terminated, and this test requires that.
> +if { [target_info exists gdb_protocol] } then {
> +    if { [target_info gdb_protocol] == "remote" } then {
> +	continue
> +    }
> +}

Likewise.

In any case, this is OK.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list