Author: tkreuzer
Date: Fri Jan 23 19:05:38 2009
New Revision: 39056
URL:
http://svn.reactos.org/svn/reactos?rev=39056&view=rev
Log:
KD64: Use CURRENT_KD_SECONDARY_VERSION instead of default in KdVersionBlock. Use
UseExceptionRecordTo64. add some dirty hacks, until either WinDbg gets proper addresses
sent or we have SEH implemented.
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kdapi.c
branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kddata.c
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kdapi.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kdapi.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kdapi.c [iso-8859-1] Fri Jan 23
19:05:38 2009
@@ -227,6 +227,8 @@
/* Get the version block */
KdpSysGetVersion(&State->u.GetVersion64);
+//State->u.GetVersion64.PsLoadedModuleList =
&KeLoaderBlock->LoadOrderListHead;
+
/* Fill out the state */
State->ApiNumber = DbgKdGetVersionApi;
State->ReturnStatus = STATUS_SUCCESS;
@@ -247,6 +249,7 @@
STRING Header;
ULONG Length = State->u.ReadMemory.TransferCount;
NTSTATUS Status = STATUS_SUCCESS;
+ ULONG64 TargetBaseAddress = State->u.ReadMemory.TargetBaseAddress;
/* Validate length */
if (Length > (PACKET_MAX_SIZE - sizeof(DBGKD_MANIPULATE_STATE64)))
@@ -263,7 +266,15 @@
}
#endif
- if (!State->u.ReadMemory.TargetBaseAddress)
+ // HACK for x64, until KD stops sending bogus addresses to WinDbg
+ if (TargetBaseAddress < (ULONG_PTR)MM_LOWEST_SYSTEM_ADDRESS)
+ {
+ FrLdrDbgPrint("Trying to read memory at 0x%p\n", TargetBaseAddress);
+// DPRINT1("Trying to read memory at 0x%p\n", TargetBaseAddress);
+ TargetBaseAddress = 0;
+ }
+
+ if (!TargetBaseAddress)
{
Length = 0;
Status = STATUS_UNSUCCESSFUL;
@@ -989,8 +1000,8 @@
KdpSetCommonState(DbgKdExceptionStateChange, Context, &WaitStateChange);
/* Convert the exception record to 64-bits and set First Chance flag */
- ExceptionRecord32To64((PEXCEPTION_RECORD32)ExceptionRecord,
- &WaitStateChange.u.Exception.ExceptionRecord);
+ ExceptionRecordTo64(ExceptionRecord,
+ &WaitStateChange.u.Exception.ExceptionRecord);
WaitStateChange.u.Exception.FirstChance = !SecondChanceException;
/* Now finish creating the structure */
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kddata.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kddata.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kddata.c [iso-8859-1] Fri Jan 23
19:05:38 2009
@@ -324,7 +324,7 @@
0,
0,
DBGKD_64BIT_PROTOCOL_VERSION2,
- KD_SECONDARY_VERSION_DEFAULT,
+ CURRENT_KD_SECONDARY_VERSION,
DBGKD_VERS_FLAG_DATA,
#if defined(_M_IX86)
IMAGE_FILE_MACHINE_I386,