btrace: fix tests for 32-bit
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.btrace / record_goto.exp
index c9329009ae655c74df03ad1ad0a743aa2de16565..7485fc7908e014c662144d889c475e471a1b8e5b 100644 (file)
 # check for btrace support
 if { [skip_btrace_tests] } { return -1 }
 
-# start inferior
-standard_testfile x86-record_goto.S
-
+# The "record goto" command jumps to a specific instruction in the execution
+# trace.  To guarantee that we always get the same execution trace, we use
+# an assembly source file.
+#
+# We use different assembly sources based on the target architecture.
+#
+# Luckily, they are similar enough that a single test script can handle
+# both.
 set opts {}
 if [info exists COMPILE] {
     # make check RUNTESTFLAGS="gdb.btrace/record_goto.exp COMPILE=1"
     standard_testfile record_goto.c
     lappend opts debug
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
+} elseif {[istarget "x86_64-*-*"]} {
+       standard_testfile x86_64-record_goto.S
+} elseif {[istarget "i?86-*-*"]} {
+       standard_testfile i686-record_goto.S
+} else {
     verbose "Skipping ${testfile}."
-    return
+    return -1
 }
 
 if [prepare_for_testing record_goto.exp $testfile $srcfile $opts] {
This page took 0.024004 seconds and 4 git commands to generate.