ntdll: Add SystemKernelDebuggerInformationEx info class to NtQuerySystemInformation().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3515da1b82
commit
b335b69368
|
@ -979,6 +979,7 @@ static void test_query_kerndebug(void)
|
|||
{
|
||||
NTSTATUS status;
|
||||
ULONG ReturnLength;
|
||||
SYSTEM_KERNEL_DEBUGGER_INFORMATION_EX skdi_ex;
|
||||
SYSTEM_KERNEL_DEBUGGER_INFORMATION skdi;
|
||||
|
||||
status = pNtQuerySystemInformation(SystemKernelDebuggerInformation, &skdi, 0, &ReturnLength);
|
||||
|
@ -991,6 +992,29 @@ static void test_query_kerndebug(void)
|
|||
status = pNtQuerySystemInformation(SystemKernelDebuggerInformation, &skdi, sizeof(skdi) + 2, &ReturnLength);
|
||||
ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);
|
||||
ok( sizeof(skdi) == ReturnLength, "Inconsistent length %d\n", ReturnLength);
|
||||
|
||||
status = pNtQuerySystemInformation(SystemKernelDebuggerInformationEx, &skdi_ex, 0, &ReturnLength);
|
||||
ok( status == STATUS_INFO_LENGTH_MISMATCH
|
||||
|| status == STATUS_NOT_IMPLEMENTED /* before win7 */
|
||||
|| status == STATUS_INVALID_INFO_CLASS /* wow64 on Win10 */,
|
||||
"Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status);
|
||||
|
||||
if (status != STATUS_INFO_LENGTH_MISMATCH)
|
||||
{
|
||||
win_skip( "NtQuerySystemInformation(SystemKernelDebuggerInformationEx) is not implemented.\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
status = pNtQuerySystemInformation(SystemKernelDebuggerInformationEx, &skdi_ex,
|
||||
sizeof(skdi_ex), &ReturnLength);
|
||||
ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);
|
||||
ok( sizeof(skdi_ex) == ReturnLength, "Inconsistent length %d\n", ReturnLength);
|
||||
|
||||
status = pNtQuerySystemInformation(SystemKernelDebuggerInformationEx, &skdi_ex,
|
||||
sizeof(skdi_ex) + 2, &ReturnLength);
|
||||
ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);
|
||||
ok( sizeof(skdi_ex) == ReturnLength, "Inconsistent length %d\n", ReturnLength);
|
||||
}
|
||||
}
|
||||
|
||||
static void test_query_regquota(void)
|
||||
|
|
|
@ -2860,6 +2860,24 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
|
|||
break;
|
||||
}
|
||||
|
||||
case SystemKernelDebuggerInformationEx: /* 149 */
|
||||
{
|
||||
SYSTEM_KERNEL_DEBUGGER_INFORMATION_EX skdi;
|
||||
|
||||
skdi.DebuggerAllowed = FALSE;
|
||||
skdi.DebuggerEnabled = FALSE;
|
||||
skdi.DebuggerPresent = FALSE;
|
||||
|
||||
len = sizeof(skdi);
|
||||
if (size >= len)
|
||||
{
|
||||
if (!info) ret = STATUS_ACCESS_VIOLATION;
|
||||
else memcpy( info, &skdi, len );
|
||||
}
|
||||
else ret = STATUS_INFO_LENGTH_MISMATCH;
|
||||
break;
|
||||
}
|
||||
|
||||
case SystemCpuSetInformation: /* 175 */
|
||||
return NtQuerySystemInformationEx(class, NULL, 0, info, size, ret_size);
|
||||
|
||||
|
|
|
@ -2485,6 +2485,12 @@ typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
|
|||
BOOLEAN DebuggerNotPresent;
|
||||
} SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
|
||||
|
||||
typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION_EX {
|
||||
BOOLEAN DebuggerAllowed;
|
||||
BOOLEAN DebuggerEnabled;
|
||||
BOOLEAN DebuggerPresent;
|
||||
} SYSTEM_KERNEL_DEBUGGER_INFORMATION_EX, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION_EX;
|
||||
|
||||
typedef struct _VM_COUNTERS
|
||||
{
|
||||
SIZE_T PeakVirtualSize;
|
||||
|
|
Loading…
Reference in New Issue