aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWeimin Pan <weimin.pan@oracle.com>2023-02-10 16:00:50 -0800
committerIndu Bhagat <indu.bhagat@oracle.com>2024-04-25 15:03:50 -0700
commited7b28948ee805dac7ba00eeab7e149a1f923970 (patch)
tree9319cf71b17748f37899481d79d902db1ddf0cd4
parent6ec0a1f8f48fb8eceb6281d579ddd4bb083b2411 (diff)
downloadgdb-ed7b28948ee805dac7ba00eeab7e149a1f923970.zip
gdb-ed7b28948ee805dac7ba00eeab7e149a1f923970.tar.gz
gdb-ed7b28948ee805dac7ba00eeab7e149a1f923970.tar.bz2
testsuite: sframebt: Use -fno-optimize-sibling-calls
With -O2 and above, the compiler performs a sibling call optimization as main () and it's callee have compatible stack usage. As for generating stack traces though, there is nothing that any stack trace or unwind format can do here. Use -fno-optimize-sibling-calls to at least ensure the testcase checkes for the complete stack trace. ChangeLog: * libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-1.lk: Use -fno-optimize-sibling-calls. * libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-2.lk: Likewise.
-rw-r--r--libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-1.lk2
-rw-r--r--libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-2.lk2
2 files changed, 2 insertions, 2 deletions
diff --git a/libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-1.lk b/libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-1.lk
index a26ef7e..f1f0621 100644
--- a/libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-1.lk
+++ b/libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-1.lk
@@ -1,4 +1,4 @@
# source: backtrace-fp-attr-1.c
-# cflags: -fno-omit-frame-pointer
+# cflags: -fno-omit-frame-pointer -fno-optimize-sibling-calls
# link: on
PASS: backtrace with omit-frame-pointer attr
diff --git a/libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-2.lk b/libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-2.lk
index 97f49ef..5de5105 100644
--- a/libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-2.lk
+++ b/libsframe/testsuite/libsframe.unwind/backtrace-fp-attr-2.lk
@@ -1,4 +1,4 @@
# source: backtrace-fp-attr-2.c
-# cflags: -fomit-frame-pointer
+# cflags: -fomit-frame-pointer -fno-optimize-sibling-calls
# link: on
PASS: backtrace with no-omit-frame-pointer attr