kernel_debugger_loop(): We need to use a dedicated jmp_buf for the call of

arch_debug_stack_trace() through debug_call_with_fault_handler(), since the
one in the CPU structure can only be used for debug_{strl,mem}cpy(), which do
not potentially have nested debug_call_with_fault_handler() calls.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35920 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2010-03-19 21:30:27 +00:00
parent 4f339c2ce1
commit a369198603

View File

@ -845,8 +845,13 @@ kernel_debugger_loop(const char* messagePrefix, const char* message,
if (!has_debugger_command("help") || message != NULL) { if (!has_debugger_command("help") || message != NULL) {
// No commands yet or we came here via a panic(). Always print a stack // No commands yet or we came here via a panic(). Always print a stack
// trace in these cases. // trace in these cases.
debug_call_with_fault_handler(gCPU[sDebuggerOnCPU].fault_jump_buffer, jmp_buf* jumpBuffer = (jmp_buf*)debug_malloc(sizeof(jmp_buf));
&stack_trace_trampoline, NULL); if (jumpBuffer != NULL) {
debug_call_with_fault_handler(*jumpBuffer, &stack_trace_trampoline,
NULL);
debug_free(jumpBuffer);
} else
arch_debug_stack_trace();
} }
if (has_debugger_command("help")) { if (has_debugger_command("help")) {