[NTOS:KD] Merge KdpReportLoadSymbolsStateChange() with kd64 version

This commit is contained in:
Hervé Poussineau 2020-03-10 00:00:00 +01:00
parent e31be4ec25
commit 6f7835d30c
3 changed files with 28 additions and 23 deletions

View file

@ -550,6 +550,25 @@ KdSendPacket(
return;
}
else if (PacketType == PACKET_TYPE_KD_STATE_CHANGE64)
{
PDBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange = (PDBGKD_ANY_WAIT_STATE_CHANGE)MessageHeader->Buffer;
if (WaitStateChange->NewState == DbgKdLoadSymbolsStateChange)
{
#ifdef KDBG
PLDR_DATA_TABLE_ENTRY LdrEntry;
if (!WaitStateChange->u.LoadSymbols.UnloadSymbols)
{
/* Load symbols. Currently implemented only for KDBG! */
if (KdbpSymFindModule((PVOID)(ULONG_PTR)WaitStateChange->u.LoadSymbols.BaseOfDll, NULL, -1, &LdrEntry))
{
KdbSymProcessSymbols(LdrEntry);
}
}
#endif
return;
}
}
UNIMPLEMENTED;
}
@ -572,6 +591,14 @@ KdReceivePacket(
STRING ResponseString;
#endif
if (PacketType == PACKET_TYPE_KD_STATE_MANIPULATE)
{
PDBGKD_MANIPULATE_STATE64 ManipulateState = (PDBGKD_MANIPULATE_STATE64)MessageHeader->Buffer;
ManipulateState->ApiNumber = DbgKdContinueApi;
ManipulateState->u.Continue.ContinueStatus = STATUS_SUCCESS;
return KdPacketReceived;
}
if (PacketType != PACKET_TYPE_KD_DEBUG_IO)
return KdPacketTimedOut;

View file

@ -28,28 +28,6 @@ KdpReportCommandStringStateChange(IN PSTRING NameString,
{
}
VOID
NTAPI
KdpReportLoadSymbolsStateChange(IN PSTRING PathName,
IN PKD_SYMBOLS_INFO SymbolInfo,
IN BOOLEAN Unload,
IN OUT PCONTEXT Context)
{
#ifdef KDBG
PKD_SYMBOLS_INFO SymbolsInfo = SymbolInfo;
PLDR_DATA_TABLE_ENTRY LdrEntry;
if (SymbolsInfo != NULL && !Unload)
{
/* Load symbols. Currently implemented only for KDBG! */
if (KdbpSymFindModule(SymbolsInfo->BaseOfDll, NULL, -1, &LdrEntry))
{
KdbSymProcessSymbols(LdrEntry);
}
}
#endif
}
BOOLEAN
NTAPI
KdpReportExceptionStateChange(IN PEXCEPTION_RECORD ExceptionRecord,

View file

@ -1576,7 +1576,6 @@ SendPacket:
}
}
#ifdef _WINKD_
VOID
NTAPI
KdpReportLoadSymbolsStateChange(IN PSTRING PathName,
@ -1649,6 +1648,7 @@ KdpReportLoadSymbolsStateChange(IN PSTRING PathName,
} while (Status == ContinueProcessorReselected);
}
#ifdef _WINKD_
VOID
NTAPI
KdpReportCommandStringStateChange(IN PSTRING NameString,