Closed n9wx closed 8 months ago
Have you ever tried if it works as expected? I think you should return the current value of the sp
register(or something like that) rather than the address of the boot_stack_top
symbol which does not change as the kernel runs. It seems that the boot_stack_top
is not a good start point of the stack backtrace.
I have tried my solution and it just works。Maybe you are misunderstanding,current_kstack_top not return the start ptr of stack backtrace,it returns the end address of stack region,it just used as a optional stop flag
Sorry, it has been a long period of time and I just forgot what is going on here. Thanks!
fix a bug in backtrace,now it won't execute infinitely recursively in the panic handle function if kernel panic before call task::run_tasks()