Commit c8ca71d4 authored by Jun He's avatar Jun He
Browse files

Fixed stack trace generation on aarch64



Change-Id: I9801239c98cb7362ed07e8b9ec2ba7e45749dba7
Signed-off-by: default avatarJun He <jun.he@arm.com>
parent 26e638a8
...@@ -39,7 +39,7 @@ endif ...@@ -39,7 +39,7 @@ endif
endif endif
# To get ARM stack traces if Redis crashes we need a special C flag. # 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 CFLAGS+=-funwind-tables
endif endif
......
...@@ -673,6 +673,8 @@ static void *getMcontextEip(ucontext_t *uc) { ...@@ -673,6 +673,8 @@ static void *getMcontextEip(ucontext_t *uc) {
return (void*) uc->uc_mcontext.sc_ip; return (void*) uc->uc_mcontext.sc_ip;
#elif defined(__arm__) /* Linux ARM */ #elif defined(__arm__) /* Linux ARM */
return (void*) uc->uc_mcontext.arm_pc; return (void*) uc->uc_mcontext.arm_pc;
#elif defined(__aarch64__) /* Linux AArch64 */
return (void*) uc->uc_mcontext.pc;
#endif #endif
#else #else
return NULL; return NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment