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
This commit is contained in:
Ingo Weinhold 2010-06-05 18:34:37 +00:00
parent 193a433af0
commit 538a374b8a

View File

@ -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;