mirror of
https://github.com/reactos/reactos.git
synced 2025-07-03 21:41:22 +00:00
** Adding traces to investigate crashes on MSVC_x64 builds **
No idea why the testbots didn't display the trace(), so I use DbgPrint() instead.
This commit is contained in:
parent
82da1390ec
commit
7ca891df79
2 changed files with 21 additions and 3 deletions
|
@ -98,11 +98,12 @@ START_TEST(KdSystemDebugControl)
|
||||||
? !pKdRefreshDebuggerNotPresent()
|
? !pKdRefreshDebuggerNotPresent()
|
||||||
: (/*KD_DEBUGGER_ENABLED &&*/ !KD_DEBUGGER_NOT_PRESENT));
|
: (/*KD_DEBUGGER_ENABLED &&*/ !KD_DEBUGGER_NOT_PRESENT));
|
||||||
|
|
||||||
trace("Debugger is %s\n", IsDebuggerActive ? "active" : "inactive");
|
DbgPrint("Debugger is %s\n", IsDebuggerActive ? "active" : "inactive");
|
||||||
|
|
||||||
/* Unsupported commands */
|
/* Unsupported commands */
|
||||||
for (Command = 0; Command <= 6; ++Command)
|
for (Command = 0; Command <= 6; ++Command)
|
||||||
{
|
{
|
||||||
|
DbgPrint("KdSysDbgControl(%lu)\n", Command);
|
||||||
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
||||||
if (!IsVistaOrHigher || IsDebuggerActive)
|
if (!IsVistaOrHigher || IsDebuggerActive)
|
||||||
ok_eq_hex_test(Command, Status, STATUS_INVALID_INFO_CLASS);
|
ok_eq_hex_test(Command, Status, STATUS_INVALID_INFO_CLASS);
|
||||||
|
@ -130,6 +131,7 @@ START_TEST(KdSystemDebugControl)
|
||||||
*/
|
*/
|
||||||
for (Command = 7; Command <= 20; ++Command)
|
for (Command = 7; Command <= 20; ++Command)
|
||||||
{
|
{
|
||||||
|
DbgPrint("KdSysDbgControl(%lu)\n", Command);
|
||||||
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
||||||
if (!IsVistaOrHigher || IsDebuggerActive)
|
if (!IsVistaOrHigher || IsDebuggerActive)
|
||||||
ok_neq_hex_test(Command, Status, STATUS_INVALID_INFO_CLASS); // Status must be != STATUS_INVALID_INFO_CLASS
|
ok_neq_hex_test(Command, Status, STATUS_INVALID_INFO_CLASS); // Status must be != STATUS_INVALID_INFO_CLASS
|
||||||
|
@ -140,12 +142,14 @@ START_TEST(KdSystemDebugControl)
|
||||||
/* Unsupported commands */
|
/* Unsupported commands */
|
||||||
for (Command = 21; Command <= 40; ++Command)
|
for (Command = 21; Command <= 40; ++Command)
|
||||||
{
|
{
|
||||||
|
DbgPrint("KdSysDbgControl(%lu)\n", Command);
|
||||||
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
||||||
if (!IsVistaOrHigher || IsDebuggerActive)
|
if (!IsVistaOrHigher || IsDebuggerActive)
|
||||||
ok_eq_hex_test(Command, Status, STATUS_INVALID_INFO_CLASS);
|
ok_eq_hex_test(Command, Status, STATUS_INVALID_INFO_CLASS);
|
||||||
else
|
else
|
||||||
ok_eq_hex_test(Command, Status, STATUS_DEBUGGER_INACTIVE);
|
ok_eq_hex_test(Command, Status, STATUS_DEBUGGER_INACTIVE);
|
||||||
}
|
}
|
||||||
|
DbgPrint("KdSysDbgControl -- Done\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -33,7 +33,7 @@ GetNtDdiVersion(VOID)
|
||||||
Status = RtlGetVersion((PRTL_OSVERSIONINFOW)&verInfo);
|
Status = RtlGetVersion((PRTL_OSVERSIONINFOW)&verInfo);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
trace("RtlGetVersion() returned 0x%08lx\n", Status);
|
DbgPrint("RtlGetVersion() returned 0x%08lx\n", Status);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ START_TEST(NtSystemDebugControl)
|
||||||
IsDebuggerActive = NT_SUCCESS(Status) && !DebuggerInfo.KernelDebuggerNotPresent;
|
IsDebuggerActive = NT_SUCCESS(Status) && !DebuggerInfo.KernelDebuggerNotPresent;
|
||||||
// DebuggerInfo.KernelDebuggerEnabled; // SharedUserData->KdDebuggerEnabled;
|
// DebuggerInfo.KernelDebuggerEnabled; // SharedUserData->KdDebuggerEnabled;
|
||||||
|
|
||||||
trace("Debugger is %s\n", IsDebuggerActive ? "active" : "inactive");
|
DbgPrint("Debugger is %s\n", IsDebuggerActive ? "active" : "inactive");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Explicitly disable the debug privilege so that we can test
|
* Explicitly disable the debug privilege so that we can test
|
||||||
|
@ -103,6 +103,7 @@ START_TEST(NtSystemDebugControl)
|
||||||
*/
|
*/
|
||||||
Status = RtlAdjustPrivilege(SE_DEBUG_PRIVILEGE, FALSE, FALSE, &PrivilegeSet[0]);
|
Status = RtlAdjustPrivilege(SE_DEBUG_PRIVILEGE, FALSE, FALSE, &PrivilegeSet[0]);
|
||||||
ok_eq_hex(Status, STATUS_SUCCESS);
|
ok_eq_hex(Status, STATUS_SUCCESS);
|
||||||
|
DbgPrint("NtSysDbgControl(%lu)\n", 29);
|
||||||
Status = TestSystemDebugControl(SysDbgGetTriageDump /* 29 */);
|
Status = TestSystemDebugControl(SysDbgGetTriageDump /* 29 */);
|
||||||
ok_eq_hex(Status, STATUS_ACCESS_DENIED);
|
ok_eq_hex(Status, STATUS_ACCESS_DENIED);
|
||||||
|
|
||||||
|
@ -113,6 +114,7 @@ START_TEST(NtSystemDebugControl)
|
||||||
/* Supported commands */
|
/* Supported commands */
|
||||||
for (Command = 0; Command <= 5; ++Command)
|
for (Command = 0; Command <= 5; ++Command)
|
||||||
{
|
{
|
||||||
|
DbgPrint("NtSysDbgControl(%lu)\n", Command);
|
||||||
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
||||||
if (!IsVistaOrHigher || IsDebuggerActive)
|
if (!IsVistaOrHigher || IsDebuggerActive)
|
||||||
ok_neq_hex_test(Command, Status, STATUS_INVALID_INFO_CLASS);
|
ok_neq_hex_test(Command, Status, STATUS_INVALID_INFO_CLASS);
|
||||||
|
@ -125,6 +127,7 @@ START_TEST(NtSystemDebugControl)
|
||||||
if (!skip((IsVistaOrHigher && !IsDebuggerActive) || !SharedUserData->KdDebuggerEnabled,
|
if (!skip((IsVistaOrHigher && !IsDebuggerActive) || !SharedUserData->KdDebuggerEnabled,
|
||||||
"NtSystemDebugControl(SysDbgBreakPoint) skipped because the debugger is active\n"))
|
"NtSystemDebugControl(SysDbgBreakPoint) skipped because the debugger is active\n"))
|
||||||
{
|
{
|
||||||
|
DbgPrint("NtSysDbgControl(%lu)\n", 6);
|
||||||
Status = TestSystemDebugControl(SysDbgBreakPoint /* 6 */);
|
Status = TestSystemDebugControl(SysDbgBreakPoint /* 6 */);
|
||||||
if (!SharedUserData->KdDebuggerEnabled /*&& (!IsVistaOrHigher || IsDebuggerActive)*/)
|
if (!SharedUserData->KdDebuggerEnabled /*&& (!IsVistaOrHigher || IsDebuggerActive)*/)
|
||||||
{
|
{
|
||||||
|
@ -160,6 +163,7 @@ START_TEST(NtSystemDebugControl)
|
||||||
DBG_UNREFERENCED_PARAMETER(IsNT52SP1OrHigher);
|
DBG_UNREFERENCED_PARAMETER(IsNT52SP1OrHigher);
|
||||||
for (Command = 7; Command <= 20; ++Command)
|
for (Command = 7; Command <= 20; ++Command)
|
||||||
{
|
{
|
||||||
|
DbgPrint("NtSysDbgControl(%lu)\n", Command);
|
||||||
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
||||||
if (!IsVistaOrHigher || IsDebuggerActive)
|
if (!IsVistaOrHigher || IsDebuggerActive)
|
||||||
ok_eq_hex_test(Command, Status, STATUS_NOT_IMPLEMENTED);
|
ok_eq_hex_test(Command, Status, STATUS_NOT_IMPLEMENTED);
|
||||||
|
@ -185,6 +189,7 @@ START_TEST(NtSystemDebugControl)
|
||||||
Command = SysDbgDisableKernelDebugger; // 22
|
Command = SysDbgDisableKernelDebugger; // 22
|
||||||
else
|
else
|
||||||
Command = SysDbgEnableKernelDebugger; // 21
|
Command = SysDbgEnableKernelDebugger; // 21
|
||||||
|
DbgPrint("NtSysDbgControl(%lu)\n", Command);
|
||||||
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
||||||
if (!IsVistaOrHigher || IsDebuggerActive)
|
if (!IsVistaOrHigher || IsDebuggerActive)
|
||||||
{
|
{
|
||||||
|
@ -214,7 +219,9 @@ START_TEST(NtSystemDebugControl)
|
||||||
Command = SysDbgEnableKernelDebugger; // 21
|
Command = SysDbgEnableKernelDebugger; // 21
|
||||||
else
|
else
|
||||||
Command = SysDbgDisableKernelDebugger; // 22
|
Command = SysDbgDisableKernelDebugger; // 22
|
||||||
|
DbgPrint("NtSysDbgControl(%lu)\n", Command);
|
||||||
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
||||||
|
DbgPrint("post - NtSysDbgControl(%lu)\n", Command);
|
||||||
if (!IsVistaOrHigher || IsDebuggerActive)
|
if (!IsVistaOrHigher || IsDebuggerActive)
|
||||||
ok_eq_hex_test(Command, Status, STATUS_SUCCESS);
|
ok_eq_hex_test(Command, Status, STATUS_SUCCESS);
|
||||||
else
|
else
|
||||||
|
@ -224,6 +231,7 @@ START_TEST(NtSystemDebugControl)
|
||||||
/* Supported commands */
|
/* Supported commands */
|
||||||
for (Command = 23; Command <= 31; ++Command)
|
for (Command = 23; Command <= 31; ++Command)
|
||||||
{
|
{
|
||||||
|
DbgPrint("NtSysDbgControl(%lu)\n", Command);
|
||||||
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
||||||
if (!IsVistaOrHigher || IsDebuggerActive)
|
if (!IsVistaOrHigher || IsDebuggerActive)
|
||||||
ok_neq_hex_test(Command, Status, STATUS_INVALID_INFO_CLASS);
|
ok_neq_hex_test(Command, Status, STATUS_INVALID_INFO_CLASS);
|
||||||
|
@ -234,6 +242,7 @@ START_TEST(NtSystemDebugControl)
|
||||||
/* These are Vista+ and depend on the OS version */
|
/* These are Vista+ and depend on the OS version */
|
||||||
for (Command = 32; Command <= 36; ++Command)
|
for (Command = 32; Command <= 36; ++Command)
|
||||||
{
|
{
|
||||||
|
DbgPrint("NtSysDbgControl(%lu)\n", Command);
|
||||||
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
||||||
if (!IsVistaOrHigher || IsDebuggerActive)
|
if (!IsVistaOrHigher || IsDebuggerActive)
|
||||||
{
|
{
|
||||||
|
@ -249,6 +258,7 @@ START_TEST(NtSystemDebugControl)
|
||||||
}
|
}
|
||||||
|
|
||||||
Command = 37; // SysDbgGetLiveKernelDump
|
Command = 37; // SysDbgGetLiveKernelDump
|
||||||
|
DbgPrint("NtSysDbgControl(%lu)\n", Command);
|
||||||
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
||||||
if (!IsVistaOrHigher || IsDebuggerActive)
|
if (!IsVistaOrHigher || IsDebuggerActive)
|
||||||
{
|
{
|
||||||
|
@ -263,6 +273,7 @@ START_TEST(NtSystemDebugControl)
|
||||||
}
|
}
|
||||||
|
|
||||||
Command = 38; // SysDbgKdPullRemoteFile
|
Command = 38; // SysDbgKdPullRemoteFile
|
||||||
|
DbgPrint("NtSysDbgControl(%lu)\n", Command);
|
||||||
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
||||||
if (!IsVistaOrHigher || IsDebuggerActive)
|
if (!IsVistaOrHigher || IsDebuggerActive)
|
||||||
{
|
{
|
||||||
|
@ -279,6 +290,7 @@ START_TEST(NtSystemDebugControl)
|
||||||
/* Unsupported commands */
|
/* Unsupported commands */
|
||||||
for (Command = 39; Command <= 40; ++Command)
|
for (Command = 39; Command <= 40; ++Command)
|
||||||
{
|
{
|
||||||
|
DbgPrint("NtSysDbgControl(%lu)\n", Command);
|
||||||
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
Status = TestSystemDebugControl((SYSDBG_COMMAND)Command);
|
||||||
if (!IsVistaOrHigher || IsDebuggerActive)
|
if (!IsVistaOrHigher || IsDebuggerActive)
|
||||||
ok_eq_hex_test(Command, Status, STATUS_INVALID_INFO_CLASS);
|
ok_eq_hex_test(Command, Status, STATUS_INVALID_INFO_CLASS);
|
||||||
|
@ -286,6 +298,8 @@ START_TEST(NtSystemDebugControl)
|
||||||
ok_eq_hex_test(Command, Status, STATUS_DEBUGGER_INACTIVE);
|
ok_eq_hex_test(Command, Status, STATUS_DEBUGGER_INACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DbgPrint("NtSysDbgControl -- Done\n");
|
||||||
|
|
||||||
/* Finally restore the original debug privilege state */
|
/* Finally restore the original debug privilege state */
|
||||||
RtlAdjustPrivilege(SE_DEBUG_PRIVILEGE, PrivilegeSet[0], FALSE, &PrivilegeSet[0]);
|
RtlAdjustPrivilege(SE_DEBUG_PRIVILEGE, PrivilegeSet[0], FALSE, &PrivilegeSet[0]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue