Skip to content
Commit 2bb78f3e authored by Yong Cong Sin's avatar Yong Cong Sin Committed by Anas Nashif
Browse files

arch: riscv: stacktrace: use current thread if `thread` is NULL



Zephyr's thread stack size is not fixed, in most cases we would
need the `thread` argument to obtain the `stack_info`, unless
we are unwinding the irq stack, since that is fixed.

Otherwise we can only safely print the current `mepc` register,
unwinding the esf without the stack info of a thread can
result in undefined behavior.

Signed-off-by: default avatarYong Cong Sin <ycsin@meta.com>
parent b79a68fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment