[libcxx-commits] [PATCH] D70397: [libunwind] Adjust the signal_frame test for Arm
Mikhail Maltsev via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 18 07:24:55 PST 2019
miyuki created this revision.
miyuki added reviewers: saugustine, ostannard, phosek.
Herald added subscribers: christof, kristof.beyls, aprantl.
Herald added a reviewer: jfb.
Herald added a project: libc++.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70397
Files:
libunwind/test/signal_frame.pass.cpp
Index: libunwind/test/signal_frame.pass.cpp
===================================================================
--- libunwind/test/signal_frame.pass.cpp
+++ 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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70397.229842.patch
Type: text/x-patch
Size: 590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20191118/bad3badb/attachment.bin>
More information about the libcxx-commits
mailing list