Files
termux-packages/packages/swift/swift-stdlib-public-runtime-CrashHandlerLinux.cpp.patch
2023-12-12 04:01:36 +00:00

17 lines
613 B
Diff

diff --git a/swift/stdlib/public/runtime/CrashHandlerLinux.cpp b/swift/stdlib/public/runtime/CrashHandlerLinux.cpp
index ff44dbe7541..2f386278975 100644
--- a/swift/stdlib/public/runtime/CrashHandlerLinux.cpp
+++ b/swift/stdlib/public/runtime/CrashHandlerLinux.cpp
@@ -243,7 +243,11 @@ handle_fatal_signal(int signum,
#elif defined(__arm64__) || defined(__aarch64__)
pc = (void *)(ctx->uc_mcontext.pc);
#elif defined(__arm__)
+#if defined(__ANDROID__)
+ pc = (void *)(ctx->uc_mcontext.arm_pc);
+#else
pc = (void *)(ctx->uc_mcontext.gprs[15]);
+#endif
#endif
_swift_displayCrashMessage(signum, pc);