btrace, testsuite: fix assembly source file selection
authorMarkus Metzger <markus.t.metzger@intel.com>
Fri, 22 Jul 2016 11:41:45 +0000 (13:41 +0200)
committerMarkus Metzger <markus.t.metzger@intel.com>
Tue, 26 Jul 2016 11:56:27 +0000 (13:56 +0200)
Some btrace tests use assembly source files.  They use the target triplet to
distinguish between x86_64 and ia32 ISA.  This does not work for -m32 tests
without setting the target triplet to i686-?-?.

Instead use is_amd64_regs_target to distinguish between x86_64 and ia32 ISA.

See also https://sourceware.org/ml/gdb-patches/2016-07/msg00256.html.

testsuite/
* gdb.btrace/record_goto.exp: Use is_amd64_regs_target for selecting
assembly source files.
* gdb.btrace/stepi.exp: Use is_amd64_regs_target for selecting
assembly source files.
* gdb.btrace/tailcall.exp: Use is_amd64_regs_target for selecting
assembly source files.
* gdb.btrace/tailcall-only.exp: Use is_amd64_regs_target for selecting
assembly source files.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.btrace/record_goto.exp
gdb/testsuite/gdb.btrace/stepi.exp
gdb/testsuite/gdb.btrace/tailcall-only.exp
gdb/testsuite/gdb.btrace/tailcall.exp

index 609d2625fd9842f1a3e998c69428ed243cc72e1b..aa7aa28f622424cd0a16cc1b399ab4c0e3067fd6 100644 (file)
@@ -1,3 +1,14 @@
+2016-07-26  Markus Metzger  <markus.t.metzger@intel.com>
+
+       * gdb.btrace/record_goto.exp: se is_amd64_regs_target for
+       selecting assembly source files.
+       * gdb.btrace/stepi.exp: se is_amd64_regs_target for selecting
+       assembly source files.
+       * gdb.btrace/tailcall.exp: se is_amd64_regs_target for selecting
+       assembly source files.
+       * gdb.btrace/tailcall-only.exp: se is_amd64_regs_target for
+       selecting assembly source files.
+
 2016-07-25  Simon Marchi  <simon.marchi@ericsson.com>
 
        * gdb.base/new-ui.exp (do_test_invalid_args): New
index 50b259adb4fd9ba68c83da709851c5c59c3b14ee..7df33bc3dd30dd1298d24a1fa2e8a0eb27db6083 100644 (file)
@@ -33,10 +33,12 @@ 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-*-*"]} {
-       standard_testfile x86_64-record_goto.S
-} elseif {[istarget "i?86-*-*"]} {
-       standard_testfile i686-record_goto.S
+} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} {
+       if {[is_amd64_regs_target]} {
+               standard_testfile x86_64-record_goto.S
+       } else {
+               standard_testfile i686-record_goto.S
+       }
 } else {
     verbose "Skipping ${testfile}."
     return -1
index 3aff8cbcda2531ac237f5a19626d68943afc3895..b21e4e570e9c7b8c5d9150fd0d6edac37068a480 100644 (file)
@@ -27,12 +27,19 @@ if { [skip_btrace_tests] } { return -1 }
 #
 # Luckily, they are similar enough that a single test script can handle
 # both.
-if {[istarget "x86_64-*-*"]} {
-       standard_testfile x86_64-record_goto.S
-} elseif {[istarget "i?86-*-*"]} {
-       standard_testfile i686-record_goto.S
+if [info exists COMPILE] {
+    # make check RUNTESTFLAGS="gdb.btrace/stepi.exp COMPILE=1"
+    standard_testfile record_goto.c
+    lappend opts debug
+} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} {
+       if {[is_amd64_regs_target]} {
+               standard_testfile x86_64-record_goto.S
+       } else {
+               standard_testfile i686-record_goto.S
+       }
 } else {
-       return -1
+    verbose "Skipping ${testfile}."
+    return -1
 }
 
 # start inferior
index 50837bffeb49fe6bb17c899a0ca3c63301bd8158..494e2e806b2a725db4213ef3d6de28b19a35fc26 100644 (file)
@@ -35,13 +35,15 @@ if [info exists COMPILE] {
     # make check RUNTESTFLAGS="gdb.btrace/tailcall-only.exp COMPILE=1"
     standard_testfile tailcall-only.c
     lappend opts debug optimize=-O2
-} elseif {[istarget "x86_64-*-*"] && [is_lp64_target]} {
-       standard_testfile x86_64-tailcall-only.S
 } elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} {
-       standard_testfile i686-tailcall-only.S
+       if {[is_amd64_regs_target]} {
+               standard_testfile x86_64-tailcall-only.S
+       } else {
+               standard_testfile i686-tailcall-only.S
+       }
 } else {
     verbose "Skipping ${testfile}."
-    return
+    return -1
 }
 
 if [prepare_for_testing tailcall-only.exp $testfile $srcfile $opts] {
index 22704c7ca18c05a1a50c213132e6ceee4bfb59d8..bc8afc472a796249661d09c5bdb8f85c020d7d2e 100644 (file)
@@ -32,13 +32,15 @@ if [info exists COMPILE] {
     # make check RUNTESTFLAGS="gdb.btrace/tailcall.exp COMPILE=1"
     standard_testfile tailcall.c
     lappend opts debug optimize=-O2
-} elseif {[istarget "x86_64-*-*"]} {
-       standard_testfile x86_64-tailcall.S
-} elseif {[istarget "i?86-*-*"]} {
-       standard_testfile i686-tailcall.S
+} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} {
+       if {[is_amd64_regs_target]} {
+               standard_testfile x86_64-tailcall.S
+       } else {
+               standard_testfile i686-tailcall.S
+       }
 } else {
     verbose "Skipping ${testfile}."
-    return
+    return -1
 }
 
 if [prepare_for_testing tailcall.exp $testfile $srcfile $opts] {
This page took 0.030007 seconds and 4 git commands to generate.