]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.arch/i386-mpx-map.exp
Fix powerpc-power8.exp test with new mnemonics
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / i386-mpx-map.exp
index a3488c0d9c57e496078d44d5ac47a05e3b8f006f..55b70d1de0fd09a05f2a696dd61872a846040b40 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2021 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <walfred.tedeschi@intel.com>,
 #                            <mircea.gherzan@intel.com>
@@ -23,9 +23,18 @@ if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
 
 standard_testfile
 
+if { ![supports_mpx_check_pointer_bounds] } {
+    return -1
+}
+
+if { ![have_mpx] } {
+    unsupported "processor does not support MPX"
+    return -1
+}
+
 set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
  [list debug nowarnings additional_flags=${comp_flags}]] } {
     return -1
 }
@@ -35,24 +44,6 @@ if ![runto_main] {
        return -1
 }
 
-set supports_mpx 0
-set test "probe MPX support"
-
-gdb_test_multiple "print have_mpx()" $test {
-    -re ".. = 1\r\n$gdb_prompt $" {
-        pass $test
-        set supports_mpx 1
-    }
-    -re ".. = 0\r\n$gdb_prompt $" {
-        pass $test
-    }
-}
-
-if { !$supports_mpx } {
-    unsupported "processor does not support MPX"
-    return
-}
-
 gdb_breakpoint [ gdb_get_line_number "after-decl" ]
 gdb_breakpoint [ gdb_get_line_number "after-alloc" ]
 gdb_breakpoint [ gdb_get_line_number "after-assign" ]