aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/gdb.reverse/step-indirect-call-thunk.exp15
1 files changed, 12 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.reverse/step-indirect-call-thunk.exp b/gdb/testsuite/gdb.reverse/step-indirect-call-thunk.exp
index 3f1f538..1234a04 100644
--- a/gdb/testsuite/gdb.reverse/step-indirect-call-thunk.exp
+++ b/gdb/testsuite/gdb.reverse/step-indirect-call-thunk.exp
@@ -20,9 +20,18 @@ if { ![supports_reverse] } {
standard_testfile
-set cflags "-mindirect-branch=thunk -mfunction-return=thunk"
-if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
- [list debug "additional_flags=$cflags"]] } {
+set cflags {}
+lappend cflags debug
+lappend cflags additional_flags=-mindirect-branch=thunk
+lappend cflags additional_flags=-mfunction-return=thunk
+
+set fcf_protection_none additional_flags=-fcf-protection=none
+if { [gdb_can_simple_compile fcf-protection-none {int main () { return 0; }} \
+ executable $fcf_protection_none] } {
+ lappend cflags $fcf_protection_none
+}
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile $cflags] } {
return -1
}