From 538a374b8adce060dbb50e371335ca08c8800762 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 5 Jun 2010 18:34:37 +0000 Subject: [PATCH] Patch by Andreas Faerber: Added support for cpu_ent::fault_handler[_stack_pointer]. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37020 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/ppc/arch_int.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/system/kernel/arch/ppc/arch_int.cpp b/src/system/kernel/arch/ppc/arch_int.cpp index 7b2932e3f1..fc445b1cd7 100644 --- a/src/system/kernel/arch/ppc/arch_int.cpp +++ b/src/system/kernel/arch/ppc/arch_int.cpp @@ -124,7 +124,14 @@ ppc_exception_entry(int vector, struct iframe *iframe) bool kernelDebugger = debug_debugger_running(); if (kernelDebugger) { - // if this thread has a fault handler, we're allowed to be here + // if this CPU or this thread has a fault handler, + // we're allowed to be here + cpu_ent* cpu = &gCPU[smp_get_current_cpu()]; + if (cpu->fault_handler != 0) { + iframe->srr0 = cpu->fault_handler; + iframe->r1 = cpu->fault_handler_stack_pointer; + break; + } struct thread *thread = thread_get_current_thread(); if (thread && thread->fault_handler != 0) { iframe->srr0 = thread->fault_handler;