Move SwitchProcessor to architecture-specific implementations
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in 33s
Builds / ExectOS (i686, debug) (push) Successful in 31s
Builds / ExectOS (amd64, release) (push) Successful in 47s
Builds / ExectOS (i686, release) (push) Successful in 45s

This commit is contained in:
2026-06-07 22:53:00 +02:00
parent d36b678ba1
commit cc23e459e0
4 changed files with 74 additions and 27 deletions

View File

@@ -41,7 +41,7 @@ KD::Debugger::EnterDebugger(IN PKTRAP_FRAME TrapFrame)
Active = TRUE;
/* Print debug message and enter an infinite loop */
DebugPrint(L"\n\n*** KDebugger Entered at RIP 0x%.16llX ***\n", TrapFrame->Rip);
DebugPrint(L"\n\n*** Entered KDebugger ***\n");
for(;;);
/* Mark the debugger as inactive */
@@ -72,29 +72,3 @@ KD::Debugger::ProcessCpuStateChange(IN PEXCEPTION_RECORD ExceptionRecord,
{
return FALSE;
}
/**
* Transfers active control to a previously frozen processor.
*
* @return This routine returns a value indicating how execution should proceed after the debugging session concludes.
*
* @since XT 1.0
*/
XTAPI
KCONTINUE_STATUS
KD::Debugger::SwitchProcessor(VOID)
{
EXCEPTION_RECORD ExceptionRecord;
PKPROCESSOR_CONTROL_BLOCK Prcb;
/* Get processor control block */
Prcb = KE::Processor::GetCurrentProcessorControlBlock();
/* Construct an exception record */
ExceptionRecord.ExceptionAddress = (PVOID)&Prcb->ProcessorState.ContextFrame.Rip;
ExceptionRecord.ExceptionCode = STATUS_WAKE_SYSTEM_DEBUGGER;
ExceptionRecord.ExceptionRecord = &ExceptionRecord;
/* Pass the synthetic exception and the processor context to the debugger */
return (KCONTINUE_STATUS)ProcessCpuStateChange(&ExceptionRecord, &Prcb->ProcessorState.ContextFrame, FALSE);
}