From 42422cc7d6c2e816ef1c4d268f41b58c031344f2 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Wed, 15 Jul 2015 14:33:32 +0100 Subject: [testsuite] Skip gdb.trace/range-stepping.exp test case if not supported Tracepoints and range stepping are independent features. This patch skips the gdb.trace/range-stepping.exp test case if the target does not support range stepping. gdb/testsuite/ChangeLog: * gdb.base/range-stepping.exp (gdb_range_stepping_enabled): Move it to ... * lib/range-stepping-support.exp (gdb_range_stepping_enabled): ... here. * gdb.trace/range-stepping.exp: Check that the target supports range stepping. --- gdb/testsuite/lib/range-stepping-support.exp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gdb/testsuite/lib') diff --git a/gdb/testsuite/lib/range-stepping-support.exp b/gdb/testsuite/lib/range-stepping-support.exp index 986216e..d6c0e85 100644 --- a/gdb/testsuite/lib/range-stepping-support.exp +++ b/gdb/testsuite/lib/range-stepping-support.exp @@ -52,3 +52,24 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } { gdb_test_no_output "set debug remote 0" "" return $ret } + +# Check whether range stepping is supported by the target. + +proc gdb_range_stepping_enabled { } { + global gdb_prompt + + set command "set range-stepping on" + set message "probe range-stepping support" + gdb_test_multiple $command $message { + -re "Range stepping is not supported.*\r\n$gdb_prompt $" { + pass $message + return 0 + } + -re "^$command\r\n$gdb_prompt $" { + pass $message + return 1 + } + } + + return 0 +} -- cgit v1.1