mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 20:36:35 +00:00
[NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadVirtual/SysDbgWriteVirtual
This commit is contained in:
parent
9f97f0b284
commit
2efaa5ea1e
1 changed files with 29 additions and 0 deletions
|
@ -2304,6 +2304,35 @@ KdSystemDebugControl(
|
||||||
|
|
||||||
case SysDbgReadVirtual:
|
case SysDbgReadVirtual:
|
||||||
case SysDbgWriteVirtual:
|
case SysDbgWriteVirtual:
|
||||||
|
if (InputBufferLength != sizeof(SYSDBG_VIRTUAL))
|
||||||
|
{
|
||||||
|
Status = STATUS_INFO_LENGTH_MISMATCH;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SYSDBG_VIRTUAL Request = *(PSYSDBG_VIRTUAL)InputBuffer;
|
||||||
|
PVOID LockedBuffer;
|
||||||
|
PMDL LockVariable;
|
||||||
|
|
||||||
|
Status = ExLockUserBuffer(Request.Buffer,
|
||||||
|
Request.Request,
|
||||||
|
PreviousMode,
|
||||||
|
Command == SysDbgReadVirtual ? IoWriteAccess : IoReadAccess,
|
||||||
|
&LockedBuffer,
|
||||||
|
&LockVariable);
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
Status = KdpCopyMemoryChunks((ULONG64)(ULONG_PTR)Request.Address,
|
||||||
|
Request.Buffer,
|
||||||
|
Request.Request,
|
||||||
|
0,
|
||||||
|
Command == SysDbgReadVirtual ? 0 : MMDBG_COPY_WRITE,
|
||||||
|
&Length);
|
||||||
|
ExUnlockUserBuffer(LockVariable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case SysDbgReadPhysical:
|
case SysDbgReadPhysical:
|
||||||
case SysDbgWritePhysical:
|
case SysDbgWritePhysical:
|
||||||
case SysDbgReadControlSpace:
|
case SysDbgReadControlSpace:
|
||||||
|
|
Loading…
Reference in a new issue