https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6f7835d30c48ed944fb37…
commit 6f7835d30c48ed944fb37ac765055aa74e950205
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Tue Mar 10 00:00:00 2020 +0100
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Mon Nov 16 08:55:03 2020 +0100
[NTOS:KD] Merge KdpReportLoadSymbolsStateChange() with kd64 version
---
ntoskrnl/kd/kdio.c | 27 +++++++++++++++++++++++++++
ntoskrnl/kd/kdmain.c | 22 ----------------------
ntoskrnl/kd64/kdapi.c | 2 +-
3 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/ntoskrnl/kd/kdio.c b/ntoskrnl/kd/kdio.c
index d76e3f55860..8fb73f23ccd 100644
--- a/ntoskrnl/kd/kdio.c
+++ b/ntoskrnl/kd/kdio.c
@@ -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;
diff --git a/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c
index fb838d60124..d01244f7200 100644
--- a/ntoskrnl/kd/kdmain.c
+++ b/ntoskrnl/kd/kdmain.c
@@ -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,
diff --git a/ntoskrnl/kd64/kdapi.c b/ntoskrnl/kd64/kdapi.c
index f844e972b48..f47514f590e 100644
--- a/ntoskrnl/kd64/kdapi.c
+++ b/ntoskrnl/kd64/kdapi.c
@@ -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,