Author: tkreuzer
Date: Wed Jan 28 17:34:04 2009
New Revision: 39191
URL:
http://svn.reactos.org/svn/reactos?rev=39191&view=rev
Log:
KD64: implement case 0 for KdpReadControlSpace, which returns a pointer to the Pcr.
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kdapi.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] Wed Jan 28
17:34:04 2009
@@ -319,16 +319,26 @@
#if defined (_M_AMD64)
if ((ULONG)ReadMemory->TargetBaseAddress <= 2)
{
+ PKPRCB Prcb = KiProcessorBlock[State->Processor];
+ PKIPCR Pcr = CONTAINING_RECORD(Prcb, KIPCR, Prcb);
+
switch ((ULONG_PTR)ReadMemory->TargetBaseAddress)
{
+ case 0:
+ /* Copy a pointer to the Pcr */
+ ControlStart = &Pcr;
+ RealLength = sizeof(PVOID);
+ break;
+
case 1:
- ControlStart = &KiProcessorBlock[State->Processor];
+ /* Copy a pointer to the Prcb */
+ ControlStart = &Prcb;
RealLength = sizeof(PVOID);
break;
case 2:
- ControlStart = &KiProcessorBlock[State->Processor]->
- ProcessorState.SpecialRegisters;
+ /* Copy SpecialRegisters */
+ ControlStart = &Prcb->ProcessorState.SpecialRegisters;
RealLength = sizeof(KSPECIAL_REGISTERS);
break;