Author: andreasf Date: 2010-06-27 23:34:31 +0200 (Sun, 27 Jun 2010) New Revision: 37282 Changeset: http://dev.haiku-os.org/changeset/37282/haiku Ticket: http://dev.haiku-os.org/ticket/6139 Ticket: http://dev.haiku-os.org/ticket/6160 Modified: haiku/trunk/src/system/kernel/arch/ppc/arch_debug.cpp Log: 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. Modified: haiku/trunk/src/system/kernel/arch/ppc/arch_debug.cpp =================================================================== --- haiku/trunk/src/system/kernel/arch/ppc/arch_debug.cpp 2010-06-27 20:16:59 UTC (rev 37281) +++ haiku/trunk/src/system/kernel/arch/ppc/arch_debug.cpp 2010-06-27 21:34:31 UTC (rev 37282) @@ -124,7 +124,8 @@ 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);