summaryrefslogtreecommitdiff
path: root/libcpu/arm/cortex-a
diff options
context:
space:
mode:
authorShell <[email protected]>2023-10-21 20:14:45 +0800
committerGitHub <[email protected]>2023-10-21 20:14:45 +0800
commit70a8d1d4656bc678ddada5e56263c9cb4423a623 (patch)
treeb81b97a4f4cf33df2b1a02742e80de218da51333 /libcpu/arm/cortex-a
parent90c7089d47755a3edaf9008282225c5019fa188c (diff)
[kservice] improve backtrace service in kernel (#8144)
Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'libcpu/arm/cortex-a')
-rw-r--r--libcpu/arm/cortex-a/backtrace.c3
-rw-r--r--libcpu/arm/cortex-a/backtrace.h1
2 files changed, 2 insertions, 2 deletions
diff --git a/libcpu/arm/cortex-a/backtrace.c b/libcpu/arm/cortex-a/backtrace.c
index 9837c734cc..f9f4457f42 100644
--- a/libcpu/arm/cortex-a/backtrace.c
+++ b/libcpu/arm/cortex-a/backtrace.c
@@ -530,7 +530,7 @@ void rt_unwind(struct rt_hw_exp_stack *regs, unsigned int pc_adj)
unwind_backtrace(&e_regs, __exidx_start, __exidx_end);
}
-void rt_backtrace(void)
+rt_err_t rt_backtrace(void)
{
struct rt_hw_exp_stack regs;
@@ -539,4 +539,5 @@ void rt_backtrace(void)
asm volatile ("mov %0, lr":"=r"(regs.lr));
asm volatile ("mov %0, pc":"=r"(regs.pc));
rt_unwind(&regs, 8);
+ return RT_EOK;
}
diff --git a/libcpu/arm/cortex-a/backtrace.h b/libcpu/arm/cortex-a/backtrace.h
index c82ef66fc0..7847018ce2 100644
--- a/libcpu/arm/cortex-a/backtrace.h
+++ b/libcpu/arm/cortex-a/backtrace.h
@@ -76,7 +76,6 @@ int unwind_frame(struct stackframe *frame, const struct unwind_idx **origin_idx,
void unwind_backtrace(struct pt_regs *regs, const struct unwind_idx exidx_start[], const struct unwind_idx exidx_end[]);
void rt_unwind(struct rt_hw_exp_stack *regs, unsigned int pc_adj);
-void rt_backtrace(void);
#endif /* !__ASSEMBLY__ */