# 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] {