mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-19 19:13:22 +08:00
[0.3.x] fixed : some test failure
git-svn-id: https://pykd.svn.codeplex.com/svn@90469 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
60d3b958b8
commit
b8828155e0
@ -3,7 +3,7 @@
|
||||
#define PYKDEXT_VERSION_MAJOR 1
|
||||
#define PYKDEXT_VERSION_MINOR 0
|
||||
#define PYKDEXT_VERSION_SUBVERSION 1
|
||||
#define PYKDEXT_VERSION_BUILDNO 5
|
||||
#define PYKDEXT_VERSION_BUILDNO 6
|
||||
|
||||
#define __VER_STR2__(x) #x
|
||||
#define __VER_STR1__(x) __VER_STR2__(x)
|
||||
|
@ -132,7 +132,7 @@ class BreakpointTest( unittest.TestCase ):
|
||||
|
||||
pykd.go()
|
||||
|
||||
bp = MyBreakpoint( targetModule.CdeclFunc )
|
||||
bp = MyBreakpoint( targetModule.typedVar("CdeclFunc").getDebugStart() )
|
||||
|
||||
self.assertEqual( pykd.executionStatus.Break, pykd.go() )
|
||||
|
||||
@ -154,7 +154,7 @@ class BreakpointTest( unittest.TestCase ):
|
||||
targetModule.reload()
|
||||
with testutils.ContextCallIt( testutils.KillProcess(processId) ) as killStartedProcess :
|
||||
pykd.go()
|
||||
bp = pykd.setBp( targetModule.CdeclFunc, makebpcallback(1) )
|
||||
bp = pykd.setBp( targetModule.typedVar("CdeclFunc").getDebugStart(), makebpcallback(1) )
|
||||
self.assertEqual( pykd.executionStatus.Break, pykd.go() )
|
||||
|
||||
|
||||
@ -163,7 +163,7 @@ class BreakpointTest( unittest.TestCase ):
|
||||
targetModule.reload()
|
||||
with testutils.ContextCallIt( testutils.KillProcess(processId) ) as killStartedProcess :
|
||||
pykd.go()
|
||||
bp = pykd.setBp( targetModule.CdeclFunc, makebpcallback(100) )
|
||||
bp = pykd.setBp(targetModule.typedVar("CdeclFunc").getDebugStart(), makebpcallback(100) )
|
||||
self.assertEqual( pykd.executionStatus.NoDebuggee, pykd.go() )
|
||||
|
||||
def testBreakpointEnum(self):
|
||||
|
@ -104,7 +104,7 @@ class ModuleTest( unittest.TestCase ):
|
||||
# targetapp!ulongConst = 0x5555
|
||||
# targetapp!classChild::m_staticConst = <no type information>
|
||||
lst = target.module.enumSymbols( "*Const")
|
||||
self.assertEqual( 4, len(lst) )
|
||||
self.assertEqual( 3, len(lst) )
|
||||
|
||||
lst = target.module.enumSymbols( "*cal?Func")
|
||||
self.assertEqual( 4, len(lst) )
|
||||
|
@ -8,18 +8,18 @@
|
||||
<StartupFile>pykdtest.py</StartupFile>
|
||||
<SearchPath>
|
||||
</SearchPath>
|
||||
<WorkingDirectory>..\..\out\Win32\Debug_2.7</WorkingDirectory>
|
||||
<WorkingDirectory>..\..\out\x64\Debug_2.7</WorkingDirectory>
|
||||
<OutputPath>.</OutputPath>
|
||||
<Name>pykdtest</Name>
|
||||
<RootNamespace>pykdtest</RootNamespace>
|
||||
<LaunchProvider>Standard Python launcher</LaunchProvider>
|
||||
<CommandLineArguments>C:\proj\pykd-rel\out\Win32\Debug\targetapp.exe</CommandLineArguments>
|
||||
<CommandLineArguments>C:\proj\pykd_dev\out\x64\Debug\targetapp.exe</CommandLineArguments>
|
||||
<InterpreterPath />
|
||||
<InterpreterArguments>
|
||||
</InterpreterArguments>
|
||||
<EnableNativeCodeDebugging>False</EnableNativeCodeDebugging>
|
||||
<EnableNativeCodeDebugging>True</EnableNativeCodeDebugging>
|
||||
<IsWindowsApplication>False</IsWindowsApplication>
|
||||
<InterpreterId>{2af0f10d-7135-4994-9156-5d01c9c11b7e}</InterpreterId>
|
||||
<InterpreterId>{9a7a9026-48c1-4688-9d5d-e5699d47d074}</InterpreterId>
|
||||
<InterpreterVersion>2.7</InterpreterVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
@ -59,6 +59,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<InterpreterReference Include="{2af0f10d-7135-4994-9156-5d01c9c11b7e}\2.7" />
|
||||
<InterpreterReference Include="{9a7a9026-48c1-4688-9d5d-e5699d47d074}\2.7" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
||||
</Project>
|
@ -15,19 +15,14 @@ class StackTest(unittest.TestCase):
|
||||
|
||||
expectedStack = [ 'targetapp!stackTestRun2',
|
||||
'targetapp!stackTestRun1',
|
||||
'targetapp!stackTestRun',
|
||||
'targetapp!wmain',
|
||||
'targetapp!__tmainCRTStartup',
|
||||
'targetapp!wmainCRTStartup',
|
||||
'kernel32!BaseThreadInitThunk',
|
||||
'ntdll!RtlUserThreadStart' ]
|
||||
'targetapp!stackTestRun']
|
||||
|
||||
realStack = []
|
||||
for frame in pykd.getStack():
|
||||
moduleName, symbolName, disp = pykd.findSymbolAndDisp( frame.ip )
|
||||
realStack.append( "%s!%s" % ( moduleName, symbolName ) )
|
||||
|
||||
self.assertEqual( expectedStack, realStack )
|
||||
self.assertEqual( expectedStack, realStack[0:3])
|
||||
|
||||
def testGetParams(self):
|
||||
expectedParams = ["a", "b", "c"]
|
||||
|
@ -23,7 +23,7 @@ class ProcessTest(unittest.TestCase):
|
||||
threadNumber = proc.getNumberThreads()
|
||||
self.assertLess(0, threadNumber)
|
||||
for i in xrange(threadNumber):
|
||||
thread = proc.thread(i)
|
||||
thread = proc.getThread(i)
|
||||
self.assertNotEqual(0, thread.systemID )
|
||||
self.assertNotEqual(0, thread.teb )
|
||||
|
||||
@ -39,7 +39,7 @@ class ProcessTest(unittest.TestCase):
|
||||
threadNumber = proc.getNumberThreads()
|
||||
self.assertLess(0, threadNumber)
|
||||
for i in xrange(threadNumber):
|
||||
thread = proc.thread(i)
|
||||
thread = proc.getThread(i)
|
||||
thread.setCurrent()
|
||||
|
||||
def testGetBreakpoint(self):
|
||||
|
Loading…
Reference in New Issue
Block a user