~ [[threadspec]] k [[value]]
[[processor-num]] k [[value]]
Displays the current stack frame. Each line shows the name of a procedure, its arguments, and the address of the statement that called it. If value is given, the command displays that many stack frames.
Using the k command at the beginning of a function (before the function prolog has been executed) will give incorrect results. The debugger uses the frame register to compute the current backtrace, and this register is not correctly set for a function until its prolog has been executed.
If a thread specifier is given, a backtrace for the given thread is printed.
With the kernel debugger, the process number can be specified to indicate the stack frame for a given process. Default is 1.