Skip to content

Commit 1667378

Browse files
committed
[Backtracing] Make sure we print the program counter on ARM64 linux.
On Linux, the right macro for detecting ARM64 is `__aarch64__`, not `__arm64__`. rdar://118379429
1 parent a14075a commit 1667378

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/runtime/CrashHandlerLinux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ handle_fatal_signal(int signum,
240240
pc = (void *)(ctx->uc_mcontext.gregs[REG_RIP]);
241241
#elif defined(__i386__)
242242
pc = (void *)(ctx->uc_mcontext.gregs[REG_EIP]);
243-
#elif defined(__arm64__)
243+
#elif defined(__arm64__) || defined(__aarch64__)
244244
pc = (void *)(ctx->uc_mcontext.pc);
245245
#elif defined(__arm__)
246246
pc = (void *)(ctx->uc_mcontext.gprs[15]);

0 commit comments

Comments
 (0)