kernel_ppc: Use saved register state for stack trace of current thread

Suggested by Ingo in ticket #6139. This shortens the stack trace and makes it
independent of whether called implicitly on KDL entry or manually from the
kernel debugger prompt.

For a kernel panic, "panic" is now the top-most frame printed.

Closes ticket #6160.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37282 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Andreas Färber
2010-06-27 21:34:31 +00:00
parent d46ce4d62a
commit 7656ad6be1
+2 -1
View File
@@ -124,7 +124,8 @@ stack_trace(int argc, char **argv)
if (argc < 2) {
thread = thread_get_current_thread();
framePointer = (addr_t)get_current_stack_frame()->previous;
int32 cpu = smp_get_current_cpu();
framePointer = debug_get_debug_registers(cpu)->r1;
} else {
// TODO: Add support for stack traces of other threads.
/* thread_id id = strtoul(argv[1], NULL, 0);