[PATCH] gdb.mi/mi-info-os.exp: Fix cross-debugger testing

Pedro Alves palves@redhat.com
Wed Nov 20 20:01:00 GMT 2013


On 11/01/2013 01:16 AM, Maciej W. Rozycki wrote:

> gdb-test-mi-info-os.diff
> Index: gdb-fsf-trunk-quilt/gdb/testsuite/gdb.mi/mi-info-os.exp
> ===================================================================
> --- gdb-fsf-trunk-quilt.orig/gdb/testsuite/gdb.mi/mi-info-os.exp	2013-11-01 00:52:48.000000000 +0000
> +++ gdb-fsf-trunk-quilt/gdb/testsuite/gdb.mi/mi-info-os.exp	2013-11-01 00:56:43.588756235 +0000
> @@ -33,6 +33,20 @@ if [mi_gdb_start] {
>      continue
>  }
>  
> +# In non-native configurations we need to have a live target.
> +if { ![isnative] } {

Shouldn't this be [is_remote target] ?  isnative just compares
the _build_ and target triplets.

(And even if host and target triplets matched, we could still
have a configuration without a native target)

Otherwise OK.

> +    standard_testfile basics.c
> +
> +    if [build_executable "Failed to build $testfile" $testfile $srcfile \
> +	debug] {
> +	return -1;
> +    }
> +
> +    if {[mi_run_to_main] < 0} {
> +	return -1
> +    }
> +}
> +
>  # Try the argument-less form that lists all the types in a table.
>  
>  mi_gdb_test "-info-os" ".*\\^done,OSDataTable=.*" "-info-os"
> 


-- 
Pedro Alves



More information about the Gdb-patches mailing list