aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog9
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx-call.exp4
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx-map.exp4
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp4
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp4
-rw-r--r--gdb/testsuite/gdb.arch/i386-mpx.exp4
-rw-r--r--gdb/testsuite/lib/gdb.exp12
7 files changed, 41 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e741fd6..986e3be 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,14 @@
2020-05-02 Tom de Vries <tdevries@suse.de>
+ * lib/gdb.exp (supports_mpx_check_pointer_bounds): New proc.
+ * gdb.arch/i386-mpx-call.exp: Use supports_mpx_check_pointer_bounds.
+ * gdb.arch/i386-mpx-map.exp: Same.
+ * gdb.arch/i386-mpx-sigsegv.exp: Same.
+ * gdb.arch/i386-mpx-simple_segv.exp: Same.
+ * gdb.arch/i386-mpx.exp: Same.
+
+2020-05-02 Tom de Vries <tdevries@suse.de>
+
* gdb.base/psym-external-decl.c (main): Add use of variable aaa.
2020-05-01 Tom de Vries <tdevries@suse.de>
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-call.exp b/gdb/testsuite/gdb.arch/i386-mpx-call.exp
index b11adfc..41abbee 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx-call.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx-call.exp
@@ -21,6 +21,10 @@ if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
standard_testfile
+if { ![supports_mpx_check_pointer_bounds] } {
+ return -1
+}
+
set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat"
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-map.exp b/gdb/testsuite/gdb.arch/i386-mpx-map.exp
index 3cde42f..995aaa1 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx-map.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx-map.exp
@@ -23,6 +23,10 @@ if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
standard_testfile
+if { ![supports_mpx_check_pointer_bounds] } {
+ return -1
+}
+
set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp b/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp
index 72c9ec3..5e43f93 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx-sigsegv.exp
@@ -23,6 +23,10 @@ if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
standard_testfile
+if { ![supports_mpx_check_pointer_bounds] } {
+ return -1
+}
+
set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
diff --git a/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp b/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp
index 806d7d6..e707814 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx-simple_segv.exp
@@ -29,6 +29,10 @@ if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
standard_testfile
+if { ![supports_mpx_check_pointer_bounds] } {
+ return -1
+}
+
set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
diff --git a/gdb/testsuite/gdb.arch/i386-mpx.exp b/gdb/testsuite/gdb.arch/i386-mpx.exp
index 2cac70f..158550a 100644
--- a/gdb/testsuite/gdb.arch/i386-mpx.exp
+++ b/gdb/testsuite/gdb.arch/i386-mpx.exp
@@ -27,6 +27,10 @@ if { ![istarget i?86-*-*] && ![istarget x86_64-*-* ] } {
return
}
+if { ![supports_mpx_check_pointer_bounds] } {
+ return -1
+}
+
set comp_flags "-mmpx -fcheck-pointer-bounds -I${srcdir}/../nat/"
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index b72ce0c..3732614 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -7007,6 +7007,18 @@ gdb_caching_proc supports_statement_frontiers {
} executable "additional_flags=-gstatement-frontiers"]
}
+# Return 1 if compiler supports -mmpx -fcheck-pointer-bounds. Otherwise,
+# return 0.
+
+gdb_caching_proc supports_mpx_check_pointer_bounds {
+ set flags "additional_flags=-mmpx additional_flags=-fcheck-pointer-bounds"
+ return [gdb_can_simple_compile supports_mpx_check_pointer_bounds {
+ int main () {
+ return 0;
+ }
+ } executable $flags]
+}
+
# Return 1 if symbols were read in using -readnow. Otherwise, return 0.
proc readnow { } {