summaryrefslogtreecommitdiffstats
path: root/libunwind/test
diff options
context:
space:
mode:
authorMikhail Maltsev <mikhail.maltsev@arm.com>2019-11-19 09:57:04 +0000
committerMikhail Maltsev <mikhail.maltsev@arm.com>2019-11-19 09:58:46 +0000
commit4fb8ecdef4c9b19563e428a151c376a4103d65fc (patch)
treea340930a2827d872a56ca28b018ecb5f71b36ad2 /libunwind/test
parent26d36a1903ac3a076dec85753a710ac134839067 (diff)
downloadbcm5719-llvm-4fb8ecdef4c9b19563e428a151c376a4103d65fc.tar.gz
bcm5719-llvm-4fb8ecdef4c9b19563e428a151c376a4103d65fc.zip
[libunwind] Adjust the signal_frame test for Arm
Summary: This patch adjusts the signal_frame.pass.cpp to pass on Arm targets: * When Arm EHABI is used the unwinder does not use DWARF, hence the DWARF-specific check unw_is_signal_frame() must be disabled. * Certain C libraries don't include EH tables, so the unwinder must not try to step out of main(). The patch moves the test code out of main() into a separate function to avoid this. Reviewers: saugustine, ostannard, phosek, jfb, mclow.lists Reviewed By: saugustine Subscribers: dexonsmith, aprantl, kristof.beyls, christof, libcxx-commits, pbarrio, labrinea Tags: #libc Differential Revision: https://reviews.llvm.org/D70397
Diffstat (limited to 'libunwind/test')
-rw-r--r--libunwind/test/signal_frame.pass.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/libunwind/test/signal_frame.pass.cpp b/libunwind/test/signal_frame.pass.cpp
index b14e95a5152..a6f3f483bea 100644
--- a/libunwind/test/signal_frame.pass.cpp
+++ b/libunwind/test/signal_frame.pass.cpp
@@ -13,13 +13,19 @@
#include <stdlib.h>
#include <libunwind.h>
-int main(void) {
+void test() {
asm(".cfi_signal_frame");
unw_cursor_t cursor;
unw_context_t uc;
unw_getcontext(&uc);
unw_init_local(&cursor, &uc);
assert(unw_step(&cursor) > 0);
+#if !defined(_LIBUNWIND_ARM_EHABI)
assert(unw_is_signal_frame(&cursor));
+#endif
+}
+
+int main() {
+ test();
return 0;
}
OpenPOWER on IntegriCloud