--- testsuite/gdb.trace/tfind.exp | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) --- a/testsuite/gdb.trace/tfind.exp +++ b/testsuite/gdb.trace/tfind.exp @@ -36,10 +36,32 @@ gdb_test "tfind none" ".*" "" runto_main gdb_reinitialize_dir $srcdir/$subdir -if { ![gdb_target_supports_trace] } then { - unsupported "Current target does not support trace" - return 1; +if ![gdb_target_supports_trace] { + global TRACE_TRY_GDBSERVER + + if ![info exists TRACE_TRY_GDBSERVER] { + unsupported "target does not support trace" + return -1; + } + + load_lib gdbserver-support.exp + + clean_restart $testfile + if { [skip_gdbserver_tests] } { + unsupported "target does not support trace" + return -1; + } + + gdb_test "disconnect" ".*" + + gdbserver_run "" + gdb_reinitialize_dir $srcdir/$subdir + + if ![gdb_target_supports_trace] { + unsupported "target does not support trace" + return -1; + } } # If testing on a remote host, download the source file.