Skip to content

Commit

Permalink
Merge pull request redis#4099 from JunHe77/aarch64_stack_cflag
Browse files Browse the repository at this point in the history
Fixed stack trace generation on aarch64
  • Loading branch information
antirez committed May 24, 2018
2 parents d9aab3f + 331aa6f commit 8a62419
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Makefile
Expand Up @@ -39,7 +39,7 @@ endif
endif

# To get ARM stack traces if Redis crashes we need a special C flag.
ifneq (,$(findstring armv,$(uname_M)))
ifneq (,$(filter aarch64 armv,$(uname_M)))
CFLAGS+=-funwind-tables
endif

Expand Down
2 changes: 2 additions & 0 deletions src/debug.c
Expand Up @@ -688,6 +688,8 @@ static void *getMcontextEip(ucontext_t *uc) {
return (void*) uc->uc_mcontext.sc_ip;
#elif defined(__arm__) /* Linux ARM */
return (void*) uc->uc_mcontext.arm_pc;
#elif defined(__aarch64__) /* Linux AArch64 */
return (void*) uc->uc_mcontext.pc;
#endif
#else
return NULL;
Expand Down

0 comments on commit 8a62419

Please sign in to comment.