xyzzy-github.x86_64 wrote: > +static void > +x86_64_general_protection_fault(iframe* frame) > +{ > + if (debug_debugger_running()) { > + // Handle GPFs if there is a debugger fault handler installed, for > + // non-canonical address accesses. > + cpu_ent* cpu = &gCPU[smp_get_current_cpu()]; > + if (cpu->fault_handler != 0) { > + debug_set_page_fault_info(0, frame->ip, DEBUG_PAGE_FAULT_NO_INFO); > + frame->ip = cpu->fault_handler; > + frame->bp = cpu->fault_handler_stack_pointer; > + return; > + } > + } > + > + x86_unexpected_exception(frame); > +} This does, of course, also catch all cases where the #GP is generated for a different reason than dereferencing a non-canonical address. I'm undecided, maybe this is a good thing and should also be done for x86. CU, Ingo