From fbee47e0b58b8f948d56b113cb48e1b7c884b980 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 15 Dec 2022 16:15:13 -0700 Subject: Use require gdb_trace_common_supports_arch This changes some tests to use "require gdb_trace_common_supports_arch". --- gdb/testsuite/gdb.trace/actions-changed.exp | 5 +---- gdb/testsuite/gdb.trace/actions.exp | 5 +---- gdb/testsuite/gdb.trace/ax.exp | 5 +---- gdb/testsuite/gdb.trace/backtrace.exp | 5 +---- gdb/testsuite/gdb.trace/change-loc.exp | 5 +---- gdb/testsuite/gdb.trace/deltrace.exp | 5 +---- gdb/testsuite/gdb.trace/ftrace-lock.exp | 5 +---- gdb/testsuite/gdb.trace/ftrace.exp | 5 +---- gdb/testsuite/gdb.trace/infotrace.exp | 5 +---- gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp | 5 +---- gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp | 5 +---- gdb/testsuite/gdb.trace/mi-tsv-changed.exp | 5 +---- gdb/testsuite/gdb.trace/packetlen.exp | 5 +---- gdb/testsuite/gdb.trace/passc-dyn.exp | 5 +---- gdb/testsuite/gdb.trace/passcount.exp | 5 +---- gdb/testsuite/gdb.trace/pending.exp | 5 +---- gdb/testsuite/gdb.trace/report.exp | 5 +---- gdb/testsuite/gdb.trace/save-trace.exp | 5 +---- gdb/testsuite/gdb.trace/tfind.exp | 5 +---- gdb/testsuite/gdb.trace/trace-break.exp | 5 +---- gdb/testsuite/gdb.trace/trace-condition.exp | 5 +---- gdb/testsuite/gdb.trace/trace-enable-disable.exp | 5 +---- gdb/testsuite/gdb.trace/trace-mt.exp | 5 +---- gdb/testsuite/gdb.trace/tracecmd.exp | 5 +---- gdb/testsuite/gdb.trace/tstatus.exp | 5 +---- gdb/testsuite/gdb.trace/tsv.exp | 5 +---- gdb/testsuite/gdb.trace/while-dyn.exp | 5 +---- gdb/testsuite/gdb.trace/while-stepping.exp | 5 +---- 28 files changed, 28 insertions(+), 112 deletions(-) (limited to 'gdb') diff --git a/gdb/testsuite/gdb.trace/actions-changed.exp b/gdb/testsuite/gdb.trace/actions-changed.exp index 40563d9..0c1542f 100644 --- a/gdb/testsuite/gdb.trace/actions-changed.exp +++ b/gdb/testsuite/gdb.trace/actions-changed.exp @@ -17,10 +17,7 @@ load_lib trace-support.exp standard_testfile -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { return -1 diff --git a/gdb/testsuite/gdb.trace/actions.exp b/gdb/testsuite/gdb.trace/actions.exp index e2254e8..cf7efbb 100644 --- a/gdb/testsuite/gdb.trace/actions.exp +++ b/gdb/testsuite/gdb.trace/actions.exp @@ -22,10 +22,7 @@ gdb_exit gdb_start standard_testfile -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable {debug nowarnings}] != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.trace/ax.exp b/gdb/testsuite/gdb.trace/ax.exp index 2c9d3db..9dee743 100644 --- a/gdb/testsuite/gdb.trace/ax.exp +++ b/gdb/testsuite/gdb.trace/ax.exp @@ -25,10 +25,7 @@ gdb_exit gdb_start standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable {debug nowarnings}] != "" } { diff --git a/gdb/testsuite/gdb.trace/backtrace.exp b/gdb/testsuite/gdb.trace/backtrace.exp index 08445b1..5462267 100644 --- a/gdb/testsuite/gdb.trace/backtrace.exp +++ b/gdb/testsuite/gdb.trace/backtrace.exp @@ -21,10 +21,7 @@ standard_testfile actions.c set executable $testfile set expfile $testfile.exp -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if [prepare_for_testing "failed to prepare" $executable $srcfile \ [list debug nowarnings nopie]] { diff --git a/gdb/testsuite/gdb.trace/change-loc.exp b/gdb/testsuite/gdb.trace/change-loc.exp index 75d381d..2bab45d 100644 --- a/gdb/testsuite/gdb.trace/change-loc.exp +++ b/gdb/testsuite/gdb.trace/change-loc.exp @@ -16,10 +16,7 @@ load_lib "trace-support.exp" require !skip_shlib_tests -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch standard_testfile set libfile1 "change-loc-1" diff --git a/gdb/testsuite/gdb.trace/deltrace.exp b/gdb/testsuite/gdb.trace/deltrace.exp index 876a90f..cfcb81e 100644 --- a/gdb/testsuite/gdb.trace/deltrace.exp +++ b/gdb/testsuite/gdb.trace/deltrace.exp @@ -23,10 +23,7 @@ gdb_start standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable {debug nowarnings}] != "" } { diff --git a/gdb/testsuite/gdb.trace/ftrace-lock.exp b/gdb/testsuite/gdb.trace/ftrace-lock.exp index e5e8638..92374c9 100644 --- a/gdb/testsuite/gdb.trace/ftrace-lock.exp +++ b/gdb/testsuite/gdb.trace/ftrace-lock.exp @@ -31,10 +31,7 @@ set options [list debug [gdb_target_symbol_prefix_flags] \ additional_flags=-DNUM_THREADS=$NUM_THREADS] # Check that the target supports trace. -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } { untested "failed to compile" return -1 diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp index bab97cb..7d7d684 100644 --- a/gdb/testsuite/gdb.trace/ftrace.exp +++ b/gdb/testsuite/gdb.trace/ftrace.exp @@ -23,10 +23,7 @@ set expfile $testfile.exp # Some targets have leading underscores on assembly symbols. set additional_flags [gdb_target_symbol_prefix_flags] -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if [prepare_for_testing "failed to prepare" $executable $srcfile \ [list debug $additional_flags]] { diff --git a/gdb/testsuite/gdb.trace/infotrace.exp b/gdb/testsuite/gdb.trace/infotrace.exp index 3b779ba..1252b30 100644 --- a/gdb/testsuite/gdb.trace/infotrace.exp +++ b/gdb/testsuite/gdb.trace/infotrace.exp @@ -23,10 +23,7 @@ gdb_start standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable {debug nowarnings}] != "" } { diff --git a/gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp b/gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp index ab66b3e..f87a6cf 100644 --- a/gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp +++ b/gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp @@ -17,10 +17,7 @@ load_lib trace-support.exp standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}] } { return -1 diff --git a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp index 1ea8e72..f6b12b5 100644 --- a/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp +++ b/gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp @@ -16,10 +16,7 @@ load_lib trace-support.exp require !skip_shlib_tests -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch standard_testfile pending.c set libfile1 "pendshr1" diff --git a/gdb/testsuite/gdb.trace/mi-tsv-changed.exp b/gdb/testsuite/gdb.trace/mi-tsv-changed.exp index 2deb988..57bedd6 100644 --- a/gdb/testsuite/gdb.trace/mi-tsv-changed.exp +++ b/gdb/testsuite/gdb.trace/mi-tsv-changed.exp @@ -18,10 +18,7 @@ load_lib mi-support.exp standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable {debug nowarnings}] != "" } { diff --git a/gdb/testsuite/gdb.trace/packetlen.exp b/gdb/testsuite/gdb.trace/packetlen.exp index f4e0005..31686bc 100644 --- a/gdb/testsuite/gdb.trace/packetlen.exp +++ b/gdb/testsuite/gdb.trace/packetlen.exp @@ -22,10 +22,7 @@ gdb_exit gdb_start standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable {debug nowarnings}] != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.trace/passc-dyn.exp b/gdb/testsuite/gdb.trace/passc-dyn.exp index 78c5f07..c005c79 100644 --- a/gdb/testsuite/gdb.trace/passc-dyn.exp +++ b/gdb/testsuite/gdb.trace/passc-dyn.exp @@ -21,10 +21,7 @@ load_lib "trace-support.exp" gdb_exit gdb_start standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable {debug nowarnings}] != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.trace/passcount.exp b/gdb/testsuite/gdb.trace/passcount.exp index 5aa8f48..3f71149 100644 --- a/gdb/testsuite/gdb.trace/passcount.exp +++ b/gdb/testsuite/gdb.trace/passcount.exp @@ -21,10 +21,7 @@ load_lib "trace-support.exp" gdb_exit gdb_start standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable {debug nowarnings}] != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.trace/pending.exp b/gdb/testsuite/gdb.trace/pending.exp index deaaeef..8778c1f 100644 --- a/gdb/testsuite/gdb.trace/pending.exp +++ b/gdb/testsuite/gdb.trace/pending.exp @@ -16,10 +16,7 @@ load_lib "trace-support.exp" require !skip_shlib_tests -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch standard_testfile set libfile1 "pendshr1" diff --git a/gdb/testsuite/gdb.trace/report.exp b/gdb/testsuite/gdb.trace/report.exp index 76b74a9..33bccaa 100644 --- a/gdb/testsuite/gdb.trace/report.exp +++ b/gdb/testsuite/gdb.trace/report.exp @@ -22,10 +22,7 @@ gdb_exit gdb_start standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable {debug nowarnings nopie}] != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.trace/save-trace.exp b/gdb/testsuite/gdb.trace/save-trace.exp index 76c208c..71a094a 100644 --- a/gdb/testsuite/gdb.trace/save-trace.exp +++ b/gdb/testsuite/gdb.trace/save-trace.exp @@ -22,10 +22,7 @@ gdb_exit gdb_start standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable {debug nowarnings}] != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.trace/tfind.exp b/gdb/testsuite/gdb.trace/tfind.exp index fc04a05..4579e85 100644 --- a/gdb/testsuite/gdb.trace/tfind.exp +++ b/gdb/testsuite/gdb.trace/tfind.exp @@ -23,10 +23,7 @@ gdb_start standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \ executable {debug nowarnings nopie}] != "" } { diff --git a/gdb/testsuite/gdb.trace/trace-break.exp b/gdb/testsuite/gdb.trace/trace-break.exp index 3630aae..6e5415c 100644 --- a/gdb/testsuite/gdb.trace/trace-break.exp +++ b/gdb/testsuite/gdb.trace/trace-break.exp @@ -21,10 +21,7 @@ set expfile $testfile.exp # Some targets have leading underscores on assembly symbols. set additional_flags [gdb_target_symbol_prefix_flags] -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if [prepare_for_testing "failed to prepare" $executable $srcfile \ [list debug $additional_flags]] { diff --git a/gdb/testsuite/gdb.trace/trace-condition.exp b/gdb/testsuite/gdb.trace/trace-condition.exp index d6f7fc0..d49b792 100644 --- a/gdb/testsuite/gdb.trace/trace-condition.exp +++ b/gdb/testsuite/gdb.trace/trace-condition.exp @@ -23,10 +23,7 @@ set expfile $testfile.exp # Some targets have leading underscores on assembly symbols. set additional_flags [gdb_target_symbol_prefix_flags] -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if [prepare_for_testing "failed to prepare" $executable $srcfile \ [list debug $additional_flags]] { diff --git a/gdb/testsuite/gdb.trace/trace-enable-disable.exp b/gdb/testsuite/gdb.trace/trace-enable-disable.exp index e42f6f7..76b5b9a 100644 --- a/gdb/testsuite/gdb.trace/trace-enable-disable.exp +++ b/gdb/testsuite/gdb.trace/trace-enable-disable.exp @@ -24,10 +24,7 @@ set expfile $testfile.exp set options [list debug [gdb_target_symbol_prefix_flags]] # Check that the target supports trace. -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } { untested "failed to compile" return -1 diff --git a/gdb/testsuite/gdb.trace/trace-mt.exp b/gdb/testsuite/gdb.trace/trace-mt.exp index e57cad8..0fc2f00 100644 --- a/gdb/testsuite/gdb.trace/trace-mt.exp +++ b/gdb/testsuite/gdb.trace/trace-mt.exp @@ -21,10 +21,7 @@ set expfile $testfile.exp # Some targets have leading underscores on assembly symbols. set additional_flags [gdb_target_symbol_prefix_flags] -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile \ executable [list debug $additional_flags] ] != "" } { diff --git a/gdb/testsuite/gdb.trace/tracecmd.exp b/gdb/testsuite/gdb.trace/tracecmd.exp index f94b14e..7ce6f59 100644 --- a/gdb/testsuite/gdb.trace/tracecmd.exp +++ b/gdb/testsuite/gdb.trace/tracecmd.exp @@ -21,10 +21,7 @@ load_lib "trace-support.exp" gdb_exit gdb_start standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable {debug nowarnings}] != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.trace/tstatus.exp b/gdb/testsuite/gdb.trace/tstatus.exp index 8b55a74..a847a03 100644 --- a/gdb/testsuite/gdb.trace/tstatus.exp +++ b/gdb/testsuite/gdb.trace/tstatus.exp @@ -18,10 +18,7 @@ standard_testfile actions.c set executable $testfile set expfile tstatus.exp -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if [prepare_for_testing "failed to prepare" $executable $srcfile \ [list debug]] { diff --git a/gdb/testsuite/gdb.trace/tsv.exp b/gdb/testsuite/gdb.trace/tsv.exp index a104c1b..ea7ad55 100644 --- a/gdb/testsuite/gdb.trace/tsv.exp +++ b/gdb/testsuite/gdb.trace/tsv.exp @@ -19,10 +19,7 @@ load_lib "trace-support.exp" gdb_exit gdb_start standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable {debug nowarnings}] != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.trace/while-dyn.exp b/gdb/testsuite/gdb.trace/while-dyn.exp index e858315..960a959 100644 --- a/gdb/testsuite/gdb.trace/while-dyn.exp +++ b/gdb/testsuite/gdb.trace/while-dyn.exp @@ -23,10 +23,7 @@ gdb_start standard_testfile actions.c set executable $testfile -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ executable {debug nowarnings}] != "" } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.trace/while-stepping.exp b/gdb/testsuite/gdb.trace/while-stepping.exp index 583bba1..64c0c9e 100644 --- a/gdb/testsuite/gdb.trace/while-stepping.exp +++ b/gdb/testsuite/gdb.trace/while-stepping.exp @@ -22,10 +22,7 @@ gdb_exit gdb_start standard_testfile actions.c -if ![gdb_trace_common_supports_arch] { - unsupported "no trace-common.h support for arch" - return -1 -} +require gdb_trace_common_supports_arch if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \ executable {debug nowarnings}] != "" } { untested "failed to compile" -- cgit v1.1