]> 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 5bc63863722877300fa5dd5f074f9c8b36c8b9ad..55b70d1de0fd09a05f2a696dd61872a846040b40 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2015-2019 Free Software Foundation, Inc.
+# Copyright 2015-2021 Free Software Foundation, Inc.
 #
 # Contributed by Intel Corp. <walfred.tedeschi@intel.com>,
 #                            <mircea.gherzan@intel.com>
@@ -23,6 +23,15 @@ 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 "failed to prepare" ${testfile} ${srcfile} \
@@ -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" ]