updated kdlibcpp
This commit is contained in:
parent
490730dabc
commit
15a99d60de
2
kdlibcpp
2
kdlibcpp
@ -1 +1 @@
|
|||||||
Subproject commit 60f7380b1dcfe762f5fec6f33df40e93315874dc
|
Subproject commit daa1b20092839ad58c77d9747ce672545ef1dc3c
|
149
setup/setup.py
149
setup/setup.py
@ -5,10 +5,11 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import zipfile
|
import zipfile
|
||||||
import sys
|
import sys
|
||||||
|
import itertools
|
||||||
|
|
||||||
_name = "pykd"
|
_name = "pykd"
|
||||||
_desc = "python windbg extension"
|
_desc = "python windbg extension"
|
||||||
_version = '0.3.4.2'
|
_version = '0.3.4.8'
|
||||||
|
|
||||||
def getReleaseSrc():
|
def getReleaseSrc():
|
||||||
return 'Release_%d.%d' % sys.version_info[0:2]
|
return 'Release_%d.%d' % sys.version_info[0:2]
|
||||||
@ -60,7 +61,7 @@ if "bdist_wheel" in sys.argv:
|
|||||||
|
|
||||||
elif "bdist_zip" in sys.argv:
|
elif "bdist_zip" in sys.argv:
|
||||||
|
|
||||||
#make package catalog
|
#make package catalog
|
||||||
|
|
||||||
if "--plat-name=win32" in sys.argv:
|
if "--plat-name=win32" in sys.argv:
|
||||||
plat_name="win32"
|
plat_name="win32"
|
||||||
@ -105,6 +106,26 @@ elif "bdist_zip" in sys.argv:
|
|||||||
archive.write( os.path.join(package_dir, srcFile), compress_type = zipfile.ZIP_DEFLATED)
|
archive.write( os.path.join(package_dir, srcFile), compress_type = zipfile.ZIP_DEFLATED)
|
||||||
|
|
||||||
print("OK")
|
print("OK")
|
||||||
|
|
||||||
|
elif "bdist_pdb" in sys.argv:
|
||||||
|
|
||||||
|
#make pdb archive
|
||||||
|
pyVersion = ('2.7', '3.5', '3.6', '3.7')
|
||||||
|
platform = ('Win32', 'x64')
|
||||||
|
|
||||||
|
pdbFiles = [ os.path.join( platform, 'Release_' + version, 'pykd.pdb') for version, platform in itertools.product( pyVersion, platform ) ]
|
||||||
|
|
||||||
|
zip_name = "pykd-%s-symbols.zip" % _version
|
||||||
|
|
||||||
|
with zipfile.ZipFile(os.path.join(os.path.curdir, 'dist', zip_name), mode='w' ) as archive:
|
||||||
|
for pdbFile in pdbFiles:
|
||||||
|
print( "zipped %s" % (pdbFile) )
|
||||||
|
archive.write( os.path.join(os.path.curdir, '..', 'out', pdbFile), pdbFile, compress_type = zipfile.ZIP_DEFLATED)
|
||||||
|
|
||||||
|
#pdbFileList = [ os.path.join( os.path.curdir, '..', 'out', fileName) for fileName in (
|
||||||
|
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -122,127 +143,3 @@ elif "bdist_zip" in sys.argv:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#from setuptools import setup
|
|
||||||
#from wheel.bdist_wheel import bdist_wheel
|
|
||||||
#import pkg_resources
|
|
||||||
#import argparse
|
|
||||||
#import os
|
|
||||||
#import shutil
|
|
||||||
#import zipfile
|
|
||||||
#import sys
|
|
||||||
|
|
||||||
#_name = "pykd"
|
|
||||||
#_desc = "python windbg extension"
|
|
||||||
#_version = '0.3.1.2'
|
|
||||||
|
|
||||||
#def getReleaseSrc():
|
|
||||||
# return 'Release_%d.%d' % sys.version_info[0:2]
|
|
||||||
|
|
||||||
#def makeWheel(args):
|
|
||||||
|
|
||||||
# # remove build catalog
|
|
||||||
# build_dir = os.path.join(os.path.curdir, 'build' )
|
|
||||||
# if os.path.exists(build_dir):
|
|
||||||
# shutil.rmtree(build_dir)
|
|
||||||
|
|
||||||
# # make package catalog
|
|
||||||
# package_dir = os.path.join(os.path.curdir, _name )
|
|
||||||
# if os.path.exists(package_dir):
|
|
||||||
# shutil.rmtree(package_dir)
|
|
||||||
# os.mkdir(package_dir)
|
|
||||||
|
|
||||||
# shutil.copy("__init__.py", package_dir)
|
|
||||||
|
|
||||||
# bin_dir = os.path.join( os.path.curdir, '..', 'bin')
|
|
||||||
# pykd_dir = os.path.join( os.path.curdir, '..', 'out')
|
|
||||||
# if args.plat_name == 'win32':
|
|
||||||
# bin_dir = os.path.join( bin_dir, 'x86')
|
|
||||||
# pykd_dir = os.path.join(pykd_dir, 'Win32', getReleaseSrc())
|
|
||||||
# elif args.plat_name == 'win-amd64':
|
|
||||||
# bin_dir = os.path.join( bin_dir, 'x64')
|
|
||||||
# pykd_dir = os.path.join(pykd_dir, 'X64', getReleaseSrc())
|
|
||||||
# else:
|
|
||||||
# assert(0)
|
|
||||||
|
|
||||||
# assert(os.path.isdir(bin_dir))
|
|
||||||
|
|
||||||
# for binFile in [ f for f in os.listdir(bin_dir) if not os.path.isdir(f) ]:
|
|
||||||
# shutil.copy( os.path.join(bin_dir, binFile), os.path.join(package_dir, binFile) )
|
|
||||||
|
|
||||||
# shutil.copy( os.path.join(pykd_dir, 'pykd.pyd'), os.path.join(package_dir, 'pykd.pyd') )
|
|
||||||
|
|
||||||
# setup(
|
|
||||||
# name = _name,
|
|
||||||
# version = _version,
|
|
||||||
# description = _desc,
|
|
||||||
# cmdclass = { 'bdist_wheel' : bdist_wheel },
|
|
||||||
# packages = ['pykd'],
|
|
||||||
# package_dir = {'pykd': package_dir},
|
|
||||||
# package_data = { 'pykd' :["*.pyd", "*.dll"]},
|
|
||||||
# include_package_data=True,
|
|
||||||
# zip_safe = False,
|
|
||||||
# universal = True,
|
|
||||||
# #python_tag = args.python_tag
|
|
||||||
# )
|
|
||||||
|
|
||||||
#def makeZip(args):
|
|
||||||
# #make package catalog
|
|
||||||
|
|
||||||
# package_dir = os.path.join(os.path.curdir, _name )
|
|
||||||
# if os.path.exists(package_dir):
|
|
||||||
# shutil.rmtree(package_dir)
|
|
||||||
# os.mkdir(package_dir)
|
|
||||||
|
|
||||||
# bin_dir = os.path.join( os.path.curdir, '..', 'bin')
|
|
||||||
# pykd_dir = os.path.join( os.path.curdir, '..', 'out')
|
|
||||||
# if args.plat_name == 'win32':
|
|
||||||
# bin_dir = os.path.join( bin_dir, 'x86')
|
|
||||||
# pykd_dir = os.path.join(pykd_dir, 'Win32', getReleaseSrc())
|
|
||||||
# elif args.plat_name == 'win-amd64':
|
|
||||||
# bin_dir = os.path.join( bin_dir, 'x64')
|
|
||||||
# pykd_dir = os.path.join(pykd_dir, 'X64', getReleaseSrc())
|
|
||||||
# else:
|
|
||||||
# assert(0)
|
|
||||||
|
|
||||||
# pyver="%d%d" % sys.version_info[0:2]
|
|
||||||
|
|
||||||
# zip_str = "pykd-%s-py%s-%s" % ( _version, pyver, args.plat_name )
|
|
||||||
# zip_name = zip_str + ".zip"
|
|
||||||
|
|
||||||
# assert(os.path.isdir(bin_dir))
|
|
||||||
|
|
||||||
# for binFile in [ f for f in os.listdir(bin_dir) if not os.path.isdir(f) ]:
|
|
||||||
# shutil.copy( os.path.join(bin_dir, binFile), os.path.join(package_dir, binFile) )
|
|
||||||
|
|
||||||
# shutil.copy( os.path.join(pykd_dir, 'pykd.pyd'), os.path.join(package_dir, 'pykd.pyd') )
|
|
||||||
|
|
||||||
# dist_dir = os.path.join(os.path.curdir, 'dist')
|
|
||||||
# if not os.path.exists(dist_dir):
|
|
||||||
# os.mkdir(dist_dir)
|
|
||||||
|
|
||||||
# with zipfile.ZipFile(os.path.join(os.path.curdir, 'dist', zip_name), mode='w' ) as archive:
|
|
||||||
# for srcFile in os.listdir(package_dir):
|
|
||||||
# print( "zipped %s" % (srcFile) )
|
|
||||||
# archive.write( os.path.join(package_dir, srcFile), compress_type = zipfile.ZIP_DEFLATED)
|
|
||||||
|
|
||||||
# print("OK")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#parser = argparse.ArgumentParser()
|
|
||||||
|
|
||||||
#subparsers = parser.add_subparsers()
|
|
||||||
#wheelParser = subparsers.add_parser('bdist_wheel')
|
|
||||||
#wheelParser.add_argument('--plat-name', choices = ['win32', 'win-amd64'], default=pkg_resources.get_build_platform() )
|
|
||||||
#wheelParser.add_argument('--python-tag', choices=['2.7', '3.5'])
|
|
||||||
#wheelParser.set_defaults(func=makeWheel)
|
|
||||||
|
|
||||||
#zipParser = subparsers.add_parser('bdist_zip')
|
|
||||||
#zipParser.add_argument('--plat-name', choices = ['win32', 'win-amd64'], default=pkg_resources.get_build_platform() )
|
|
||||||
#zipParser.set_defaults(func=makeZip)
|
|
||||||
|
|
||||||
#args = parser.parse_args()
|
|
||||||
#args.func(args)
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ def getTestSuite( singleName = "" ):
|
|||||||
|
|
||||||
unittest.TestLoader().loadTestsFromTestCase( breakpoint.BreakpointTest ),
|
unittest.TestLoader().loadTestsFromTestCase( breakpoint.BreakpointTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( stacktest.StackTest ),
|
unittest.TestLoader().loadTestsFromTestCase( stacktest.StackTest ),
|
||||||
|
unittest.TestLoader().loadTestsFromTestCase( stacktest.InlineStackTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( mspdbtest.MsPdbTest ),
|
unittest.TestLoader().loadTestsFromTestCase( mspdbtest.MsPdbTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( targetprocess.ProcessTest ),
|
unittest.TestLoader().loadTestsFromTestCase( targetprocess.ProcessTest ),
|
||||||
unittest.TestLoader().loadTestsFromTestCase( ehloadtest.EhLoadTest ),
|
unittest.TestLoader().loadTestsFromTestCase( ehloadtest.EhLoadTest ),
|
||||||
|
@ -8,18 +8,18 @@
|
|||||||
<StartupFile>pykdtest.py</StartupFile>
|
<StartupFile>pykdtest.py</StartupFile>
|
||||||
<SearchPath>
|
<SearchPath>
|
||||||
</SearchPath>
|
</SearchPath>
|
||||||
<WorkingDirectory>..\..\out\x64\Debug_2.7</WorkingDirectory>
|
<WorkingDirectory>C:\Users\User\Documents\projects\pykd2017\out\x64\Debug_3.7</WorkingDirectory>
|
||||||
<OutputPath>.</OutputPath>
|
<OutputPath>.</OutputPath>
|
||||||
<Name>pykdtest</Name>
|
<Name>pykdtest</Name>
|
||||||
<RootNamespace>pykdtest</RootNamespace>
|
<RootNamespace>pykdtest</RootNamespace>
|
||||||
<LaunchProvider>Standard Python launcher</LaunchProvider>
|
<LaunchProvider>Standard Python launcher</LaunchProvider>
|
||||||
<CommandLineArguments>C:\proj\pykd-dev\out\x64\Debug\targetapp.exe</CommandLineArguments>
|
<CommandLineArguments>C:\Users\User\Documents\projects\pykd2017\out\x64\Debug_2.7\targetapp.exe</CommandLineArguments>
|
||||||
<InterpreterPath />
|
<InterpreterPath />
|
||||||
<InterpreterArguments>
|
<InterpreterArguments>
|
||||||
</InterpreterArguments>
|
</InterpreterArguments>
|
||||||
<EnableNativeCodeDebugging>True</EnableNativeCodeDebugging>
|
<EnableNativeCodeDebugging>True</EnableNativeCodeDebugging>
|
||||||
<IsWindowsApplication>False</IsWindowsApplication>
|
<IsWindowsApplication>False</IsWindowsApplication>
|
||||||
<InterpreterId>Global|PythonCore|2.7</InterpreterId>
|
<InterpreterId>Global|PythonCore|3.7</InterpreterId>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@ -63,6 +63,8 @@
|
|||||||
<InterpreterReference Include="Global|PythonCore|2.7-32" />
|
<InterpreterReference Include="Global|PythonCore|2.7-32" />
|
||||||
<InterpreterReference Include="Global|PythonCore|2.7" />
|
<InterpreterReference Include="Global|PythonCore|2.7" />
|
||||||
<InterpreterReference Include="Global|PythonCore|3.6" />
|
<InterpreterReference Include="Global|PythonCore|3.6" />
|
||||||
|
<InterpreterReference Include="Global|PythonCore|3.7" />
|
||||||
|
<InterpreterReference Include="Global|PythonCore|3.7-32" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" />
|
||||||
|
@ -385,4 +385,11 @@ class TypeInfoTest( unittest.TestCase ):
|
|||||||
def testIsConstField(self):
|
def testIsConstField(self):
|
||||||
ti = pykd.typeInfo("classChild")
|
ti = pykd.typeInfo("classChild")
|
||||||
self.assertTrue(ti.isStaticField("m_staticConst"))
|
self.assertTrue(ti.isStaticField("m_staticConst"))
|
||||||
self.assertFalse(ti.isConstField("m_staticConst"))
|
self.assertFalse(ti.isConstField("m_staticConst"))
|
||||||
|
|
||||||
|
def testClangCompile(self):
|
||||||
|
src = "#include <windows.h>\r\n";
|
||||||
|
opt = "-I\"C:/Program Files (x86)/Windows Kits/8.1/Include/um\" -I\"C:/Program Files (x86)/Windows Kits/8.1/Include/shared\" -w";
|
||||||
|
symEnum = pykd.getSymbolEnumeratorFromSource(src, opt)
|
||||||
|
for sym in symEnum:
|
||||||
|
print(sym)
|
Loading…
Reference in New Issue
Block a user