Clean up gdb.trace test results on targets not supporting this feature.
authorSandra Loosemore <sandra@codesourcery.com>
Sat, 13 Oct 2018 00:56:13 +0000 (17:56 -0700)
committerSandra Loosemore <sandra@codesourcery.com>
Sat, 13 Oct 2018 00:56:13 +0000 (17:56 -0700)
2018-10-12  Sandra Loosemore  <sandra@codesourcery.com>

gdb/testsuite/
* gdb.trace/actions-changed.exp: Check for arch support.
* gdb.trace/actions.exp: Likewise.
* gdb.trace/ax.exp: Likewise.
* gdb.trace/backtrace.exp: Likewise.
* gdb.trace/change-loc.exp: Likewise.
* gdb.trace/deltrace.exp: Likewise.
* gdb.trace/ftrace-lock.exp: Check for shlib and arch support.
* gdb.trace/ftrace.exp: Likewise.
* gdb.trace/infotrace.exp: Check for arch support.
* gdb.trace/mi-trace-frame-collected.exp: Likewise.
* gdb.trace/mi-tracepoint-changed.exp: Likewise.
* gdb.trace/mi-tsv-changed.exp: Likewise.
* gdb.trace/packetlen.exp: Likewise.
* gdb.trace/passc-dyn.exp: Likewise.
* gdb.trace/passcount.exp: Likewise.
* gdb.trace/pending.exp: Likewise.
* gdb.trace/range-stepping.exp: Check for shlib support.
* gdb.trace/report.exp: Check for arch support.
* gdb.trace/save-trace.exp: Likewise.
* gdb.trace/signal.exp: Check for signal support.
* gdb.trace/tfind.exp: Check for arch support.
* gdb.trace/trace-break.exp: Check for arch and shlib support.
* gdb.trace/trace-common.h: Add comment.
* gdb.trace/trace-condition.exp: Check for shlib and arch support.
* gdb.trace/trace-enable-disable.exp: Likewise.
* gdb.trace/trace-mt.exp: Likewise.  Remove redundant untested call.
* gdb.trace/tracecmd.exp: Check for arch support.
* gdb.trace/tspeed.exp: Check for shlib and target support.
* gdb.trace/tstatus.exp: Check for arch support.
* gdb.trace/tsv.exp: Likewise.
* gdb.trace/while-dyn.exp: Likewise.
* gdb.trace/while-stepping.exp: Likewise.
* lib/trace-support.exp (gdb_trace_common_supports_arch): New.

34 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/actions-changed.exp
gdb/testsuite/gdb.trace/actions.exp
gdb/testsuite/gdb.trace/ax.exp
gdb/testsuite/gdb.trace/backtrace.exp
gdb/testsuite/gdb.trace/change-loc.exp
gdb/testsuite/gdb.trace/deltrace.exp
gdb/testsuite/gdb.trace/ftrace-lock.exp
gdb/testsuite/gdb.trace/ftrace.exp
gdb/testsuite/gdb.trace/infotrace.exp
gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp
gdb/testsuite/gdb.trace/mi-tracepoint-changed.exp
gdb/testsuite/gdb.trace/mi-tsv-changed.exp
gdb/testsuite/gdb.trace/packetlen.exp
gdb/testsuite/gdb.trace/passc-dyn.exp
gdb/testsuite/gdb.trace/passcount.exp
gdb/testsuite/gdb.trace/pending.exp
gdb/testsuite/gdb.trace/range-stepping.exp
gdb/testsuite/gdb.trace/report.exp
gdb/testsuite/gdb.trace/save-trace.exp
gdb/testsuite/gdb.trace/signal.exp
gdb/testsuite/gdb.trace/tfind.exp
gdb/testsuite/gdb.trace/trace-break.exp
gdb/testsuite/gdb.trace/trace-common.h
gdb/testsuite/gdb.trace/trace-condition.exp
gdb/testsuite/gdb.trace/trace-enable-disable.exp
gdb/testsuite/gdb.trace/trace-mt.exp
gdb/testsuite/gdb.trace/tracecmd.exp
gdb/testsuite/gdb.trace/tspeed.exp
gdb/testsuite/gdb.trace/tstatus.exp
gdb/testsuite/gdb.trace/tsv.exp
gdb/testsuite/gdb.trace/while-dyn.exp
gdb/testsuite/gdb.trace/while-stepping.exp
gdb/testsuite/lib/trace-support.exp

index 465d606f0e536bfd901fdeee00400005e32548a9..fae99216b4518f87a6fbb6c6f7b7ce45d6265406 100644 (file)
@@ -1,3 +1,39 @@
+2018-10-12  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * gdb.trace/actions-changed.exp: Check for arch support.
+       * gdb.trace/actions.exp: Likewise.
+       * gdb.trace/ax.exp: Likewise.
+       * gdb.trace/backtrace.exp: Likewise.
+       * gdb.trace/change-loc.exp: Likewise.
+       * gdb.trace/deltrace.exp: Likewise.
+       * gdb.trace/ftrace-lock.exp: Check for shlib and arch support.
+       * gdb.trace/ftrace.exp: Likewise.
+       * gdb.trace/infotrace.exp: Check for arch support.
+       * gdb.trace/mi-trace-frame-collected.exp: Likewise.
+       * gdb.trace/mi-tracepoint-changed.exp: Likewise.
+       * gdb.trace/mi-tsv-changed.exp: Likewise.
+       * gdb.trace/packetlen.exp: Likewise.
+       * gdb.trace/passc-dyn.exp: Likewise.
+       * gdb.trace/passcount.exp: Likewise.
+       * gdb.trace/pending.exp: Likewise.
+       * gdb.trace/range-stepping.exp: Check for shlib support.
+       * gdb.trace/report.exp: Check for arch support.
+       * gdb.trace/save-trace.exp: Likewise.
+       * gdb.trace/signal.exp: Check for signal support.
+       * gdb.trace/tfind.exp: Check for arch support.
+       * gdb.trace/trace-break.exp: Check for arch and shlib support.
+       * gdb.trace/trace-common.h: Add comment.
+       * gdb.trace/trace-condition.exp: Check for shlib and arch support.
+       * gdb.trace/trace-enable-disable.exp: Likewise.
+       * gdb.trace/trace-mt.exp: Likewise.  Remove redundant untested call.
+       * gdb.trace/tracecmd.exp: Check for arch support.
+       * gdb.trace/tspeed.exp: Check for shlib and target support.
+       * gdb.trace/tstatus.exp: Check for arch support.
+       * gdb.trace/tsv.exp: Likewise.
+       * gdb.trace/while-dyn.exp: Likewise.
+       * gdb.trace/while-stepping.exp: Likewise.
+       * lib/trace-support.exp (gdb_trace_common_supports_arch): New.
+
 2018-10-12  Simon Marchi  <simon.marchi@ericsson.com>
 
        * gdb.trace/tspeed.exp: Remove nowarnings.
index 102f04f7343999febcac625c3504058c843f09ef..34b0ce9be1589ccaf223e1fdbc722a484f13f77f 100644 (file)
@@ -17,6 +17,11 @@ load_lib trace-support.exp
 
 standard_testfile
 
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
+
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
index ea02031c59b08e67d18b2c32cf3588d95051f0fc..4f4e2540ab784166ef348afb2f431b8eecdcc219 100644 (file)
@@ -22,6 +22,10 @@ gdb_exit
 gdb_start
 
 standard_testfile
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index 8156a0c577a7f22429b67895f495d7aa6148e3a5..3d1a11a39ee0d07898be024be1c2e1b81e45f2dd 100644 (file)
@@ -24,6 +24,12 @@ 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
+}
+
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index 6b41f8945b919c5b051233e29a465a595e8552f5..de4c8fe736980c22e1e676ffdd3bbe31a87f3746 100644 (file)
@@ -21,6 +21,11 @@ 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
+}
+
 if [prepare_for_testing "failed to prepare" $executable $srcfile \
        [list debug nowarnings]] {
     return -1
index 052f421614df35083fb83d661de711c42796b642..603dd14d1870ff75231085691e69f0bb6ae18d0d 100644 (file)
@@ -18,6 +18,11 @@ if {[skip_shlib_tests]} {
     return 0
 }
 
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
+
 standard_testfile
 set libfile1 "change-loc-1"
 set libfile2 "change-loc-2"
index f4ff474fb16fe460b73e8797b9daa38553d58edb..c18df571ba9eaa13227cc1d5dc2f1684cb477b57 100644 (file)
@@ -22,6 +22,12 @@ gdb_exit
 gdb_start
 
 standard_testfile actions.c
+
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
+
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index 3e5f0b8712ff10aa9a69f6bcbb660d7cd74ed966..619bd23f1ed0a08e6db5e99f2843c21c71141cb8 100644 (file)
 
 load_lib "trace-support.exp"
 
+if {[skip_shlib_tests]} {
+    return 0
+}
+
 standard_testfile
 set executable $testfile
 set expfile $testfile.exp
@@ -29,6 +33,10 @@ 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
+}
 if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
     untested "failed to compile"
     return -1
index 5c494c6bb4c96275bccd0f3560103f6f8c617652..959e2affbd3fcd070ee96d4a022fce2af395d2c4 100644 (file)
 
 load_lib "trace-support.exp"
 
+if {[skip_shlib_tests]} {
+    return 0
+}
+
 standard_testfile
 set executable $testfile
 set expfile $testfile.exp
@@ -21,6 +25,11 @@ 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
+}
+
 if [prepare_for_testing "failed to prepare" $executable $srcfile \
        [list debug $additional_flags]] {
     return -1
index b01365822cadd5de4f15ba07b42cc94a51fe7b75..1e33db3eab1e815f4554916817297a61aa3d7324 100644 (file)
@@ -22,6 +22,12 @@ gdb_exit
 gdb_start
 
 standard_testfile actions.c
+
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
+
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index 09e9a47221b0dd43c9fa577d11ec73d4c1d9e81b..56936cc02c4ebe34ce8afa3eea21ea725af7e922 100644 (file)
@@ -17,6 +17,11 @@ 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
+}
+
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}] } {
     return -1
 }
index de7ae40fca873f4497e7c0089fd6ede3e5908e2a..9808b40d0fe3adb581107fa0cbc05fe9efdfb236 100644 (file)
@@ -18,6 +18,10 @@ load_lib trace-support.exp
 if {[skip_shlib_tests]} {
     return 0
 }
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
 
 standard_testfile pending.c
 set libfile1 "pendshr1"
index 56dcd3451c818a7f742d81c2564bce14fd719228..382a052a696d08f813664101f98740083a5113c9 100644 (file)
@@ -17,6 +17,12 @@ load_lib trace-support.exp
 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
+}
+
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index ca54cfe15963702e2c852cb915bbf7c6baf91cdb..2322900e44f159ba9ff2f8bd2c223f32e83d92f8 100644 (file)
@@ -22,6 +22,10 @@ gdb_exit
 gdb_start
 
 standard_testfile actions.c
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index 1738b46234a8004020aea81a383fd886995695a5..9457826263e18bcdd8ff6ff017b4b76b2342e1c6 100644 (file)
@@ -21,6 +21,10 @@ 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
+}
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index 055020f649ffc9a166073b18ebf06faaaf8381d4..733c2deb8a38098c2122fe6a71657b35d87d860b 100644 (file)
@@ -21,6 +21,10 @@ 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
+}
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index bb039df4bd5c002fd6c5470bcaf1aed957d8d739..fbb1c4d08ca583a24dbc524f73ea004d09639cb7 100644 (file)
@@ -18,6 +18,11 @@ if {[skip_shlib_tests]} {
     return 0
 }
 
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
+
 standard_testfile
 set libfile1 "pendshr1"
 set libfile2 "pendshr2"
index 027703282587761b28096db3a2b754bb3631a8ba..1bc0cc74ed05f51c7f6ef4de523d17278ec05c10 100644 (file)
@@ -66,6 +66,10 @@ proc range_stepping_with_tracepoint { type } {
 
 range_stepping_with_tracepoint "trace"
 
+if {[skip_shlib_tests]} {
+    return 0
+}
+
 set libipa [get_in_proc_agent]
 set remote_libipa [gdb_load_shlib $libipa]
 
index 5155165b695c9c11d034b5f984f97a1de27d6581..4b50e12be0b0bf68fd02e74ce45201c4912e3686 100644 (file)
@@ -22,6 +22,10 @@ gdb_exit
 gdb_start
 
 standard_testfile actions.c
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index fe34d3fd1b1bf37280a1754af9d6dff88f15d3db..3665778a2ba0dfdef4c159528e2936679bb19043 100644 (file)
@@ -22,6 +22,10 @@ gdb_exit
 gdb_start
 
 standard_testfile actions.c
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index b860b12d634bb18bba5569c9dce4c157292ca0b3..a01ca97f2f37b51e10eccf76d598a9397ad0e736 100644 (file)
 
 load_lib "trace-support.exp"
 
+if [target_info exists gdb,nosignals] {
+    verbose "Skipping signal.exp because of nosignals."
+    return -1
+}
+
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
index bbb7ec829dd37a0781c9b6301c6d15207a6974d2..ec6a70c2bc420c19f334418082788d6a4718cef8 100644 (file)
@@ -23,6 +23,11 @@ gdb_start
 
 standard_testfile actions.c
 
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
+
 if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index 84c4780ba2a71d22008850a3987fb6aacaad7080..c4895f94325387a5dcd969bb7e009e86a5441154 100644 (file)
@@ -21,6 +21,11 @@ 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
+}
+
 if [prepare_for_testing "failed to prepare" $executable $srcfile \
        [list debug $additional_flags]] {
     return -1
@@ -347,6 +352,10 @@ foreach at_first_loc { "1" "0" } {
 break_trace_same_addr_6 "trace" "enable" "trace" "disable"
 break_trace_same_addr_6 "trace" "disable" "trace" "enable"
 
+if {[skip_shlib_tests]} {
+    return 0
+}
+
 set libipa [get_in_proc_agent]
 set remote_libipa [gdb_load_shlib $libipa]
 
index 9f60d7fd7bd8d21a885e653cf098a9d99114dfd6..eb34b5c40a3ee347342d7d75e9278db522418f98 100644 (file)
@@ -25,6 +25,9 @@
    a fast tracepoint jump.  The parameter is the label where we'll set
    tracepoints and breakpoints.  */
 
+/* Please keep gdb_trace_common_supports_arch in lib/trace-support.exp
+   in sync when adding new targets to this file.  */
+
 #if (defined __x86_64__ || defined __i386__)
 
 static void
index d23e6a3f5b715ac33f26f7777515dc1c9320a974..c7fafd7bd1cbee6c40084ef4e44c6af060e75ec1 100644 (file)
 
 load_lib "trace-support.exp"
 
+if {[skip_shlib_tests]} {
+    return 0
+}
+
 standard_testfile
 set executable $testfile
 set expfile $testfile.exp
@@ -21,6 +25,11 @@ 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
+}
+
 if [prepare_for_testing "failed to prepare" $executable $srcfile \
        [list debug $additional_flags]] {
     return -1
index 1b3ba0b4bdd0548e6212af1c2c924de65bf246fa..01147ccaab8a10d8cdbd3c4013c33b0590a6ef27 100644 (file)
 
 load_lib "trace-support.exp"
 
+if {[skip_shlib_tests]} {
+    return 0
+}
+
 standard_testfile
 set executable $testfile
 set expfile $testfile.exp
@@ -22,6 +26,10 @@ 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
+}
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
     untested "failed to compile"
     return -1
index 6e18666111be0693f234385e70fa368aad17d5e3..dae85a96b6e2deccb9c149c262254aabe11220d3 100644 (file)
@@ -21,9 +21,14 @@ 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
+}
+
 if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile \
          executable [list debug $additional_flags] ] != "" } {
-    untested "failed to compile"
+    # gdb_compile_pthreads provides an appropriate unsupported message.
     return -1
 }
 
@@ -106,6 +111,10 @@ foreach break_always_inserted { "on" "off" } {
 
 step_over_tracepoint "trace"
 
+if {[skip_shlib_tests]} {
+    return 0
+}
+
 set libipa [get_in_proc_agent]
 set remote_libipa [gdb_load_shlib $libipa]
 
index 6a5d6644a077d5651061b13584a75f665beec245..de3de8ae171bde3e938e2694b94f7dd1d843f9ee 100644 (file)
@@ -21,6 +21,10 @@ 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
+}
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index bc12afd0a83111c4d5522b4195eb4929d7058ff1..b77f412363ed7bf38c209c4884268509505d275f 100644 (file)
 
 load_lib "trace-support.exp"
 
+if {[skip_shlib_tests]} {
+    return 0
+}
+
 standard_testfile
 set executable $testfile
 
+# Check that the target supports trace.
+if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
+    untested "failed to compile"
+    return -1
+}
+
+clean_restart ${testfile}
+
+if ![runto_main] {
+    fail "can't run to main to check for trace support"
+    return -1
+}
+
+if ![gdb_target_supports_trace] {
+    unsupported "target does not support trace"
+    return -1
+}
+
+# Compile the test case with the in-process agent library.
 set ipalib [get_in_proc_agent]
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
index 3498b1c13c02165d69def4635d291655d3ca7c2d..44e599c88fa2f01d733556344ea3399ac1273d61 100644 (file)
@@ -18,6 +18,11 @@ 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
+}
+
 if [prepare_for_testing "failed to prepare" $executable $srcfile \
        [list debug]] {
     return -1
index a86919a75d663841fabea78dbbd7c16d4f54a2d9..a8ec8d4745b87655e13f84cb3d3c1675418ab5f1 100644 (file)
@@ -19,6 +19,10 @@ 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
+}
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index 0fb6b47b0b1c84c8d8bf4487ffd1fc03da8c9cd0..95718797fa04579ac9d81d3a6aab4e7dbb8cf8ec 100644 (file)
@@ -23,6 +23,10 @@ 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
+}
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index 29bdf2d15130e36052106d2b81b35fb0bdaec144..45d162013421d5a3f079a02f9d4784112b89a8f7 100644 (file)
@@ -22,6 +22,10 @@ gdb_exit
 gdb_start
 
 standard_testfile actions.c
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
          executable {debug nowarnings}] != "" } {
     untested "failed to compile"
index 547da372b20b42eaa50a80e3186aec655bf9f202..e5603d4f6f019fa99cb967c16095eeb998d1ba1b 100644 (file)
@@ -50,6 +50,25 @@ if [is_amd64_regs_target] {
     set pcreg "pc"
 }
 
+#
+# Procedure: gdb_trace_common_supports_arch
+# Returns true if gdb.trace/trace-common.h knows about this target.
+# Allows skipping tests that depend on being able to include this file.
+# Please keep this in sync with the supported targets in the header.
+#
+
+proc gdb_trace_common_supports_arch { } {
+  if { [istarget "x86_64*-*-*"]
+       || [istarget "i386*-*-*"]
+       || [istarget "aarch64*-*-*"]
+       || [istarget "powerpc*-*-*"]
+       || [istarget "s390*-*-*"] } {
+       return 1
+    } else {
+       return 0
+    }
+}
+
 #
 # Procedure: gdb_target_supports_trace
 # Returns true if GDB is connected to a target that supports tracing.
This page took 0.045026 seconds and 4 git commands to generate.