Bug found and verified to exist on : Redis version: 4.0.6 platform: QDF2400 OS: Linux ( Redhat/Ubuntu)

During compilation on aarh64 platform, there are warnings as mentioned below: debug.c: In function ‘getMcontextEip’: debug.c:691:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ debug.c:660:41: warning: unused parameter ‘uc’ [-Wunused-parameter] static void getMcontextEip(ucontext_t uc) { ^ debug.c: In function ‘logRegisters’: debug.c:706:31: warning: unused parameter ‘uc’ [-Wunused-parameter] void logRegisters(ucontext_t *uc) { ^

Reason: This happens for missing code for supporting aarch64 platform.

Attached the patch herewith : debug.c.patch.zip ( unzip the file and apply patch file) debug.c.patch.zip

Snapshots of fix tested on QDF2400 and x86 system : redis_log_registers_fix.jpg redis_log_registers_fix

Thanks, Ashutosh Parida Qualcomm Datacenter Technologies

Comment From: oranagra

i see this is already solved by d7c25806c0 / 6548157293, but there are some differences, this patch adds registers 0-30, and the code in redis starts from 18, i'm not familiar with these details and too lazy to check. @devnexen @aparida1 can you clear that up? meanwhile, i'm closing this one (p.s. we prefer PRs over patch files)

Comment From: devnexen

depends what is wanted to be reflected e.g. x0->x7 are functions arguments, from x19 to x28 callee registers then frame pointer and so on ... not sure between x8 and x18 is necessarily useful depends but we can always display all just in case.