Author: Mikhail Maltsev Date: 2019-11-19T09:58:46Z New Revision: 4fb8ecdef4c9b19563e428a151c376a4103d65fc
URL: https://github.com/llvm/llvm-project/commit/4fb8ecdef4c9b19563e428a151c376a4103d65fc DIFF: https://github.com/llvm/llvm-project/commit/4fb8ecdef4c9b19563e428a151c376a4103d65fc.diff LOG: [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 Added: Modified: libunwind/test/signal_frame.pass.cpp Removed: ################################################################################ diff --git a/libunwind/test/signal_frame.pass.cpp b/libunwind/test/signal_frame.pass.cpp index b14e95a51528..a6f3f483bea5 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; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits