...
 
Commits (2)
Subproject commit 962c2a6fcf532a27881e5d8d9ac133a612326b31
Subproject commit c1cd0e4fd727d87d23e1cf26e214ca45068d00e5
......@@ -1296,6 +1296,7 @@ void pykd_init()
.value("I386", kdlib::CPU_I386 )
.value("AMD64", kdlib::CPU_AMD64 )
.value("ARM64", kdlib::CPU_ARM64 )
.value("ARM", kdlib::CPU_ARM )
;
python::enum_<kdlib::VarStorage>("Location", "Location of a varibale")
......
import unittest
import pykd
import sys
import os
class ARMDumpTest(unittest.TestCase):
def setUp(self):
dump_file = os.path.join( os.path.dirname(sys.argv[0]),
r"..\..\kdlibcpp\kdlib\tests\dumps\win10_arm_rpi3_mem.cab" )
self.dump_id = pykd.loadDump( dump_file )
def tearDown(self):
pykd.closeDump( self.dump_id )
def testArm(self):
# dbgmem
self.assertEqual( 0, pykd.addr64(0) )
self.assertEqual( 0xffffffff80000000, pykd.addr64(0x80000000) )
# dbgeng
self.assertEqual( pykd.CPUType.ARM, pykd.getCPUType() )
self.assertEqual( pykd.CPUType.ARM, pykd.getCPUMode() )
self.assertEqual( False, pykd.is64bitSystem() )
self.assertEqual( 4, pykd.ptrSize() )
self.assertEqual( pykd.addr64(pykd.expr("@$retreg")), pykd.addr64(pykd.reg("r0")) )
# typeinfo
self.assertEqual( 4, pykd.typeInfo("nt!_IRP*").size() )
# cpu context
self.assertEqual( pykd.expr("@$csp"), pykd.cpu().sp )
# stack
stack = pykd.getStack()
self.assertTrue( len(stack) > 1 )
self.assertEqual( "Wdf01000!FxRequest::CompleteInternal", pykd.findSymbol(stack[0].ip, False) )
self.assertEqual( "Wdf01000!imp_WdfRequestCompleteWithInformation", pykd.findSymbol(stack[1].ip, False) )
self.assertEqual( 0x102, stack[1].getParam("RequestStatus") )
......@@ -29,6 +29,7 @@ import ehloadtest
import synsymtest
import taggedtest
import arm64dumptest
import armdumptest
pykd.initialize()
......@@ -69,6 +70,7 @@ def getTestSuite( singleName = "" ):
unittest.TestLoader().loadTestsFromTestCase( ehloadtest.EhLoadTest ),
unittest.TestLoader().loadTestsFromTestCase( taggedtest.TaggedTest ),
unittest.TestLoader().loadTestsFromTestCase( arm64dumptest.ARM64DumpTest ),
unittest.TestLoader().loadTestsFromTestCase( armdumptest.ARMDumpTest ),
#unittest.TestLoader().loadTestsFromTestCase( excepttest.ExceptionTest ),
] )
......
......@@ -31,6 +31,7 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="arm64dumptest.py" />
<Compile Include="armdumptest.py" />
<Compile Include="basetest.py" />
<Compile Include="breakpoint.py" />
<Compile Include="clienttest.py" />
......