diff options
| author | Shell <[email protected]> | 2024-06-13 08:55:53 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-13 08:55:53 +0800 |
| commit | e5b7f3fdd842e95979111b9d3a9d487a217619b5 (patch) | |
| tree | c8d97627dc914cf413d245b86c1f1ae016beb333 /libcpu | |
| parent | 1869c543a60b7d05df4dd69d9eb08f6df6ae3d2e (diff) | |
[kservice] Enhance support for backtrace service (#9037)
[feat] Enhance support for backtrace service
rt_backtrace_formatted_print() and rt_backtrace_to_buffer() to help
debug routines.
Also, following modification are included:
- make rt_backtrace_frame patchable with weak attr
- replace lwp backtrace with sync output
Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/aarch64/common/trap.c | 2 | ||||
| -rw-r--r-- | libcpu/risc-v/virt64/trap.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libcpu/aarch64/common/trap.c b/libcpu/aarch64/common/trap.c index 3be1578eb4..ca6ad1761f 100644 --- a/libcpu/aarch64/common/trap.c +++ b/libcpu/aarch64/common/trap.c @@ -370,7 +370,7 @@ void rt_hw_trap_exception(struct rt_hw_exp_stack *regs) #endif struct rt_hw_backtrace_frame frame = {.fp = regs->x29, .pc = regs->pc}; - rt_backtrace_frame(&frame); + rt_backtrace_frame(rt_thread_self(), &frame); rt_hw_cpu_shutdown(); } diff --git a/libcpu/risc-v/virt64/trap.c b/libcpu/risc-v/virt64/trap.c index f34f46c9e9..4366a5b2c0 100644 --- a/libcpu/risc-v/virt64/trap.c +++ b/libcpu/risc-v/virt64/trap.c @@ -366,7 +366,7 @@ void handle_trap(rt_size_t scause, rt_size_t stval, rt_size_t sepc, struct rt_hw .pc = sepc }; rt_kprintf("fp = %p", frame.fp); - rt_backtrace_frame(&frame); + rt_backtrace_frame(rt_thread_self(), &frame); RT_ASSERT(0); } |
