KdpCommandString

VOID __fastcall KdpCommandString(
        _STRING *Name,
        _STRING *Command,
        CHAR PreviousMode,
        _CONTEXT *ContextRecord,
        _KTRAP_FRAME *TrapFrame,
        _KEXCEPTION_FRAME *ExceptionFrame){
  UINT8 v9; 
  struct _KPRCB *CurrentPrcb; 
  UINT8 v11; 
  if( !PreviousMode && !(_BYTE)KdDebuggerNotPresent )
  {
    v9 = KdEnterDebugger(TrapFrame, (KTRAP_FRAME *)ExceptionFrame);
    CurrentPrcb = KeGetCurrentPrcb();
    v11 = v9;
    KiSaveProcessorControlState((_KPROCESSOR_STATE *)((char *)CurrentPrcb + 256));
    KdpCopyContext(*((_CONTEXT **)CurrentPrcb + 4280), ContextRecord->ContextFlags, ContextRecord);
    KdpReportCommandStringStateChange(Name, Command, *((CONTEXT **)CurrentPrcb + 4280));
    KdpCopyContext(
      ContextRecord,
      *(unsigned int *)(*((_QWORD *)CurrentPrcb + 4280) + 48i64),
      *((_CONTEXT **)CurrentPrcb + 4280));
    KiRestoreProcessorControlState((INT64)CurrentPrcb + 256);
    KdExitDebugger(v11);
  }
}

Referenced by:

KdpTrap