From 0ea2dc7cd668be5475babecaf6fdeaa464e2847b Mon Sep 17 00:00:00 2001 From: Guo Ren Date: Sun, 9 Dec 2018 14:18:05 +0800 Subject: csky: stacktrace supported. The gcc option "-mbacktrace" will push fp(r8),lr into stack and we could unwind the stack with: fp = *fp lr = (unsigned int *)fp[1] Signed-off-by: Guo Ren --- arch/csky/include/asm/thread_info.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/csky/include/asm') diff --git a/arch/csky/include/asm/thread_info.h b/arch/csky/include/asm/thread_info.h index a2c69a7836f7..0e9d035d712b 100644 --- a/arch/csky/include/asm/thread_info.h +++ b/arch/csky/include/asm/thread_info.h @@ -10,6 +10,7 @@ #include #include #include +#include struct thread_info { struct task_struct *task; @@ -36,6 +37,9 @@ struct thread_info { #define THREAD_SIZE_ORDER (THREAD_SHIFT - PAGE_SHIFT) +#define thread_saved_fp(tsk) \ + ((unsigned long)(((struct switch_stack *)(tsk->thread.ksp))->r8)) + static inline struct thread_info *current_thread_info(void) { unsigned long sp; -- cgit v1.2.3