mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[0.1.x] ~disable optimisation for varibales testing
git-svn-id: https://pykd.svn.codeplex.com/svn@73120 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
b708cfefe4
commit
3ad40a6f1d
@ -29,4 +29,4 @@ class LocalVarsTest(unittest.TestCase):
|
|||||||
self.assertNotEqual( 0, locals["staticVar"] )
|
self.assertNotEqual( 0, locals["staticVar"] )
|
||||||
self.assertEqual( pykd.DataIsStaticLocal, locals["staticVar"].dataKind() )
|
self.assertEqual( pykd.DataIsStaticLocal, locals["staticVar"].dataKind() )
|
||||||
|
|
||||||
self.assertEqual( locals["dwProccessId"], locals["staticVar"] )
|
self.assertEqual( locals["dwProccessId"] + 1, locals["staticVar"] )
|
||||||
|
@ -258,7 +258,7 @@ void FuncWithName1(int a)
|
|||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
#pragma optimize("g", off)
|
||||||
BOOL CALLBACK EnumWindowsProc(
|
BOOL CALLBACK EnumWindowsProc(
|
||||||
HWND hWindow,
|
HWND hWindow,
|
||||||
const LPARAM lParam
|
const LPARAM lParam
|
||||||
@ -272,13 +272,13 @@ BOOL CALLBACK EnumWindowsProc(
|
|||||||
{
|
{
|
||||||
static ULONGLONG staticVar = 0;
|
static ULONGLONG staticVar = 0;
|
||||||
DWORD dwThreadId = ::GetWindowThreadProcessId(hWindow, &dwProccessId);
|
DWORD dwThreadId = ::GetWindowThreadProcessId(hWindow, &dwProccessId);
|
||||||
staticVar = dwProccessId;
|
staticVar = dwProccessId + 1;
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
std::cout << dwProccessId << dwThreadId << staticVar;
|
std::cout << dwProccessId << dwThreadId << staticVar;
|
||||||
}
|
}
|
||||||
return hWindow ? FALSE : TRUE;
|
return hWindow ? FALSE : TRUE;
|
||||||
}
|
}
|
||||||
|
#pragma optimize("g", on)
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
int doLoadUnload()
|
int doLoadUnload()
|
||||||
@ -316,7 +316,10 @@ int _tmain(int argc, _TCHAR* argv[])
|
|||||||
return doLoadUnload();
|
return doLoadUnload();
|
||||||
|
|
||||||
if ( !_tcsicmp(argv[1], _T("-testEnumWindows")) )
|
if ( !_tcsicmp(argv[1], _T("-testEnumWindows")) )
|
||||||
return ::EnumWindows(&EnumWindowsProc, 6);
|
{
|
||||||
|
::EnumWindows(&EnumWindowsProc, 6);
|
||||||
|
return ERROR_SUCCESS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
|
Loading…
Reference in New Issue
Block a user