KdpReportLoadSymbolsStateChange

UINT8 __stdcall KdpReportLoadSymbolsStateChange(
        _STRING *PathName,
        _KD_SYMBOLS_INFO *SymbolInfo,
        UINT8 UnloadSymbols,
        _CONTEXT *ContextRecord){
  UINT64 v8; 
  _STRING *v9; 
  NTSTATUS v10; 
  UINT64 Flags; 
  __int128 v13; 
  _STRING OutMessageHeader; 
  _DBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange; 

  v13 = 0i64;
  OutMessageHeader = 0i64;
  memset(&WaitStateChange, 0i64, sizeof(WaitStateChange));
  do
  {
    KdpSetCommonState(0x3031ui64, ContextRecord, &WaitStateChange);
    KdpSetContextState(&WaitStateChange, ContextRecord);
    WaitStateChange.u.Exception.ExceptionRecord.ExceptionRecord = *(_QWORD *)SymbolInfo;
    WaitStateChange.u.Exception.ExceptionRecord.ExceptionAddress = (unsigned int)SymbolInfo[2];
    WaitStateChange.u.CommandString.Reserved2[2] = *((_QWORD *)SymbolInfo + 2);
    WaitStateChange.u.LoadSymbols.UnloadSymbols = UnloadSymbols;
    if( PathName )
    {
      LODWORD(Flags) = 4;
      KdpCopyMemoryChunks(
        (UINT64)PathName->Buffer,
        (char *)&KiSwapEvent + 4640,
        PathName->Length,
        0i64,
        Flags,
        (UINT64 *)&WaitStateChange.u);
      ++WaitStateChange.u.Exception.ExceptionRecord.ExceptionCode;
      v9 = (_STRING *)&v13;
      *((_QWORD *)&v13 + 1) = (char *)&KiSwapEvent + 4640;
      LOWORD(v13) = WaitStateChange.u.Exception.ExceptionRecord.ExceptionCode;
      *((_BYTE *)&KiSwapEvent + LOWORD(WaitStateChange.u.Exception.ExceptionRecord.ExceptionCode) + 4639) = 0;
    }
    else
    {
      WaitStateChange.u.Exception.ExceptionRecord.ExceptionCode = 0;
      v9 = 0i64;
    }
    OutMessageHeader.Length = 240;
    OutMessageHeader.Buffer = (char *)&WaitStateChange;
    v10 = KdpSendWaitContinue(v8, &OutMessageHeader, v9, ContextRecord);
  }
  while( v10 == 2 );
  return v10;
}

Referenced by:

KdpSymbol