Compare commits

..

No commits in common. "0.3.4.15_1" and "0.3.4.2" have entirely different histories.

42 changed files with 2419 additions and 3910 deletions

2
.gitignore vendored
View File

@ -1,2 +0,0 @@
*.pyc
.vs

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "kdlibcpp"] [submodule "kdlibcpp"]
path = kdlibcpp path = kdlibcpp
url = https://github.com/ivellioscolin/kdlibcpp.git url = https://githomelab.ru/kdlibcpp/kdlibcpp.git

View File

@ -1,4 +1,4 @@
# Pykd - not only python extension for WinDBG # Pykd - python extension for WinDBG
## Purpose ## Purpose
This project can help to automate debugging and crash dump analysis using Python. It allows one to take the best from both worlds: the expressiveness and convenience of Python with the power of WinDbg! This project can help to automate debugging and crash dump analysis using Python. It allows one to take the best from both worlds: the expressiveness and convenience of Python with the power of WinDbg!
@ -6,37 +6,16 @@ This project can help to automate debugging and crash dump analysis using Python
## Why do I need this? ## Why do I need this?
If you want to automate the debugger but dislike the WinDbg built-in script machine syntax it's time to try again using the handy and powerful Python language. Even if you don't want to create your own script, maybe some existing scripts will be of interest to you? If you want to automate the debugger but dislike the WinDbg built-in script machine syntax it's time to try again using the handy and powerful Python language. Even if you don't want to create your own script, maybe some existing scripts will be of interest to you?
## Getting started ## Pykd bootstrapper
* You should have installed python. Supported python: 2.7, 3.5 - 3.9 Use it to run pykd within windbg. [link](https://githomelab.ru/pykd/pykd-ext)
* Install pykd with command: 'pip install pykd'
* Use windbg extension (bootstrapper) to run pykd with windbg
## Windbg extension (bootstarpper) ## Releases:
Use it to run pykd within windbg. [Last Release](/../wikis/Last Release)
[Home Page](https://githomelab.ru/pykd/pykd-ext)
[Download](https://githomelab.ru/pykd/pykd-ext/wikis/Downloads)
## Releases
Just run 'pip install pykd' to install or 'pip install pykd --upgrade' to upgrade to the last version
[PyPi](https://pypi.org/project/pykd)
[All Releases](/../wikis/All Releases)
## Documentation ## Documentation
[Wiki Home](/../wikis/Home)
[User Manual](/../wikis/User Manual rus) [User Manual](/../wikis/User Manual rus)
[API Reference](/../wikis/API Reference) [API Reference](/../wikis/API Reference)
## Useful tools for pykd and WinDBG
[windbg-pack](https://githomelab.ru/pykd/windbg-pack)
Set of python scripts for WinDBG
[pykdwin](https://githomelab.ru/pykd/pykdwin)
A library with auxiliary modules for writing small pykd scripts and daily use.
[windbg-kernel](https://githomelab.ru/pykd/windbg-kernel)
Set of pykd script for kernel debugging
## How to build ? ## How to build ?
* install VS 2017 * install VS 2017
https://visualstudio.microsoft.com/downloads/ https://visualstudio.microsoft.com/downloads/
@ -54,13 +33,3 @@ git clone --recurse-submodules https://githomelab.ru/pykd/pykd.git local_dir
``` ```
* open pykd.sln * open pykd.sln
* choose a python version and a target platform then build pykd projects * choose a python version and a target platform then build pykd projects
## Projects used pykd
[mona.py](https://github.com/corelan/mona)
the exploit writer's swiss army knife
[flare-dbg](https://github.com/fireeye/flare-dbg)
flare-dbg is a project meant to aid malware reverse engineers in rapidly developing debugger scripts.
[voltron](https://github.com/snare/voltron)
Voltron is an extensible debugger UI toolkit written in Python

@ -1 +1 @@
Subproject commit e54598d2f904acab23d340c93ce77c551a396ecb Subproject commit f27cdbdaef5f68e6704d24beb208921a0a66da4b

150
pykd.sln
View File

@ -42,126 +42,75 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_2.7|Win32 = Debug_2.7|Win32 Debug_2.7|Win32 = Debug_2.7|Win32
Debug_2.7|x64 = Debug_2.7|x64 Debug_2.7|x64 = Debug_2.7|x64
Debug_3.10|Win32 = Debug_3.10|Win32
Debug_3.10|x64 = Debug_3.10|x64
Debug_3.5|Win32 = Debug_3.5|Win32 Debug_3.5|Win32 = Debug_3.5|Win32
Debug_3.5|x64 = Debug_3.5|x64 Debug_3.5|x64 = Debug_3.5|x64
Debug_3.6|Win32 = Debug_3.6|Win32 Debug_3.6|Win32 = Debug_3.6|Win32
Debug_3.6|x64 = Debug_3.6|x64 Debug_3.6|x64 = Debug_3.6|x64
Debug_3.7|Win32 = Debug_3.7|Win32 Debug_3.7|Win32 = Debug_3.7|Win32
Debug_3.7|x64 = Debug_3.7|x64 Debug_3.7|x64 = Debug_3.7|x64
Debug_3.8|Win32 = Debug_3.8|Win32
Debug_3.8|x64 = Debug_3.8|x64
Debug_3.9|Win32 = Debug_3.9|Win32
Debug_3.9|x64 = Debug_3.9|x64
Release_2.7|Win32 = Release_2.7|Win32 Release_2.7|Win32 = Release_2.7|Win32
Release_2.7|x64 = Release_2.7|x64 Release_2.7|x64 = Release_2.7|x64
Release_3.10|Win32 = Release_3.10|Win32
Release_3.10|x64 = Release_3.10|x64
Release_3.5|Win32 = Release_3.5|Win32 Release_3.5|Win32 = Release_3.5|Win32
Release_3.5|x64 = Release_3.5|x64 Release_3.5|x64 = Release_3.5|x64
Release_3.6|Win32 = Release_3.6|Win32 Release_3.6|Win32 = Release_3.6|Win32
Release_3.6|x64 = Release_3.6|x64 Release_3.6|x64 = Release_3.6|x64
Release_3.7|Win32 = Release_3.7|Win32 Release_3.7|Win32 = Release_3.7|Win32
Release_3.7|x64 = Release_3.7|x64 Release_3.7|x64 = Release_3.7|x64
Release_3.8|Win32 = Release_3.8|Win32
Release_3.8|x64 = Release_3.8|x64
Release_3.9|Win32 = Release_3.9|Win32
Release_3.9|x64 = Release_3.9|x64
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|Win32.ActiveCfg = Debug|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|Win32.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|Win32.Build.0 = Debug|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|Win32.Build.0 = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|x64.ActiveCfg = Debug|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|x64.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.10|Win32.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.10|x64.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.5|Win32.ActiveCfg = Debug|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.5|Win32.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.5|x64.ActiveCfg = Debug|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.5|x64.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.6|Win32.ActiveCfg = Debug|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.6|Win32.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.6|x64.ActiveCfg = Debug|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.6|x64.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.7|Win32.ActiveCfg = Debug|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.7|Win32.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.7|x64.ActiveCfg = Debug|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.7|x64.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.8|Win32.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.8|x64.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.9|Win32.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_3.9|x64.ActiveCfg = Debug|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_2.7|Win32.ActiveCfg = Release|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_2.7|Win32.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_2.7|x64.ActiveCfg = Release|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_2.7|x64.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.10|Win32.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.10|x64.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.5|Win32.ActiveCfg = Release|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.5|Win32.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.5|x64.ActiveCfg = Release|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.5|x64.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.6|Win32.ActiveCfg = Release|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.6|Win32.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.6|x64.ActiveCfg = Release|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.6|x64.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.7|Win32.ActiveCfg = Release|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.7|Win32.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.7|x64.ActiveCfg = Release|Any CPU {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.7|x64.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.8|Win32.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.8|x64.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.9|Win32.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.9|x64.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_2.7|Win32.ActiveCfg = Debug|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_2.7|Win32.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_2.7|x64.ActiveCfg = Debug|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_2.7|x64.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.10|Win32.ActiveCfg = Debug_3.10|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.10|x64.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.5|Win32.ActiveCfg = Debug|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.5|Win32.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.5|x64.ActiveCfg = Debug|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.5|x64.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.6|Win32.ActiveCfg = Debug|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.6|Win32.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.6|x64.ActiveCfg = Debug|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.6|x64.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.7|Win32.ActiveCfg = Debug|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.7|Win32.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.7|x64.ActiveCfg = Debug|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.7|x64.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.8|Win32.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.8|x64.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.9|Win32.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.9|x64.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_2.7|Win32.ActiveCfg = Release|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_2.7|Win32.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_2.7|x64.ActiveCfg = Release|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_2.7|x64.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.10|Win32.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.10|x64.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.5|Win32.ActiveCfg = Release|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.5|Win32.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.5|x64.ActiveCfg = Release|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.5|x64.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.6|Win32.ActiveCfg = Release|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.6|Win32.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.6|x64.ActiveCfg = Release|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.6|x64.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.7|Win32.ActiveCfg = Release|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.7|Win32.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.7|x64.ActiveCfg = Release|Any CPU {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.7|x64.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.8|Win32.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.8|x64.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.9|Win32.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.9|x64.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_2.7|Win32.ActiveCfg = Debug|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_2.7|Win32.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_2.7|x64.ActiveCfg = Debug|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_2.7|x64.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.10|Win32.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.10|x64.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.5|Win32.ActiveCfg = Debug|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.5|Win32.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.5|x64.ActiveCfg = Debug|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.5|x64.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.6|Win32.ActiveCfg = Debug|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.6|Win32.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.6|x64.ActiveCfg = Debug|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.6|x64.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.7|Win32.ActiveCfg = Debug|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.7|Win32.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.7|x64.ActiveCfg = Debug|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.7|x64.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.8|Win32.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.8|x64.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.9|Win32.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.9|x64.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_2.7|Win32.ActiveCfg = Release|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_2.7|Win32.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_2.7|x64.ActiveCfg = Release|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_2.7|x64.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.10|Win32.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.10|x64.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.5|Win32.ActiveCfg = Release|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.5|Win32.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.5|x64.ActiveCfg = Release|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.5|x64.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.6|Win32.ActiveCfg = Release|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.6|Win32.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.6|x64.ActiveCfg = Release|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.6|x64.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.7|Win32.ActiveCfg = Release|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.7|Win32.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.7|x64.ActiveCfg = Release|Any CPU {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.7|x64.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.8|Win32.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.8|x64.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.9|Win32.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.9|x64.ActiveCfg = Release|Any CPU
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.ActiveCfg = Debug|Win32 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.ActiveCfg = Debug|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.Build.0 = Debug|Win32 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.Build.0 = Debug|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|x64.ActiveCfg = Debug|x64 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|x64.ActiveCfg = Debug|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|x64.Build.0 = Debug|x64 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|x64.Build.0 = Debug|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.10|Win32.ActiveCfg = Debug_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.10|x64.ActiveCfg = Debug|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.10|x64.Build.0 = Debug|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.5|Win32.ActiveCfg = Debug|Win32 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.5|Win32.ActiveCfg = Debug|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.5|Win32.Build.0 = Debug|Win32 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.5|Win32.Build.0 = Debug|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.5|x64.ActiveCfg = Debug|x64 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.5|x64.ActiveCfg = Debug|x64
@ -174,22 +123,10 @@ Global
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.7|Win32.Build.0 = Debug|Win32 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.7|Win32.Build.0 = Debug|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.7|x64.ActiveCfg = Debug|x64 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.7|x64.ActiveCfg = Debug|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.7|x64.Build.0 = Debug|x64 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.7|x64.Build.0 = Debug|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.8|Win32.ActiveCfg = Debug|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.8|Win32.Build.0 = Debug|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.8|x64.ActiveCfg = Debug|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.8|x64.Build.0 = Debug|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.9|Win32.ActiveCfg = Debug|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.9|Win32.Build.0 = Debug|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.9|x64.ActiveCfg = Debug|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.9|x64.Build.0 = Debug|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|Win32.ActiveCfg = Release_Static|Win32 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|Win32.ActiveCfg = Release_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|Win32.Build.0 = Release_Static|Win32 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|Win32.Build.0 = Release_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|x64.ActiveCfg = Release_Static|x64 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|x64.ActiveCfg = Release_Static|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|x64.Build.0 = Release_Static|x64 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|x64.Build.0 = Release_Static|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.10|Win32.ActiveCfg = Release_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.10|Win32.Build.0 = Release_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.10|x64.ActiveCfg = Release_Static|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.10|x64.Build.0 = Release_Static|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.5|Win32.ActiveCfg = Release_Static|Win32 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.5|Win32.ActiveCfg = Release_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.5|Win32.Build.0 = Release_Static|Win32 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.5|Win32.Build.0 = Release_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.5|x64.ActiveCfg = Release_Static|x64 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.5|x64.ActiveCfg = Release_Static|x64
@ -202,22 +139,10 @@ Global
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.7|Win32.Build.0 = Release_Static|Win32 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.7|Win32.Build.0 = Release_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.7|x64.ActiveCfg = Release_Static|x64 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.7|x64.ActiveCfg = Release_Static|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.7|x64.Build.0 = Release_Static|x64 {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.7|x64.Build.0 = Release_Static|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.8|Win32.ActiveCfg = Release_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.8|Win32.Build.0 = Release_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.8|x64.ActiveCfg = Release_Static|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.8|x64.Build.0 = Release_Static|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.9|Win32.ActiveCfg = Release_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.9|Win32.Build.0 = Release_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.9|x64.ActiveCfg = Release_Static|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.9|x64.Build.0 = Release_Static|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Win32.ActiveCfg = Debug_2.7|Win32 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Win32.ActiveCfg = Debug_2.7|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Win32.Build.0 = Debug_2.7|Win32 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Win32.Build.0 = Debug_2.7|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|x64.ActiveCfg = Debug_2.7|x64 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|x64.ActiveCfg = Debug_2.7|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|x64.Build.0 = Debug_2.7|x64 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|x64.Build.0 = Debug_2.7|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.10|Win32.ActiveCfg = Debug_3.10|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.10|Win32.Build.0 = Debug_3.10|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.10|x64.ActiveCfg = Debug_3.10|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.10|x64.Build.0 = Debug_3.10|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.5|Win32.ActiveCfg = Debug_3.5|Win32 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.5|Win32.ActiveCfg = Debug_3.5|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.5|Win32.Build.0 = Debug_3.5|Win32 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.5|Win32.Build.0 = Debug_3.5|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.5|x64.ActiveCfg = Debug_3.5|x64 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.5|x64.ActiveCfg = Debug_3.5|x64
@ -230,22 +155,10 @@ Global
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.7|Win32.Build.0 = Debug_3.7|Win32 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.7|Win32.Build.0 = Debug_3.7|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.7|x64.ActiveCfg = Debug_3.7|x64 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.7|x64.ActiveCfg = Debug_3.7|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.7|x64.Build.0 = Debug_3.7|x64 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.7|x64.Build.0 = Debug_3.7|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.8|Win32.ActiveCfg = Debug_3.8|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.8|Win32.Build.0 = Debug_3.8|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.8|x64.ActiveCfg = Debug_3.8|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.8|x64.Build.0 = Debug_3.8|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.9|Win32.ActiveCfg = Debug_3.9|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.9|Win32.Build.0 = Debug_3.9|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.9|x64.ActiveCfg = Debug_3.9|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.9|x64.Build.0 = Debug_3.9|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|Win32.ActiveCfg = Release_2.7|Win32 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|Win32.ActiveCfg = Release_2.7|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|Win32.Build.0 = Release_2.7|Win32 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|Win32.Build.0 = Release_2.7|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|x64.ActiveCfg = Release_2.7|x64 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|x64.ActiveCfg = Release_2.7|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|x64.Build.0 = Release_2.7|x64 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|x64.Build.0 = Release_2.7|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.10|Win32.ActiveCfg = Release_3.10|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.10|Win32.Build.0 = Release_3.10|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.10|x64.ActiveCfg = Release_3.10|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.10|x64.Build.0 = Release_3.10|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.5|Win32.ActiveCfg = Release_3.5|Win32 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.5|Win32.ActiveCfg = Release_3.5|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.5|Win32.Build.0 = Release_3.5|Win32 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.5|Win32.Build.0 = Release_3.5|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.5|x64.ActiveCfg = Release_3.5|x64 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.5|x64.ActiveCfg = Release_3.5|x64
@ -258,21 +171,10 @@ Global
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.7|Win32.Build.0 = Release_3.7|Win32 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.7|Win32.Build.0 = Release_3.7|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.7|x64.ActiveCfg = Release_3.7|x64 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.7|x64.ActiveCfg = Release_3.7|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.7|x64.Build.0 = Release_3.7|x64 {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.7|x64.Build.0 = Release_3.7|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.8|Win32.ActiveCfg = Release_3.8|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.8|Win32.Build.0 = Release_3.8|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.8|x64.ActiveCfg = Release_3.8|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.8|x64.Build.0 = Release_3.8|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.9|Win32.ActiveCfg = Release_3.9|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.9|Win32.Build.0 = Release_3.9|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.9|x64.ActiveCfg = Release_3.9|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.9|x64.Build.0 = Release_3.9|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Win32.ActiveCfg = Debug|Win32 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Win32.ActiveCfg = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Win32.Build.0 = Debug|Win32 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Win32.Build.0 = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|x64.ActiveCfg = Debug|x64 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|x64.ActiveCfg = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|x64.Build.0 = Debug|x64 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|x64.Build.0 = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.10|Win32.ActiveCfg = Debug_3.10|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.10|x64.ActiveCfg = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.10|x64.Build.0 = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.5|Win32.ActiveCfg = Debug|Win32 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.5|Win32.ActiveCfg = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.5|Win32.Build.0 = Debug|Win32 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.5|Win32.Build.0 = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.5|x64.ActiveCfg = Debug|x64 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.5|x64.ActiveCfg = Debug|x64
@ -285,42 +187,22 @@ Global
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.7|Win32.Build.0 = Debug|Win32 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.7|Win32.Build.0 = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.7|x64.ActiveCfg = Debug|x64 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.7|x64.ActiveCfg = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.7|x64.Build.0 = Debug|x64 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.7|x64.Build.0 = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.8|Win32.ActiveCfg = Debug|Win32 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Win32.ActiveCfg = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.8|Win32.Build.0 = Debug|Win32 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Win32.Build.0 = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.8|x64.ActiveCfg = Debug|x64 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|x64.ActiveCfg = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.8|x64.Build.0 = Debug|x64 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|x64.Build.0 = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.9|Win32.ActiveCfg = Debug|Win32 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.5|Win32.ActiveCfg = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.9|Win32.Build.0 = Debug|Win32 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.5|Win32.Build.0 = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.9|x64.ActiveCfg = Debug|x64 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.5|x64.ActiveCfg = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.9|x64.Build.0 = Debug|x64 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.5|x64.Build.0 = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Win32.ActiveCfg = Debug|Win32 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|Win32.ActiveCfg = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Win32.Build.0 = Debug|Win32 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|Win32.Build.0 = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|x64.ActiveCfg = Debug|x64 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|x64.ActiveCfg = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|x64.Build.0 = Debug|x64 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|x64.Build.0 = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.10|Win32.ActiveCfg = Release|Win32 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|Win32.ActiveCfg = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.10|Win32.Build.0 = Release|Win32 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|Win32.Build.0 = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.10|x64.ActiveCfg = Release|x64 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|x64.ActiveCfg = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.10|x64.Build.0 = Release|x64 {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|x64.Build.0 = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.5|Win32.ActiveCfg = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.5|Win32.Build.0 = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.5|x64.ActiveCfg = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.5|x64.Build.0 = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|Win32.ActiveCfg = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|Win32.Build.0 = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|x64.ActiveCfg = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|x64.Build.0 = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|Win32.ActiveCfg = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|Win32.Build.0 = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|x64.ActiveCfg = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|x64.Build.0 = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.8|Win32.ActiveCfg = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.8|Win32.Build.0 = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.8|x64.ActiveCfg = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.8|x64.Build.0 = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.9|Win32.ActiveCfg = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.9|Win32.Build.0 = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.9|x64.ActiveCfg = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.9|x64.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -105,11 +105,7 @@ object BOOST_PYTHON_DECL exec_file(char const *filename, object global, object l
// should be 'char const *' but older python versions don't use 'const' yet. // should be 'char const *' but older python versions don't use 'const' yet.
char *f = const_cast<char *>(filename); char *f = const_cast<char *>(filename);
// Let python open the file to avoid potential binary incompatibilities. // Let python open the file to avoid potential binary incompatibilities.
#if PY_VERSION_HEX >= 0x030a0000 #if PY_VERSION_HEX >= 0x03040000
PyObject* fo = Py_BuildValue("s", f);
FILE* fs = _Py_fopen_obj(fo, "r");
Py_DECREF(fo);
#elif PY_VERSION_HEX >= 0x03040000
FILE *fs = _Py_fopen(f, "r"); FILE *fs = _Py_fopen(f, "r");
#elif PY_VERSION_HEX >= 0x03000000 #elif PY_VERSION_HEX >= 0x03000000
PyObject *fo = Py_BuildValue("s", f); PyObject *fo = Py_BuildValue("s", f);

View File

@ -11,10 +11,6 @@
<package id="Python35" version="3.5.1.1" targetFramework="Native" /> <package id="Python35" version="3.5.1.1" targetFramework="Native" />
<package id="Python36" version="3.6.0" targetFramework="Native" /> <package id="Python36" version="3.6.0" targetFramework="Native" />
<package id="Python37" version="1.0.0.1" targetFramework="Native" /> <package id="Python37" version="1.0.0.1" targetFramework="Native" />
<package id="Python38" version="3.8.0" targetFramework="Native" />
<package id="Python39" version="3.9.0" targetFramework="Native" />
<package id="python" version="3.10.10" allowedVersions="[3.10.0,3.11.0)" targetFramework="native" />
<package id="pythonx86" version="3.10.10" allowedVersions="[3.10.0,3.11.0)" targetFramework="native" />
<package id="clang-cmake" version="6.0.0.1" targetFramework="Native" /> <package id="clang-cmake" version="6.0.0.1" targetFramework="Native" />
<package id="llvm-cmake" version="6.0.0.1" targetFramework="Native" /> <package id="llvm-cmake" version="6.0.0.1" targetFramework="Native" />
</packages> </packages>

View File

@ -69,14 +69,14 @@ std::wstring getRegisterName(unsigned long index)
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
python::list getStack(bool inlineFrames) python::list getCurrentStack()
{ {
kdlib::StackPtr stack; kdlib::StackPtr stack;
unsigned long numberFrames; unsigned long numberFrames;
do { do {
AutoRestorePyState pystate; AutoRestorePyState pystate;
stack = kdlib::getStack(inlineFrames); stack = kdlib::getStack();
numberFrames = stack->getFrameCount(); numberFrames = stack->getFrameCount();
} while(false); } while(false);
@ -242,37 +242,6 @@ python::dict StackFrameAdapter::getLocalsDict(kdlib::StackFramePtr& frame)
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
python::tuple StackFrameAdapter::findSymbol(kdlib::StackFramePtr& frame)
{
kdlib::MEMDISPLACEMENT displacement;
std::wstring symbolName;
std::wstring moduleName;
{
AutoRestorePyState pystate;
symbolName = frame->findSymbol(displacement);
moduleName = kdlib::getModuleName(kdlib::findModuleBase(frame->getIP()));
}
return python::make_tuple(moduleName, symbolName, displacement);
}
///////////////////////////////////////////////////////////////////////////////
python::tuple StackFrameAdapter::getSourceLine(kdlib::StackFramePtr& frame)
{
std::wstring fileName;
unsigned long lineno;
do {
AutoRestorePyState pystate;
frame->getSourceLine(fileName, lineno);
} while (false);
return python::make_tuple(fileName, lineno);
}
///////////////////////////////////////////////////////////////////////////////
python::tuple CPUContextAdapter::getRegisterByIndex(unsigned long index) python::tuple CPUContextAdapter::getRegisterByIndex(unsigned long index)
{ {

View File

@ -70,16 +70,6 @@ public:
AutoRestorePyState pystate; AutoRestorePyState pystate;
frame->switchTo(); frame->switchTo();
} }
static python::tuple findSymbol(kdlib::StackFramePtr& frame);
static bool isInline(kdlib::StackFramePtr& frame)
{
AutoRestorePyState pystate;
return frame->isInline();
}
static python::tuple getSourceLine(kdlib::StackFramePtr& frame);
}; };
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
@ -167,7 +157,7 @@ inline void switchProcessorMode() {
kdlib::switchCPUMode(); kdlib::switchCPUMode();
} }
python::list getStack(bool inlineFrames = false); python::list getCurrentStack();
inline kdlib::StackFramePtr getCurrentFrame() { inline kdlib::StackFramePtr getCurrentFrame() {
AutoRestorePyState pystate; AutoRestorePyState pystate;

View File

@ -163,19 +163,6 @@ python::list getLocalProcesses()
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
std::wstring getHostProcessPath()
{
AutoRestorePyState pystate;
std::vector<WCHAR> fileNameBuffer(0x1000);
DWORD fileNameSize = GetModuleFileNameW(NULL, &fileNameBuffer.front(), fileNameBuffer.size() );
return std::wstring(&fileNameBuffer.front(), fileNameSize);
}
///////////////////////////////////////////////////////////////////////////////
python::tuple getBugCheckData() python::tuple getBugCheckData()
{ {
kdlib::SystemCrashInfo crashInfo = {}; kdlib::SystemCrashInfo crashInfo = {};
@ -226,20 +213,4 @@ std::wstring printSyntheticSymbol(const kdlib::SyntheticSymbol& syntheticSymbol)
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
void addSyntheticModule(kdlib::MEMOFFSET_64 base, unsigned long size, const std::wstring &name, const std::wstring &path /*= std::wstring{}*/)
{
AutoRestorePyState pystate;
return kdlib::addSyntheticModule(base, size, name, path);
}
///////////////////////////////////////////////////////////////////////////////
void removeSyntheticModule(kdlib::MEMOFFSET_64 base)
{
AutoRestorePyState pystate;
return kdlib::removeSyntheticModule(base);
}
///////////////////////////////////////////////////////////////////////////////
} //end namespace pykd } //end namespace pykd

View File

@ -19,10 +19,10 @@ kdlib::PROCESS_DEBUG_ID startProcess(const std::wstring &processName, const kdl
} }
inline inline
kdlib::PROCESS_DEBUG_ID attachProcess(kdlib::PROCESS_ID pid, const kdlib::ProcessDebugFlags& flags = kdlib::ProcessDebugDefault) kdlib::PROCESS_DEBUG_ID attachProcess(kdlib::PROCESS_ID pid)
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;
return kdlib::attachProcess(pid, flags); return kdlib::attachProcess(pid);
} }
inline inline
@ -104,13 +104,13 @@ bool isKernelDebugging()
inline inline
python::object debugCommand( const std::wstring &command, bool suppressOutput = true, const kdlib::OutputFlagsSet& captureFlags = kdlib::OutputFlag::Normal) python::object debugCommand( const std::wstring &command, bool suppressOutput = true)
{ {
std::wstring debugResult; std::wstring debugResult;
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;
debugResult = kdlib::debugCommand(command, suppressOutput, captureFlags); debugResult = kdlib::debugCommand(command, suppressOutput);
} }
if (debugResult.size() > 0 ) if (debugResult.size() > 0 )
@ -133,34 +133,6 @@ void changeDebugOptions(kdlib::DebugOptionsSet &addOptions, kdlib::DebugOptionsS
kdlib::changeDebugOptions(addOptions, removeOptions); kdlib::changeDebugOptions(addOptions, removeOptions);
} }
inline
kdlib::OutputFlagsSet getOutputMask()
{
AutoRestorePyState pystate;
return kdlib::getOutputFlags();
}
inline
void setOutputMask(const kdlib::OutputFlagsSet& outputMask)
{
AutoRestorePyState pystate;
kdlib::setOutputFlags(outputMask);
}
inline
kdlib::DumpType getDumpType()
{
AutoRestorePyState pystate;
return kdlib::getDumpType();
}
inline
kdlib::DumpFormatFlagsSet getDumpFormat()
{
AutoRestorePyState pystate;
return kdlib::getDumpFormat();
}
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// processes end threads // processes end threads
@ -307,7 +279,6 @@ inline void setImplicitProcess(kdlib::MEMOFFSET_64 offset)
AutoRestorePyState pystate; AutoRestorePyState pystate;
kdlib::setImplicitProcess(offset); kdlib::setImplicitProcess(offset);
} }
inline kdlib::MEMOFFSET_64 getImplicitProcessOffset() inline kdlib::MEMOFFSET_64 getImplicitProcessOffset()
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;
@ -319,8 +290,6 @@ python::list getProcessThreads();
python::list getTargetProcesses(); python::list getTargetProcesses();
python::list getLocalProcesses(); python::list getLocalProcesses();
std::wstring getHostProcessPath();
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
inline inline
@ -487,9 +456,6 @@ kdlib::SyntheticSymbol addSyntheticSymbol( kdlib::MEMOFFSET_64 offset, unsigned
void removeSyntheticSymbol(const kdlib::SyntheticSymbol& syntheticSymbol); void removeSyntheticSymbol(const kdlib::SyntheticSymbol& syntheticSymbol);
std::wstring printSyntheticSymbol(const kdlib::SyntheticSymbol& syntheticSymbol); std::wstring printSyntheticSymbol(const kdlib::SyntheticSymbol& syntheticSymbol);
void addSyntheticModule(kdlib::MEMOFFSET_64 base, unsigned long size, const std::wstring &name, const std::wstring &path = std::wstring{});
void removeSyntheticModule(kdlib::MEMOFFSET_64 base);
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
} //end namespace pykd } //end namespace pykd

View File

@ -49,12 +49,6 @@ inline void dinput(const std::wstring &str)
kdlib::dinput(str); kdlib::dinput(str);
} }
inline void setStatusMessage(const std::wstring &str)
{
AutoRestorePyState pystate;
kdlib::setStatusMessage(str);
}
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DbgOut : public kdlib::windbg::WindbgOut class DbgOut : public kdlib::windbg::WindbgOut

View File

@ -468,7 +468,7 @@ void EventHandler::onChangeBreakpoints()
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
void EventHandler::onDebugOutput(const std::wstring& text, kdlib::OutputFlag flag) void EventHandler::onDebugOutput(const std::wstring& text)
{ {
PyEval_RestoreThread( m_pystate ); PyEval_RestoreThread( m_pystate );
@ -477,7 +477,7 @@ void EventHandler::onDebugOutput(const std::wstring& text, kdlib::OutputFlag fla
python::override pythonHandler = get_override("onDebugOutput"); python::override pythonHandler = get_override("onDebugOutput");
if ( pythonHandler ) if ( pythonHandler )
{ {
pythonHandler(text, flag); pythonHandler(text);
} }
} }
catch (const python::error_already_set &) catch (const python::error_already_set &)

View File

@ -28,21 +28,21 @@ public:
EventHandler(); EventHandler();
kdlib::DebugCallbackResult onBreakpoint( kdlib::BREAKPOINT_ID bpId ) override; virtual kdlib::DebugCallbackResult onBreakpoint( kdlib::BREAKPOINT_ID bpId );
kdlib::DebugCallbackResult onException( const kdlib::ExceptionInfo &exceptionInfo ) override; virtual kdlib::DebugCallbackResult onException( const kdlib::ExceptionInfo &exceptionInfo );
kdlib::DebugCallbackResult onModuleLoad( kdlib::MEMOFFSET_64 offset, const std::wstring &name ) override; virtual kdlib::DebugCallbackResult onModuleLoad( kdlib::MEMOFFSET_64 offset, const std::wstring &name );
kdlib::DebugCallbackResult onModuleUnload( kdlib::MEMOFFSET_64 offset, const std::wstring &name ) override; virtual kdlib::DebugCallbackResult onModuleUnload( kdlib::MEMOFFSET_64 offset, const std::wstring &name );
kdlib::DebugCallbackResult onThreadStart() override; virtual kdlib::DebugCallbackResult onThreadStart();
kdlib::DebugCallbackResult onThreadStop() override; virtual kdlib::DebugCallbackResult onThreadStop();
void onExecutionStatusChange(kdlib::ExecutionStatus executionStatus) override; virtual void onExecutionStatusChange(kdlib::ExecutionStatus executionStatus);
void onCurrentThreadChange(kdlib::THREAD_DEBUG_ID threadid) override; virtual void onCurrentThreadChange(kdlib::THREAD_DEBUG_ID threadid);
void onChangeLocalScope() override; virtual void onChangeLocalScope();
void onChangeSymbolPaths() override; virtual void onChangeSymbolPaths();
void onChangeBreakpoints() override; virtual void onChangeBreakpoints();
void onDebugOutput(const std::wstring& text, kdlib::OutputFlag flag) override; virtual void onDebugOutput(const std::wstring& text);
void onStartInput() override; virtual void onStartInput();
void onStopInput() override; virtual void onStopInput();
private: private:

View File

@ -9,14 +9,6 @@
<Configuration>Debug_2.7</Configuration> <Configuration>Debug_2.7</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug_3.10|Win32">
<Configuration>Debug_3.10</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_3.10|x64">
<Configuration>Debug_3.10</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_3.5|Win32"> <ProjectConfiguration Include="Debug_3.5|Win32">
<Configuration>Debug_3.5</Configuration> <Configuration>Debug_3.5</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
@ -41,22 +33,6 @@
<Configuration>Debug_3.7</Configuration> <Configuration>Debug_3.7</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug_3.8|Win32">
<Configuration>Debug_3.8</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_3.8|x64">
<Configuration>Debug_3.8</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_3.9|Win32">
<Configuration>Debug_3.9</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_3.9|x64">
<Configuration>Debug_3.9</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_2.7|Win32"> <ProjectConfiguration Include="Release_2.7|Win32">
<Configuration>Release_2.7</Configuration> <Configuration>Release_2.7</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
@ -65,14 +41,6 @@
<Configuration>Release_2.7</Configuration> <Configuration>Release_2.7</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release_3.10|Win32">
<Configuration>Release_3.10</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_3.10|x64">
<Configuration>Release_3.10</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_3.5|Win32"> <ProjectConfiguration Include="Release_3.5|Win32">
<Configuration>Release_3.5</Configuration> <Configuration>Release_3.5</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
@ -97,22 +65,6 @@
<Configuration>Release_3.7</Configuration> <Configuration>Release_3.7</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Release_3.8|Win32">
<Configuration>Release_3.8</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_3.8|x64">
<Configuration>Release_3.8</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_3.9|Win32">
<Configuration>Release_3.9</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_3.9|x64">
<Configuration>Release_3.9</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{C4C45791-0201-4406-BC5C-A384B01E3BF5}</ProjectGuid> <ProjectGuid>{C4C45791-0201-4406-BC5C-A384B01E3BF5}</ProjectGuid>
@ -156,30 +108,6 @@
<PythonVersion>3.7</PythonVersion> <PythonVersion>3.7</PythonVersion>
<LLVM_USE_CRT_DEBUG>MDd</LLVM_USE_CRT_DEBUG> <LLVM_USE_CRT_DEBUG>MDd</LLVM_USE_CRT_DEBUG>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.8|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PythonVersion>3.8</PythonVersion>
<LLVM_USE_CRT_DEBUG>MDd</LLVM_USE_CRT_DEBUG>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.9|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PythonVersion>3.9</PythonVersion>
<LLVM_USE_CRT_DEBUG>MDd</LLVM_USE_CRT_DEBUG>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.10|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PythonVersion>3.10</PythonVersion>
<LLVM_USE_CRT_DEBUG>MDd</LLVM_USE_CRT_DEBUG>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
@ -212,30 +140,6 @@
<PythonVersion>3.7</PythonVersion> <PythonVersion>3.7</PythonVersion>
<LLVM_USE_CRT_DEBUG>MDd</LLVM_USE_CRT_DEBUG> <LLVM_USE_CRT_DEBUG>MDd</LLVM_USE_CRT_DEBUG>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.8|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PythonVersion>3.8</PythonVersion>
<LLVM_USE_CRT_DEBUG>MDd</LLVM_USE_CRT_DEBUG>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.9|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PythonVersion>3.9</PythonVersion>
<LLVM_USE_CRT_DEBUG>MDd</LLVM_USE_CRT_DEBUG>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.10|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PythonVersion>3.10</PythonVersion>
<LLVM_USE_CRT_DEBUG>MDd</LLVM_USE_CRT_DEBUG>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
@ -272,33 +176,6 @@
<PythonVersion>3.7</PythonVersion> <PythonVersion>3.7</PythonVersion>
<LLVM_USE_CRT_RELEASE>MT</LLVM_USE_CRT_RELEASE> <LLVM_USE_CRT_RELEASE>MT</LLVM_USE_CRT_RELEASE>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.8|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PythonVersion>3.8</PythonVersion>
<LLVM_USE_CRT_RELEASE>MT</LLVM_USE_CRT_RELEASE>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.9|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PythonVersion>3.9</PythonVersion>
<LLVM_USE_CRT_RELEASE>MT</LLVM_USE_CRT_RELEASE>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.10|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PythonVersion>3.10</PythonVersion>
<LLVM_USE_CRT_RELEASE>MT</LLVM_USE_CRT_RELEASE>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
@ -335,33 +212,7 @@
<PythonVersion>3.7</PythonVersion> <PythonVersion>3.7</PythonVersion>
<LLVM_USE_CRT_RELEASE>MT</LLVM_USE_CRT_RELEASE> <LLVM_USE_CRT_RELEASE>MT</LLVM_USE_CRT_RELEASE>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.8|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PythonVersion>3.8</PythonVersion>
<LLVM_USE_CRT_RELEASE>MT</LLVM_USE_CRT_RELEASE>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.9|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PythonVersion>3.9</PythonVersion>
<LLVM_USE_CRT_RELEASE>MT</LLVM_USE_CRT_RELEASE>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.10|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PythonVersion>3.10</PythonVersion>
<LLVM_USE_CRT_RELEASE>MT</LLVM_USE_CRT_RELEASE>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
</ImportGroup> </ImportGroup>
@ -377,15 +228,6 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.7|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.7|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.8|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.9|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.10|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
@ -398,15 +240,6 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.7|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.7|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.8|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.9|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.10|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
@ -419,15 +252,6 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.7|Win32'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.7|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.8|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.9|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.10|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
@ -440,15 +264,6 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.7|x64'" Label="PropertySheets"> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.7|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.8|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.9|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.10|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros"> <PropertyGroup Label="UserMacros">
<NuGetPackageImportStamp>bb9fbdf7</NuGetPackageImportStamp> <NuGetPackageImportStamp>bb9fbdf7</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
@ -484,30 +299,6 @@
<IntDir>$(Platform)\$(Configuration)\</IntDir> <IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir> <OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.8|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetExt>.pyd</TargetExt>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
<TargetName>$(ProjectName)</TargetName>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.9|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetExt>.pyd</TargetExt>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
<TargetName>$(ProjectName)</TargetName>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.10|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetExt>.pyd</TargetExt>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
<TargetName>$(ProjectName)</TargetName>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|x64'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<TargetExt>.pyd</TargetExt> <TargetExt>.pyd</TargetExt>
@ -540,30 +331,6 @@
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir> <OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir> <IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.8|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetExt>.pyd</TargetExt>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
<TargetName>$(ProjectName)</TargetName>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.9|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetExt>.pyd</TargetExt>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
<TargetName>$(ProjectName)</TargetName>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.10|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetExt>.pyd</TargetExt>
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
<TargetName>$(ProjectName)</TargetName>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<TargetExt>.pyd</TargetExt> <TargetExt>.pyd</TargetExt>
@ -592,27 +359,6 @@
<IntDir>$(Platform)\$(Configuration)\</IntDir> <IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir> <OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.8|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetExt>.pyd</TargetExt>
<TargetName>$(ProjectName)</TargetName>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.9|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetExt>.pyd</TargetExt>
<TargetName>$(ProjectName)</TargetName>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.10|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetExt>.pyd</TargetExt>
<TargetName>$(ProjectName)</TargetName>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<TargetExt>.pyd</TargetExt> <TargetExt>.pyd</TargetExt>
@ -641,27 +387,6 @@
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir> <OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir> <IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.8|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetExt>.pyd</TargetExt>
<TargetName>$(ProjectName)</TargetName>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.9|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetExt>.pyd</TargetExt>
<TargetName>$(ProjectName)</TargetName>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.10|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetExt>.pyd</TargetExt>
<TargetName>$(ProjectName)</TargetName>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|Win32'">
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
@ -751,72 +476,6 @@
</Command> </Command>
</CustomBuildStep> </CustomBuildStep>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.8|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;BOOST_PYTHON_STATIC_LIB;BOOST_PYTHON_NO_LIB;_DEBUG;_WINDOWS;_USRDLL;PYKD_EXPORTS;%(PreprocessorDefinitions);BOOST_PYTHON_NUMPY_INTERNAL</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\kdlibcpp\kdlib\include;$(SolutionDir)\numpy\include;</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
<CustomBuildStep>
<Command>
</Command>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.9|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;BOOST_PYTHON_STATIC_LIB;BOOST_PYTHON_NO_LIB;_DEBUG;_WINDOWS;_USRDLL;PYKD_EXPORTS;%(PreprocessorDefinitions);BOOST_PYTHON_NUMPY_INTERNAL</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\kdlibcpp\kdlib\include;$(SolutionDir)\numpy\include;</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
<CustomBuildStep>
<Command>
</Command>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.10|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;BOOST_PYTHON_STATIC_LIB;BOOST_PYTHON_NO_LIB;_DEBUG;_WINDOWS;_USRDLL;PYKD_EXPORTS;%(PreprocessorDefinitions);BOOST_PYTHON_NUMPY_INTERNAL</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\kdlibcpp\kdlib\include;$(SolutionDir)\numpy\include;$(SolutionDir)packages\pythonx86.3.10.10\tools\include</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(SolutionDir)packages\pythonx86.3.10.10\tools\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
<CustomBuildStep>
<Command>
</Command>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|x64'">
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
@ -905,72 +564,6 @@
</Command> </Command>
</CustomBuildStep> </CustomBuildStep>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.8|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;BOOST_PYTHON_STATIC_LIB;BOOST_PYTHON_NO_LIB;_DEBUG;_WINDOWS;_USRDLL;PYKD_EXPORTS;%(PreprocessorDefinitions);BOOST_PYTHON_NUMPY_INTERNAL</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\kdlibcpp\kdlib\include;$(SolutionDir)\numpy\include;</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
<CustomBuildStep>
<Command>
</Command>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.9|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;BOOST_PYTHON_STATIC_LIB;BOOST_PYTHON_NO_LIB;_DEBUG;_WINDOWS;_USRDLL;PYKD_EXPORTS;%(PreprocessorDefinitions);BOOST_PYTHON_NUMPY_INTERNAL</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\kdlibcpp\kdlib\include;$(SolutionDir)\numpy\include;</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
<CustomBuildStep>
<Command>
</Command>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_3.10|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;BOOST_PYTHON_STATIC_LIB;BOOST_PYTHON_NO_LIB;_DEBUG;_WINDOWS;_USRDLL;PYKD_EXPORTS;%(PreprocessorDefinitions);BOOST_PYTHON_NUMPY_INTERNAL</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\kdlibcpp\kdlib\include;$(SolutionDir)\numpy\include;$(SolutionDir)packages\python.3.10.10\tools\include</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(SolutionDir)packages\python.3.10.10\tools\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
<CustomBuildStep>
<Command>
</Command>
</CustomBuildStep>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|Win32'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
@ -991,7 +584,7 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command> <Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.5|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.5|Win32'">
@ -1014,7 +607,7 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command> <Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.6|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.6|Win32'">
@ -1037,7 +630,7 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command> <Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.7|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.7|Win32'">
@ -1059,75 +652,6 @@
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile> <ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.8|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;BOOST_PYTHON_STATIC_LIB;BOOST_PYTHON_NO_LIB;NDEBUG;_WINDOWS;_USRDLL;PYKD_EXPORTS;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\kdlibcpp\kdlib\include;$(SolutionDir)\numpy\include;</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.9|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;BOOST_PYTHON_STATIC_LIB;BOOST_PYTHON_NO_LIB;NDEBUG;_WINDOWS;_USRDLL;PYKD_EXPORTS;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\kdlibcpp\kdlib\include;$(SolutionDir)\numpy\include;</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.10|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;BOOST_PYTHON_STATIC_LIB;BOOST_PYTHON_NO_LIB;NDEBUG;_WINDOWS;_USRDLL;PYKD_EXPORTS;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\kdlibcpp\kdlib\include;$(SolutionDir)\numpy\include;$(SolutionDir)packages\pythonx86.3.10.10\tools\include</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(SolutionDir)packages\pythonx86.3.10.10\tools\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent> <PostBuildEvent>
<Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command> <Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
</PostBuildEvent> </PostBuildEvent>
@ -1152,7 +676,7 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command> <Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.5|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.5|x64'">
@ -1175,7 +699,7 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command> <Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.6|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.6|x64'">
@ -1198,7 +722,7 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command> <Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.7|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.7|x64'">
@ -1220,75 +744,6 @@
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile> <ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.8|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;BOOST_PYTHON_STATIC_LIB;BOOST_PYTHON_NO_LIB;NDEBUG;_WINDOWS;_USRDLL;PYKD_EXPORTS;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\kdlibcpp\kdlib\include;$(SolutionDir)\numpy\include;</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.9|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;BOOST_PYTHON_STATIC_LIB;BOOST_PYTHON_NO_LIB;NDEBUG;_WINDOWS;_USRDLL;PYKD_EXPORTS;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\kdlibcpp\kdlib\include;$(SolutionDir)\numpy\include;</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.10|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;BOOST_PYTHON_STATIC_LIB;BOOST_PYTHON_NO_LIB;NDEBUG;_WINDOWS;_USRDLL;PYKD_EXPORTS;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)\kdlibcpp\kdlib\include;$(SolutionDir)\numpy\include;$(SolutionDir)packages\python.3.10.10\tools\include</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>pykd.def</ModuleDefinitionFile>
<AdditionalLibraryDirectories>$(SolutionDir)packages\python.3.10.10\tools\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent> <PostBuildEvent>
<Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command> <Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
</PostBuildEvent> </PostBuildEvent>
@ -1446,8 +901,6 @@
<Import Project="$(SolutionDir)\packages\Python35.3.5.1.1\build\python35.targets" Condition="'$(PythonVersion)'=='3.5' AND Exists('$(SolutionDir)\packages\Python35.3.5.1.1\build\python35.targets')" /> <Import Project="$(SolutionDir)\packages\Python35.3.5.1.1\build\python35.targets" Condition="'$(PythonVersion)'=='3.5' AND Exists('$(SolutionDir)\packages\Python35.3.5.1.1\build\python35.targets')" />
<Import Project="$(SolutionDir)\packages\Python36.3.6.0\build\python36.targets" Condition="'$(PythonVersion)'=='3.6' AND Exists('$(SolutionDir)\packages\Python36.3.6.0\build\python36.targets')" /> <Import Project="$(SolutionDir)\packages\Python36.3.6.0\build\python36.targets" Condition="'$(PythonVersion)'=='3.6' AND Exists('$(SolutionDir)\packages\Python36.3.6.0\build\python36.targets')" />
<Import Project="$(SolutionDir)\packages\Python37.1.0.0.1\build\python37.targets" Condition="'$(PythonVersion)'=='3.7' AND Exists('$(SolutionDir)\packages\Python37.1.0.0.1\build\python37.targets')" /> <Import Project="$(SolutionDir)\packages\Python37.1.0.0.1\build\python37.targets" Condition="'$(PythonVersion)'=='3.7' AND Exists('$(SolutionDir)\packages\Python37.1.0.0.1\build\python37.targets')" />
<Import Project="$(SolutionDir)\packages\Python38.3.8.0\build\python38.targets" Condition="'$(PythonVersion)'=='3.8' AND Exists('$(SolutionDir)\packages\Python38.3.8.0\build\python38.targets')" />
<Import Project="$(SolutionDir)\packages\Python39.3.9.0\build\python39.targets" Condition="'$(PythonVersion)'=='3.9' AND Exists('$(SolutionDir)\packages\Python39.3.9.0\build\python39.targets')" />
</ImportGroup> </ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
@ -1466,7 +919,5 @@
<Error Condition="!Exists('$(SolutionDir)\packages\Python35.3.5.1.1\build\python35.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Python35.3.5.1\build\python35.targets'))" /> <Error Condition="!Exists('$(SolutionDir)\packages\Python35.3.5.1.1\build\python35.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Python35.3.5.1\build\python35.targets'))" />
<Error Condition="!Exists('$(SolutionDir)\packages\Python36.3.6.0\build\python36.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Python36.3.6.0\build\python36.targets')" /> <Error Condition="!Exists('$(SolutionDir)\packages\Python36.3.6.0\build\python36.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Python36.3.6.0\build\python36.targets')" />
<Error Condition="!Exists('$(SolutionDir)\packages\Python37.1.0.0.1\build\python37.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Python37.1.0.0.1\build\python37.targets')" /> <Error Condition="!Exists('$(SolutionDir)\packages\Python37.1.0.0.1\build\python37.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Python37.1.0.0.1\build\python37.targets')" />
<Error Condition="!Exists('$(SolutionDir)\packages\Python38.3.8.0\build\python38.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Python38.3.8.0\build\python38.targets')" />
<Error Condition="!Exists('$(SolutionDir)\packages\Python39.3.9.0\build\python39.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Python39.3.9.0\build\python39.targets')" />
</Target> </Target>
</Project> </Project>

View File

@ -2,7 +2,7 @@
#define PYKD_VERSION_MAJOR 0 #define PYKD_VERSION_MAJOR 0
#define PYKD_VERSION_MINOR 3 #define PYKD_VERSION_MINOR 3
#define PYKD_VERSION_SUBVERSION 4 #define PYKD_VERSION_SUBVERSION 4
#define PYKD_VERSION_BUILDNO 15 #define PYKD_VERSION_BUILDNO 2
#define __VER_STR2__(x) #x #define __VER_STR2__(x) #x
#define __VER_STR1__(x) __VER_STR2__(x) #define __VER_STR1__(x) __VER_STR2__(x)

View File

@ -266,32 +266,8 @@ inline kdlib::MemoryProtect getVaProtect( kdlib::MEMOFFSET_64 offset )
return kdlib::getVaProtect(offset); return kdlib::getVaProtect(offset);
} }
inline kdlib::MemoryState getVaState(kdlib::MEMOFFSET_64 offset)
{
AutoRestorePyState pystate;
return kdlib::getVaState(offset);
}
inline kdlib::MemoryType getVaType(kdlib::MEMOFFSET_64 offset)
{
AutoRestorePyState pystate;
return kdlib::getVaType(offset);
}
inline python::tuple getVaAttributes(kdlib::MEMOFFSET_64 offset)
{
kdlib::MemoryProtect memProtect;
kdlib::MemoryState memState;
kdlib::MemoryType memType;
{
AutoRestorePyState pystate;
memProtect = kdlib::getVaProtect(offset);
memState = kdlib::getVaState(offset);
memType = kdlib::getVaType(offset);
}
return python::make_tuple(memProtect, memState, memType);
}
} // end namespace pykd } // end namespace pykd

View File

@ -36,13 +36,12 @@ static const std::string pykdVersion = PYKD_VERSION_BUILD_STR
BOOST_PYTHON_FUNCTION_OVERLOADS( startProcess_, pykd::startProcess, 1, 2 ); BOOST_PYTHON_FUNCTION_OVERLOADS( startProcess_, pykd::startProcess, 1, 2 );
BOOST_PYTHON_FUNCTION_OVERLOADS( attachProcess_, pykd::attachProcess, 1, 2);
BOOST_PYTHON_FUNCTION_OVERLOADS( detachProcess_, pykd::detachProcess, 0, 1 ); BOOST_PYTHON_FUNCTION_OVERLOADS( detachProcess_, pykd::detachProcess, 0, 1 );
BOOST_PYTHON_FUNCTION_OVERLOADS( terminateProcess_, pykd::terminateProcess, 0, 1 ); BOOST_PYTHON_FUNCTION_OVERLOADS( terminateProcess_, pykd::terminateProcess, 0, 1 );
BOOST_PYTHON_FUNCTION_OVERLOADS(closeDump_, pykd::closeDump, 0, 1); BOOST_PYTHON_FUNCTION_OVERLOADS(closeDump_, pykd::closeDump, 0, 1);
BOOST_PYTHON_FUNCTION_OVERLOADS( attachKernel_, pykd::attachKernel, 0, 1 ); BOOST_PYTHON_FUNCTION_OVERLOADS( attachKernel_, pykd::attachKernel, 0, 1 );
BOOST_PYTHON_FUNCTION_OVERLOADS( evaluate_, pykd::evaluate, 1, 2 ); BOOST_PYTHON_FUNCTION_OVERLOADS( evaluate_, pykd::evaluate, 1, 2 );
BOOST_PYTHON_FUNCTION_OVERLOADS( debugCommand_, pykd::debugCommand, 1, 3 ); BOOST_PYTHON_FUNCTION_OVERLOADS( debugCommand_, pykd::debugCommand, 1, 2 );
BOOST_PYTHON_FUNCTION_OVERLOADS( dprint_, pykd::dprint, 1, 2 ); BOOST_PYTHON_FUNCTION_OVERLOADS( dprint_, pykd::dprint, 1, 2 );
BOOST_PYTHON_FUNCTION_OVERLOADS( dprintln_, pykd::dprintln, 1, 2 ); BOOST_PYTHON_FUNCTION_OVERLOADS( dprintln_, pykd::dprintln, 1, 2 );
@ -78,7 +77,6 @@ BOOST_PYTHON_FUNCTION_OVERLOADS( getSourceFile_, pykd::getSourceFile, 0, 1 );
BOOST_PYTHON_FUNCTION_OVERLOADS( getSourceFileFromSrcSrv_, pykd::getSourceFileFromSrcSrv, 0, 1 ); BOOST_PYTHON_FUNCTION_OVERLOADS( getSourceFileFromSrcSrv_, pykd::getSourceFileFromSrcSrv, 0, 1 );
BOOST_PYTHON_FUNCTION_OVERLOADS( getSourceLine_, pykd::getSourceLine, 0, 1 ); BOOST_PYTHON_FUNCTION_OVERLOADS( getSourceLine_, pykd::getSourceLine, 0, 1 );
BOOST_PYTHON_FUNCTION_OVERLOADS( findSymbol_, pykd::findSymbol, 1, 2 ); BOOST_PYTHON_FUNCTION_OVERLOADS( findSymbol_, pykd::findSymbol, 1, 2 );
BOOST_PYTHON_FUNCTION_OVERLOADS( getStack_, pykd::getStack, 0, 1);
BOOST_PYTHON_FUNCTION_OVERLOADS( getProcessOffset_, pykd::getProcessOffset, 0, 1); BOOST_PYTHON_FUNCTION_OVERLOADS( getProcessOffset_, pykd::getProcessOffset, 0, 1);
BOOST_PYTHON_FUNCTION_OVERLOADS( getProcessSystemId_, pykd::getProcessSystemId, 0, 1); BOOST_PYTHON_FUNCTION_OVERLOADS( getProcessSystemId_, pykd::getProcessSystemId, 0, 1);
@ -106,10 +104,6 @@ BOOST_PYTHON_FUNCTION_OVERLOADS( TypeInfo_ptrTo, TypeInfoAdapter::ptrTo, 1, 2 );
BOOST_PYTHON_FUNCTION_OVERLOADS( getTypeFromSource_, pykd::getTypeFromSource, 2, 3 ); BOOST_PYTHON_FUNCTION_OVERLOADS( getTypeFromSource_, pykd::getTypeFromSource, 2, 3 );
BOOST_PYTHON_FUNCTION_OVERLOADS( getTypeInfoProviderFromPdb_, pykd::getTypeInfoProviderFromPdb, 1, 2 ); BOOST_PYTHON_FUNCTION_OVERLOADS( getTypeInfoProviderFromPdb_, pykd::getTypeInfoProviderFromPdb, 1, 2 );
BOOST_PYTHON_FUNCTION_OVERLOADS( getTypeInfoProviderFromSource_, pykd::getTypeInfoProviderFromSource, 1, 2); BOOST_PYTHON_FUNCTION_OVERLOADS( getTypeInfoProviderFromSource_, pykd::getTypeInfoProviderFromSource, 1, 2);
BOOST_PYTHON_FUNCTION_OVERLOADS( getSymbolProviderFromSource_, pykd::getSymbolProviderFromSource, 1, 2);
BOOST_PYTHON_FUNCTION_OVERLOADS(evalExpr_, pykd::evalExpr, 1, 3);
BOOST_PYTHON_FUNCTION_OVERLOADS( addSyntheticModule_, pykd::addSyntheticModule, 3, 4 );
namespace pykd { namespace pykd {
@ -163,8 +157,8 @@ void pykd_init()
python::def( "startProcess", pykd::startProcess, startProcess_( boost::python::args( "commandline", "debugOptions"), python::def( "startProcess", pykd::startProcess, startProcess_( boost::python::args( "commandline", "debugOptions"),
"Start process for debugging" ) ); "Start process for debugging" ) );
python::def("attachProcess", pykd::attachProcess, attachProcess_(boost::python::args("pid", "debugOptions"), python::def("attachProcess", pykd::attachProcess,
"Attach debugger to a existing process")); "Attach debugger to a exsisting process");
python::def( "detachProcess", pykd::detachProcess, detachProcess_( boost::python::args( "id" ), python::def( "detachProcess", pykd::detachProcess, detachProcess_( boost::python::args( "id" ),
"Stop process debugging") ); "Stop process debugging") );
python::def( "detachAllProcesses", pykd::detachAllProcesses, python::def( "detachAllProcesses", pykd::detachAllProcesses,
@ -191,30 +185,19 @@ void pykd_init()
python::def( "writeDump", pykd::writeDump, python::def( "writeDump", pykd::writeDump,
"Create memory dump file" ); "Create memory dump file" );
python::def( "getLocalProcesses", pykd::getLocalProcesses, python::def( "getLocalProcesses", pykd::getLocalProcesses,
"Return list of running processes on the host system" ); "Return list of runnng processes on the host system" );
python::def("getHostProcessPath", pykd::getHostProcessPath,
"Return image path of the process running python interpreter with a pykd");
python::def( "getDebugOptions", pykd::getDebugOptions, python::def( "getDebugOptions", pykd::getDebugOptions,
"Return debug options" ); "Return debug options" );
python::def( "changeDebugOptions", pykd::changeDebugOptions, python::def( "changeDebugOptions", pykd::changeDebugOptions,
"Change debug options" ); "Change debug options" );
python::def("getOutputMask", pykd::getOutputMask,
"Get output mask");
python::def("setOutputMask", pykd::setOutputMask,
"Set output mask");
python::def("getDumpType", pykd::getDumpType,
"Return type of the dump");
python::def("getDumpFormat", pykd::getDumpFormat,
"Return format the dump");
python::def( "breakin", pykd::targetBreak, python::def( "breakin", pykd::targetBreak,
"Break into debugger" ); "Break into debugger" );
python::def( "expr", pykd::evaluate, evaluate_( python::args( "expression", "cplusplus" ), python::def( "expr", pykd::evaluate, evaluate_( python::args( "expression", "cplusplus" ),
"Evaluate windbg expression" ) ); "Evaluate windbg expression" ) );
python::def( "dbgCommand", &pykd::debugCommand, debugCommand_( python::args( python::def( "dbgCommand", &pykd::debugCommand,
"command", "suppressOutput", "outputMask"), debugCommand_( python::args( "command", "suppressOutput"), "Run a debugger's command and return it's result as a string" ) );
"Run a debugger's command and return it's result as a string. You can set additional outputMask" \
"if you want to get also error messages" ) );
python::def( "go", pykd::targetGo, python::def( "go", pykd::targetGo,
"Go debugging" ); "Go debugging" );
python::def( "step", pykd::targetStep, python::def( "step", pykd::targetStep,
@ -222,7 +205,7 @@ void pykd_init()
python::def( "trace", pykd::targetStepIn, python::def( "trace", pykd::targetStepIn,
"The target is executing a single instruction" ); "The target is executing a single instruction" );
python::def("stepout", pykd::targetStepOut, python::def("stepout", pykd::targetStepOut,
"The target is executing while not returned from the current subroutine"); "The traget is executing while not returned from the current subroutine");
python::def("sourceStep", pykd::sourceStep, python::def("sourceStep", pykd::sourceStep,
"The target is executing a single source line"); "The target is executing a single source line");
python::def("sourceStepOver", pykd::sourceStepOver, python::def("sourceStepOver", pykd::sourceStepOver,
@ -237,8 +220,6 @@ void pykd_init()
"Print out string and insert end of line symbol. If dml = True string is printed with dml highlighting ( only for windbg )" ) ); "Print out string and insert end of line symbol. If dml = True string is printed with dml highlighting ( only for windbg )" ) );
python::def("dinput", &pykd::dinput, python::def("dinput", &pykd::dinput,
"Provide input for debugger"); "Provide input for debugger");
python::def("setStatusMessage", &pykd::setStatusMessage,
"Set message at a windbg status bar");
// Python debug output console helper classes // Python debug output console helper classes
@ -278,7 +259,7 @@ void pykd_init()
python::def( "isValid", pykd::isVaValid, python::def( "isValid", pykd::isVaValid,
"Check if the virtual address is valid" ); "Check if the virtual address is valid" );
python::def("isVaRegionValid", pykd::isVaRegionValid, python::def("isVaRegionValid", pykd::isVaRegionValid,
"Check if the virtual addresses region is valid"); "Check if the virtaul addresses region is valid");
python::def( "compareMemory", pykd::compareMemory, compareMemory_( python::args( "offset1", "offset2", "length", "phyAddr" ), python::def( "compareMemory", pykd::compareMemory, compareMemory_( python::args( "offset1", "offset2", "length", "phyAddr" ),
"Compare two memory buffers by virtual or physical addresses" ) ); "Compare two memory buffers by virtual or physical addresses" ) );
python::def( "searchMemory", pykd::searchMemoryLst, python::def( "searchMemory", pykd::searchMemoryLst,
@ -286,15 +267,9 @@ void pykd_init()
python::def( "searchMemory", pykd::searchMemoryStr, python::def( "searchMemory", pykd::searchMemoryStr,
"Search in virtual memory" ); "Search in virtual memory" );
python::def( "findMemoryRegion", pykd::findMemoryRegion, python::def( "findMemoryRegion", pykd::findMemoryRegion,
"Return address of beginning valid memory region nearest to offset" ); "Return address of begining valid memory region nearest to offset" );
python::def( "getVaProtect", pykd::getVaProtect, python::def( "getVaProtect", pykd::getVaProtect,
"Return memory protect" ); "Return memory attributes" );
python::def( "getVaType", pykd::getVaType,
"Return memory type");
python::def( "getVaState", pykd::getVaState,
"Return memory state");
python::def("getVaAttributes", pykd::getVaAttributes,
"Return memory attributes");
python::def( "ptrByte", pykd::ptrByte, python::def( "ptrByte", pykd::ptrByte,
"Read an unsigned 1-byte integer from the target memory" ); "Read an unsigned 1-byte integer from the target memory" );
@ -367,9 +342,9 @@ void pykd_init()
python::def( "loadWStr", pykd::loadWStr, python::def( "loadWStr", pykd::loadWStr,
"Load string from the target buffer containing 0-terminated unicode-string" ); "Load string from the target buffer containing 0-terminated unicode-string" );
python::def( "loadUnicodeString", pykd::loadUnicodeStr, python::def( "loadUnicodeString", pykd::loadUnicodeStr,
"Return string representation of windows UNICODE_STRING type" ); "Return string represention of windows UNICODE_STRING type" );
python::def( "loadAnsiString", pykd::loadAnsiStr, python::def( "loadAnsiString", pykd::loadAnsiStr,
"Return string representation of windows ANSI_STRING type" ); "Return string represention of windows ANSI_STRING type" );
python::def( "loadFloats", pykd::loadFloats, loadFloats_( python::args( "offset", "count", "phyAddr" ), python::def( "loadFloats", pykd::loadFloats, loadFloats_( python::args( "offset", "count", "phyAddr" ),
"Read the block of the target's memory and return it as list of floats" ) ); "Read the block of the target's memory and return it as list of floats" ) );
python::def( "loadDoubles", pykd::loadDoubles, loadDoubles_( python::args( "offset", "count", "phyAddr" ), python::def( "loadDoubles", pykd::loadDoubles, loadDoubles_( python::args( "offset", "count", "phyAddr" ),
@ -411,7 +386,7 @@ void pykd_init()
python::def( "setPtr", pykd::setPtr, python::def( "setPtr", pykd::setPtr,
"Write an pointer value to the target memory" ); "Write an pointer value to the target memory" );
// types and variables // types and vaiables
python::def( "getSourceFile", pykd::getSourceFile, getSourceFile_( python::args( "offset"), python::def( "getSourceFile", pykd::getSourceFile, getSourceFile_( python::args( "offset"),
"Return source file by the specified offset" ) ); "Return source file by the specified offset" ) );
python::def("getSourceFileFromSrcSrv", pykd::getSourceFileFromSrcSrv, getSourceFileFromSrcSrv_(python::args("offset"), python::def("getSourceFileFromSrcSrv", pykd::getSourceFileFromSrcSrv, getSourceFileFromSrcSrv_(python::args("offset"),
@ -420,7 +395,7 @@ void pykd_init()
"Return source file name, line and displacement by the specified offset" ) ); "Return source file name, line and displacement by the specified offset" ) );
python::def( "getOffset", pykd::getSymbolOffset, python::def( "getOffset", pykd::getSymbolOffset,
"Return target virtual address for specified symbol" ); "Return traget virtual address for specified symbol" );
python::def( "findSymbol", pykd::findSymbol, findSymbol_( python::args( "offset", "showDisplacement"), python::def( "findSymbol", pykd::findSymbol, findSymbol_( python::args( "offset", "showDisplacement"),
"Find symbol by the target virtual memory offset" ) ); "Find symbol by the target virtual memory offset" ) );
python::def("findSymbolAndDisp", pykd::findSymbolAndDisp, python::def("findSymbolAndDisp", pykd::findSymbolAndDisp,
@ -454,18 +429,13 @@ void pykd_init()
python::def( "getTypeFromSource", &pykd::getTypeFromSource, getTypeFromSource_( python::args("sourceCode", "typeName", "compileOptions"), python::def( "getTypeFromSource", &pykd::getTypeFromSource, getTypeFromSource_( python::args("sourceCode", "typeName", "compileOptions"),
"Create typeInfo class from C/C++ source code") ); "Create typeInfo class from C/C++ source code") );
python::def( "getTypeInfoProviderFromSource", &pykd::getTypeInfoProviderFromSource, getTypeInfoProviderFromSource_( python::args("sourceCode", "compileOptions"), python::def( "getTypeInfoProviderFromSource", &pykd::getTypeInfoProviderFromSource, getTypeInfoProviderFromSource_( python::args("sourceCode", "compileOptions"),
"Create typeInfo provider from C/C++ source code") ); "Create typeInfo provider from C/C++ source code") );
python::def( "getTypeInfoProviderFromPdb", &pykd::getTypeInfoProviderFromPdb, getTypeInfoProviderFromPdb_( python::args("filePath", "baseOffset"), python::def( "getTypeInfoProviderFromPdb", &pykd::getTypeInfoProviderFromPdb, getTypeInfoProviderFromPdb_( python::args("filePath", "baseOffset"),
"Create typeInfo provider from pdb file") ); "Create typeInfo provider from pdb file") );
python::def("getSymbolProviderFromSource", &pykd::getSymbolProviderFromSource, getSymbolProviderFromSource_(python::args("sourceCode", "compileOptions"),
"Create symbol provider for source code"));
python::def("evalExpr", &pykd::evalExpr, evalExpr_(python::args("expression", "scope", "typeProvider"),
"Evaluate C++ expression with typed information"));
// CPU registers // CPU registers
python::def( "reg", pykd::getRegisterByName, python::def( "reg", pykd::getRegisterByName,
"Return a CPU register value by the register's name" ); "Return a CPU regsiter value by the register's name" );
python::def( "reg", pykd::getRegisterByIndex, python::def( "reg", pykd::getRegisterByIndex,
"Return a CPU register value by the register's number"); "Return a CPU register value by the register's number");
python::def( "setReg", pykd::setRegisterByName, python::def( "setReg", pykd::setRegisterByName,
@ -502,8 +472,8 @@ void pykd_init()
"Switch processor mode ( X86 <-> X64 )" ); "Switch processor mode ( X86 <-> X64 )" );
// stack and local variables // stack and local variables
python::def( "getStack", pykd::getStack, getStack_(python::args("inlineFrames"), python::def( "getStack", pykd::getCurrentStack,
"Return a current stack as a list of stackFrame objects" ) ); "Return a current stack as a list of stackFrame objects" );
python::def( "getFrame", pykd::getCurrentFrame, python::def( "getFrame", pykd::getCurrentFrame,
"Return a current stack frame" ); "Return a current stack frame" );
python::def("getFrameNumber", pykd::getCurrentFrameNumber, python::def("getFrameNumber", pykd::getCurrentFrameNumber,
@ -533,7 +503,7 @@ void pykd_init()
// breakpoints // breakpoints
python::def( "setBp", &Breakpoint::setSoftwareBreakpoint, python::def( "setBp", &Breakpoint::setSoftwareBreakpoint,
setSoftwareBreakpoint_( python::args( "offset", "callback" ),"Set software breakpoint on execution" )[python::return_value_policy<python::manage_new_object>()]); setSoftwareBreakpoint_( python::args( "offset", "callback" ),"Set software breakpoint on executiont" )[python::return_value_policy<python::manage_new_object>()]);
python::def( "setBp", &Breakpoint::setHardwareBreakpoint, python::def( "setBp", &Breakpoint::setHardwareBreakpoint,
setHardwareBreakpoint_( python::args( "offset", "size", "accsessType", "callback" ),"Set hardware breakpoint")[python::return_value_policy<python::manage_new_object>()]); setHardwareBreakpoint_( python::args( "offset", "size", "accsessType", "callback" ),"Set hardware breakpoint")[python::return_value_policy<python::manage_new_object>()]);
python::def("getNumberBreakpoints", &Breakpoint::getNumberBreakpoints, python::def("getNumberBreakpoints", &Breakpoint::getNumberBreakpoints,
@ -584,7 +554,7 @@ void pykd_init()
python::def( "getThreadSystemID", pykd::getThreadSystemId, getThreadSystemId_( python::args("Id"), python::def( "getThreadSystemID", pykd::getThreadSystemId, getThreadSystemId_( python::args("Id"),
"Return system thread ID ( TID )" ) ); "Return system thread ID ( TID )" ) );
python::def( "getThreadIdByOffset", pykd::getThreadIdByOffset, python::def( "getThreadIdByOffset", pykd::getThreadIdByOffset,
"Return thread ID by the location in the target's memory of the thread structure" ); "Return thread ID by the location in the targ et's memory of the thread structure" );
python::def( "getThreadIdBySystemID", pykd::getThreadIdBySystemId, getThreadIdBySystemId_( python::args("Tid"), python::def( "getThreadIdBySystemID", pykd::getThreadIdBySystemId, getThreadIdBySystemId_( python::args("Tid"),
"Return thread ID by the system's thread ID ( TID )" ) ); "Return thread ID by the system's thread ID ( TID )" ) );
python::def( "getCurrentThread", pykd::getCurrentThread, python::def( "getCurrentThread", pykd::getCurrentThread,
@ -608,7 +578,7 @@ void pykd_init()
python::def("getLastEvent", pykd::getLastEvent, python::def("getLastEvent", pykd::getLastEvent,
"Get last debug event information"); "Get last debug event information");
python::def("getLastException", pykd::getLastException, python::def("getLastException", pykd::getLastException,
"Get last exception information"); "Get last exception information");
// symbol path // symbol path
python::def("getSymbolPath", pykd::getSymbolPath, python::def("getSymbolPath", pykd::getSymbolPath,
@ -625,18 +595,13 @@ void pykd_init()
python::def("appendSrcPath", pykd::appendSrcPath, python::def("appendSrcPath", pykd::appendSrcPath,
"Append current source path"); "Append current source path");
// synthetic symbol // synthetic symbol
python::def("addSyntheticSymbol", pykd::addSyntheticSymbol, python::def("addSyntheticSymbol", pykd::addSyntheticSymbol,
"The addSyntheticSymbol function adds a synthetic symbol to a module in the current process\n" "The addSyntheticSymbol function adds a synthetic symbol to a module in the current process\n"
"Note: reloading the symbols for the module deletes all synthetic symbols associated with that module."); "Note: reloading the symbols for the module deletes all synthetic symbols associated with that module.");
python::def( "removeSyntheticSymbol", pykd::removeSyntheticSymbol, python::def( "removeSyntheticSymbol", pykd::removeSyntheticSymbol,
"The removeSyntheticSymbol function removes a synthetic symbol from a module in the current process" ); "The removeSyntheticSymbol function removes a synthetic symbol from a module in the current proces" );
// synthetic module
python::def("addSyntheticModule", pykd::addSyntheticModule, addSyntheticModule_(python::args("base", "size", "name", "path"),
"The addSyntheticModule function adds a synthetic module to the module list the debugger maintains for the current process"));
python::def("removeSyntheticModule", pykd::removeSyntheticModule,
"The removeSyntheticModule function removes a synthetic module from the module list the debugger maintains for the current process");
// secondary callback data // secondary callback data
python::def("enumTagged", pykd::enumTagged, python::def("enumTagged", pykd::enumTagged,
@ -714,7 +679,7 @@ void pykd_init()
.def("isDumpAnalyzing", TargetSystemAdapter::isDumpAnalyzing, .def("isDumpAnalyzing", TargetSystemAdapter::isDumpAnalyzing,
"Check if it is a dump analyzing ( not living debuggee )") "Check if it is a dump analyzing ( not living debuggee )")
.def("isKernelDebugging", TargetSystemAdapter::isKernelDebugging, .def("isKernelDebugging", TargetSystemAdapter::isKernelDebugging,
"Check if kernel debugging is running") "Check if kernel dubugging is running")
.def("is64bitSystem", TargetSystemAdapter::is64bitSystem, .def("is64bitSystem", TargetSystemAdapter::is64bitSystem,
"Check if 64 bit system running" ) "Check if 64 bit system running" )
.def("isCurrent", TargetSystemAdapter::isCurrent, .def("isCurrent", TargetSystemAdapter::isCurrent,
@ -744,7 +709,7 @@ void pykd_init()
.def("getProcessById", TargetProcessAdapter::getProcessById, .def("getProcessById", TargetProcessAdapter::getProcessById,
"Return process by id").staticmethod("getProcessById") "Return process by id").staticmethod("getProcessById")
.add_property("systemID", TargetProcessAdapter::getSystemId, .add_property("systemID", TargetProcessAdapter::getSystemId,
"Return system process ID ( PID )" ) "Retrun system process ID ( PID )" )
.add_property("id", TargetProcessAdapter::getId, .add_property("id", TargetProcessAdapter::getId,
"Return process id") "Return process id")
.add_property("peb", TargetProcessAdapter::getPebOffset, .add_property("peb", TargetProcessAdapter::getPebOffset,
@ -754,7 +719,7 @@ void pykd_init()
.def("isCurrent", TargetProcessAdapter::isCurrent, .def("isCurrent", TargetProcessAdapter::isCurrent,
"Check if the target is current") "Check if the target is current")
.def("isManaged", TargetProcessAdapter::isManaged, .def("isManaged", TargetProcessAdapter::isManaged,
"Check if the target process is managed") "Check if the taget process is managed")
.def("getNumberThreads", TargetProcessAdapter::getNumberThreads, .def("getNumberThreads", TargetProcessAdapter::getNumberThreads,
"Return number of threads for this process" ) "Return number of threads for this process" )
.def("getThread", TargetProcessAdapter::getThreadByIndex, .def("getThread", TargetProcessAdapter::getThreadByIndex,
@ -804,7 +769,7 @@ void pykd_init()
.add_property("id", TargetThreadAdapter::getId, .add_property("id", TargetThreadAdapter::getId,
"Return thread's id") "Return thread's id")
.add_property("systemID", TargetThreadAdapter::getSystemId, .add_property("systemID", TargetThreadAdapter::getSystemId,
"Return system thread ID ( TID )" ) "Retrun system thread ID ( TID )" )
.add_property("teb", TargetThreadAdapter::getTebOffset, .add_property("teb", TargetThreadAdapter::getTebOffset,
"Return TEB address" ) "Return TEB address" )
.add_property( "ip", TargetThreadAdapter::getIP, .add_property( "ip", TargetThreadAdapter::getIP,
@ -824,7 +789,7 @@ void pykd_init()
.def("isCurrent", TargetThreadAdapter::isCurrent, .def("isCurrent", TargetThreadAdapter::isCurrent,
"Check if this thread is current") "Check if this thread is current")
.def("stack", TargetThreadAdapter::getStack, .def("stack", TargetThreadAdapter::getStack,
"Get thread's stack trace") "Get thread's stack tarce")
.def("__str__", TargetThreadAdapter::print) .def("__str__", TargetThreadAdapter::print)
; ;
@ -905,63 +870,44 @@ void pykd_init()
"Return tuple of the module's file version") "Return tuple of the module's file version")
.def("getFixedFileInfo", ModuleAdapter::getFixedFileInfo, .def("getFixedFileInfo", ModuleAdapter::getFixedFileInfo,
"Return FixedFileInfo" ) "Return FixedFileInfo" )
.def("hasSymbol", ModuleAdapter::isContainedSymbol, .def("__getattr__", ModuleAdapter::getSymbolVaAttr,
"Check if a module has the specified symbol") "Return address of the symbol" )
.def("__getattr__", ModuleAdapter::getAttrByName,
"Return symbol offset or type as attribute" )
.def("__getitem__", ModuleAdapter::getItemByKey,
"Return symbol offset or type as item" )
.def("__contains__", ModuleAdapter::isContainedSymbol)
.def( "__str__", &ModuleAdapter::print ); .def( "__str__", &ModuleAdapter::print );
python::class_<kdlib::TypeInfo, kdlib::TypeInfoPtr, python::bases<kdlib::NumConvertable>, boost::noncopyable >("typeInfo", "Class representing typeInfo", python::no_init) python::class_<kdlib::TypeInfo, kdlib::TypeInfoPtr, python::bases<kdlib::NumConvertable>, boost::noncopyable >("typeInfo", "Class representing typeInfo", python::no_init )
.def("__init__", python::make_constructor(pykd::getTypeInfoByName)) .def("__init__", python::make_constructor( pykd::getTypeInfoByName ) )
.def("name", TypeInfoAdapter::getName, .def( "name", TypeInfoAdapter::getName,
"Return type name") "Return type name" )
.def("scopeName", TypeInfoAdapter::getScopeName, .def("scopeName", TypeInfoAdapter::getScopeName,
"Return name of type scope ( module name )") "Return name of type scope ( module name )" )
.def("size", TypeInfoAdapter::getSize, .def( "size", TypeInfoAdapter::getSize,
"Return type size") "Return type size" )
.def("staticOffset", TypeInfoAdapter::getStaticOffset, .def( "staticOffset", TypeInfoAdapter::getStaticOffset,
"Return offset of the static field") "Return offset of the static field" )
.def("fieldOffset", TypeInfoAdapter::getElementOffset, .def( "fieldOffset", TypeInfoAdapter::getElementOffset,
"Return offset of the nonstatic field") "Return offset of the nonstatic field" )
.def("fieldOffset", TypeInfoAdapter::getElementOffsetByIndex, .def("fieldOffset", TypeInfoAdapter::getElementOffsetByIndex,
"Return offset of the nonstatic field by index") "Return offset of the nonstatic field by index")
.def("isStaticField", TypeInfoAdapter::isStaticField, .def( "bitOffset", TypeInfoAdapter::getBitOffset,
"Return True if a field is a static field by field name") "Return bit field's offset" )
.def("isStaticField", TypeInfoAdapter::isStaticFieldByIndex, .def( "bitWidth", TypeInfoAdapter::getBitWidth,
"Return True if a field is a static field by field index") "Return bit field's length" )
.def("isConstField", TypeInfoAdapter::isConstField, .def( "getNumberFields", TypeInfoAdapter::getElementCount,
"Return True if a field is a const field by field name") "Return number of fields" )
.def("isConstField", TypeInfoAdapter::isConstFieldByIndex, .def( "field", TypeInfoAdapter::getElementByIndex,
"Return True if a field is a const field by field index") "Return field's type by index" )
.def("bitOffset", TypeInfoAdapter::getBitOffset, .def( "field", TypeInfoAdapter::getElementByName,
"Return bit field's offset") "Return field's type" )
.def("bitWidth", TypeInfoAdapter::getBitWidth,
"Return bit field's length")
.def("getNumberFields", TypeInfoAdapter::getElementCount,
"Return number of fields")
.def("field", TypeInfoAdapter::getElementByIndex,
"Return field's type by index")
.def("field", TypeInfoAdapter::getElementByName,
"Return field's type")
.def("hasField", TypeInfoAdapter::hasField,
"Return True if type has a field with the specified name")
.def( "fieldName", TypeInfoAdapter::getElementName, .def( "fieldName", TypeInfoAdapter::getElementName,
"Return name of struct field by index" ) "Return name of struct field by index" )
.def( "fields", TypeInfoAdapter::getFields, .def( "fields", TypeInfoAdapter::getFields,
"Return list of tuple ( filedName, fieldType )" ) "Return list of tuple ( filedName, fieldType )" )
.def( "members", TypeInfoAdapter::getMembers,
"Return list of tuple ( memberName, fieldType ). Only defined member, not inherited from base class")
.def( "getNumberMethods", TypeInfoAdapter::getMethodsCount, .def( "getNumberMethods", TypeInfoAdapter::getMethodsCount,
"Return number of methods" ) "Return number of methods" )
.def( "method", TypeInfoAdapter::getMethodByName, .def( "method", TypeInfoAdapter::getMethodByName,
"Return method's type by name") "Return method's type by name")
.def( "method", TypeInfoAdapter::getMethodByIndex, .def( "method", TypeInfoAdapter::getMethodByIndex,
"Return method's by index") "Return method's by index")
.def( "hasMethod", TypeInfoAdapter::hasMethod,
"Return True if type has a method with the specified name")
.def( "methodName", TypeInfoAdapter::getMethodName, .def( "methodName", TypeInfoAdapter::getMethodName,
"Return method's name") "Return method's name")
.def( "methods", TypeInfoAdapter::getMethods, .def( "methods", TypeInfoAdapter::getMethods,
@ -978,8 +924,6 @@ void pykd_init()
"Return a base class offset by index") "Return a base class offset by index")
.def("baseClasses", TypeInfoAdapter::getBaseClasses, .def("baseClasses", TypeInfoAdapter::getBaseClasses,
"Return list of tuples ( baseClassName, baseClassOffset, baseClassType)") "Return list of tuples ( baseClassName, baseClassOffset, baseClassType)")
.def( "getTemplateArgs", TypeInfoAdapter::getTemplateArgs,
"Return list if template arguments" )
.def( "deref", TypeInfoAdapter::deref, .def( "deref", TypeInfoAdapter::deref,
"Return type of pointer" ) "Return type of pointer" )
.def( "append", TypeInfoAdapter::appendField, .def( "append", TypeInfoAdapter::appendField,
@ -1010,8 +954,6 @@ void pykd_init()
"Return true if no type is specified" ) "Return true if no type is specified" )
.def( "isNoType", TypeInfoAdapter::isNoType, .def( "isNoType", TypeInfoAdapter::isNoType,
"Return true if type is virtual table" ) "Return true if type is virtual table" )
.def( "isTemplate", TypeInfoAdapter::isTemplate,
"Return true if type is template" )
.def( "getCallingConvention", TypeInfoAdapter::getCallingConvention, .def( "getCallingConvention", TypeInfoAdapter::getCallingConvention,
"Returns an indicator of a methods calling convention: callingConvention" ) "Returns an indicator of a methods calling convention: callingConvention" )
.def( "getClassParent", TypeInfoAdapter::getClassParent, .def( "getClassParent", TypeInfoAdapter::getClassParent,
@ -1025,9 +967,8 @@ void pykd_init()
.def( "__getitem__", TypeInfoAdapter::getElementByIndex ) .def( "__getitem__", TypeInfoAdapter::getElementByIndex )
.def( "__getitem__", TypeInfoAdapter::getElementByKey ) .def( "__getitem__", TypeInfoAdapter::getElementByKey )
.def( "__dir__", TypeInfoAdapter::getElementDir ) .def( "__dir__", TypeInfoAdapter::getElementDir )
.def("__contains__", TypeInfoAdapter::hasFieldOrMethod)
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
.def("__bool__", TypeInfoAdapter::isNotZero ) .def("__bool__", TypeInfoAdapter::isZero )
#else #else
.def("__iszero__", TypeInfoAdapter::isZero ) .def("__iszero__", TypeInfoAdapter::isZero )
#endif #endif
@ -1049,7 +990,7 @@ void pykd_init()
.def("__init__", python::make_constructor(pykd::getTypedVarByTypeInfo) ) .def("__init__", python::make_constructor(pykd::getTypedVarByTypeInfo) )
.def("__init__", python::make_constructor(pykd::getTypedVarWithPrototype) ) .def("__init__", python::make_constructor(pykd::getTypedVarWithPrototype) )
.def("getLocation", TypedVarAdapter::getLocation, .def("getLocation", TypedVarAdapter::getLocation,
"Return location of the variable") "Return location of the varibale")
.def("getAddress", TypedVarAdapter::getAddress, .def("getAddress", TypedVarAdapter::getAddress,
"Return virtual address" ) "Return virtual address" )
.def("getDebugStart", TypedVarAdapter::getDebugStart, .def("getDebugStart", TypedVarAdapter::getDebugStart,
@ -1069,20 +1010,14 @@ void pykd_init()
.def("setField", TypedVarAdapter::setField, .def("setField", TypedVarAdapter::setField,
"Set field of structure") "Set field of structure")
.def("setField", TypedVarAdapter::setElementByIndex, .def("setField", TypedVarAdapter::setElementByIndex,
"Set field of a stricture or an element of array") "Set field of a structire or an element od array")
.def("hasField", TypedVarAdapter::hasField,
"Check if a typedVar object has the specified field")
.def( "fields", TypedVarAdapter::getFields, .def( "fields", TypedVarAdapter::getFields,
"Return list of tuple ( filedName, fieldOffset, fieldValue )" ) "Return list of tuple ( filedName, fieldOffset, fieldValue )" )
.def ("members", TypedVarAdapter::getMembers,
"Return list of tuple ( filedName, fieldOffset, fieldValue )")
.def( "fieldName", TypedVarAdapter::getElementName, .def( "fieldName", TypedVarAdapter::getElementName,
"Return name of struct field by index" ) "Return name of struct field by index" )
.def("method", TypedVarAdapter::getMethodByName, ( python::arg("name"), python::arg("prototype") = "" ), .def("method", TypedVarAdapter::getMethodByName, ( python::arg("name"), python::arg("prototype") = "" ),
"Return method of class as an object attribute" ) "Return method of class as an object attribute" )
.def("hasMethod", TypedVarAdapter::hasMethod, .def("deref",TypedVarAdapter::deref,
"Check if a typedVar object has the specified method")
.def("deref",TypedVarAdapter::deref,
"Return value by pointer" ) "Return value by pointer" )
.def("rawBytes", TypedVarAdapter::getRawBytes, .def("rawBytes", TypedVarAdapter::getRawBytes,
"Return list of bytes" ) "Return list of bytes" )
@ -1105,7 +1040,7 @@ void pykd_init()
.def("__dir__", TypedVarAdapter::getElementsDir) .def("__dir__", TypedVarAdapter::getElementsDir)
.def("__call__", python::raw_function(pykd::callFunctionByVar, 0) ) .def("__call__", python::raw_function(pykd::callFunctionByVar, 0) )
.def("__iter__", TypedVarAdapter::getArrayIter, python::return_value_policy<python::manage_new_object>()) .def("__iter__", TypedVarAdapter::getArrayIter, python::return_value_policy<python::manage_new_object>())
.def("__contains__", TypedVarAdapter::hasField) //.def("__getitem__", &kdlib::TypedVar::getElementByIndexPtr )
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
.def("__bool__", TypedVarAdapter::isNotZero) .def("__bool__", TypedVarAdapter::isNotZero)
#else #else
@ -1151,25 +1086,19 @@ void pykd_init()
.add_property( "stackOffset", StackFrameAdapter::getSP, .add_property( "stackOffset", StackFrameAdapter::getSP,
"Return a frame's stack offset" ) "Return a frame's stack offset" )
.def( "getParams", StackFrameAdapter::getParamsList, .def( "getParams", StackFrameAdapter::getParamsList,
"return set of function's parameters as a list of tuple (name, value)") "return set of function's parameters as a list of tuple (name, value ) ")
.add_property( "params", StackFrameAdapter::getParamsDict, .add_property( "params", StackFrameAdapter::getParamsDict,
"return set of function's parameters as a dict (name : value)") "return set of function's parameters as a dict (name : value)")
.def( "getParam", StackFrameAdapter::getParam, .def( "getParam", StackFrameAdapter::getParam,
"return function param by it's name") "return function param by it's name")
.def( "getLocals", StackFrameAdapter::getLocalsList, .def( "getLocals", StackFrameAdapter::getLocalsList,
"return set of function's local variables as a list of tuple (name, value)") "return set of function's local variables as a list of tuple (name, value ) ")
.add_property("locals", StackFrameAdapter::getLocalsDict, .add_property("locals", StackFrameAdapter::getLocalsDict,
"return a set of function's local variables as a dict (name : value)") "return a set of function's local variables as a dict ( name : value)")
.def( "getLocal", StackFrameAdapter::getLocal, .def( "getLocal", StackFrameAdapter::getLocal,
"return the function's local variable by it's name") "return the function's local variable by it's name")
.def( "switchTo", StackFrameAdapter::switchTo, .def( "switchTo", StackFrameAdapter::switchTo,
"Make this frame a current") "Make this frame a current")
.def( "isInline", StackFrameAdapter::isInline,
"this virtual frame of inlined function" )
.def( "findSymbol", StackFrameAdapter::findSymbol,
"return symbol for frame's instruction pointer")
.def( "getSourceLine", StackFrameAdapter::getSourceLine,
"return source line for stack frame's function" )
.def( "__str__", StackFrameAdapter::print ); .def( "__str__", StackFrameAdapter::print );
python::class_<CPUContextAdapter>("cpu", "class for CPU context representation" ) python::class_<CPUContextAdapter>("cpu", "class for CPU context representation" )
@ -1275,7 +1204,7 @@ void pykd_init()
.value("ChangeSymbolState", kdlib::EventTypeChangeSymbolState) .value("ChangeSymbolState", kdlib::EventTypeChangeSymbolState)
; ;
python::class_<pykd::DebugEvent>("debugEvent", "Debug event descriptions", python::no_init) python::class_<pykd::DebugEvent>("debugEvent", "Debug evemt descriptions", python::no_init)
.def_readonly("type", &DebugEvent::eventType) .def_readonly("type", &DebugEvent::eventType)
.def_readonly("process", &DebugEvent::process) .def_readonly("process", &DebugEvent::process)
.def_readonly("thread", &DebugEvent::thread) .def_readonly("thread", &DebugEvent::thread)
@ -1289,7 +1218,7 @@ void pykd_init()
.def( "disasm", DisasmAdapter::jump, .def( "disasm", DisasmAdapter::jump,
"Disassemble from the specified offset" ) "Disassemble from the specified offset" )
.def( "asm", DisasmAdapter::assembly, .def( "asm", DisasmAdapter::assembly,
"Insert assembled instruction to current offset" ) "Insert assemblied instuction to current offset" )
.def( "begin", DisasmAdapter::begin, .def( "begin", DisasmAdapter::begin,
"Return begin offset" ) "Return begin offset" )
.def( "current", DisasmAdapter::current, .def( "current", DisasmAdapter::current,
@ -1324,8 +1253,9 @@ void pykd_init()
#endif #endif
; ;
python::class_<kdlib::TypeInfoProvider, kdlib::TypeInfoProviderPtr, boost::noncopyable>("typeInfoProvider", python::class_<kdlib::TypeInfoProvider, kdlib::TypeInfoProviderPtr, boost::noncopyable>("typeInfoProvider",
"Get abstract access to different type info sources", python::no_init) "Get abstaract access to different type info sources", python::no_init)
.def( "getTypeByName", TypeInfoProviderAdapter::getTypeByName, .def( "getTypeByName", TypeInfoProviderAdapter::getTypeByName,
"Get type info by it's name" ) "Get type info by it's name" )
.def( "typeIterator", TypeInfoProviderAdapter::getTypeIterWithMask, python::return_value_policy<python::manage_new_object>(), .def( "typeIterator", TypeInfoProviderAdapter::getTypeIterWithMask, python::return_value_policy<python::manage_new_object>(),
@ -1334,22 +1264,6 @@ void pykd_init()
.def( "__getattr__", TypeInfoProviderAdapter::getTypeAsAttr ) .def( "__getattr__", TypeInfoProviderAdapter::getTypeAsAttr )
; ;
python::class_<SymbolEnumeratorAdapter>("symbolIterator", "Iterator for symbols", python::no_init)
.def("__iter__", SymbolEnumeratorAdapter::getIter)
#if PY_VERSION_HEX < 0x03000000
.def("next", &SymbolEnumeratorAdapter::next)
#else
.def("__next__", &SymbolEnumeratorAdapter::next)
#endif
;
python::class_<kdlib::SymbolProvider, kdlib::SymbolProviderPtr, boost::noncopyable>("symbolProvider",
"Get abstract access to different type info sources", python::no_init)
.def("iter", SymbolProviderAdapter::getIterWithMask, python::return_value_policy<python::manage_new_object>(),
"Return type iterator with specified mask")
.def("__iter__", SymbolProviderAdapter::getIter, python::return_value_policy<python::manage_new_object>())
;
python::enum_<kdlib::DebugCallbackResult>("eventResult", "Return value of event handler") python::enum_<kdlib::DebugCallbackResult>("eventResult", "Return value of event handler")
.value("Proceed", kdlib::DebugCallbackProceed) .value("Proceed", kdlib::DebugCallbackProceed)
.value("NoChange", kdlib::DebugCallbackNoChange) .value("NoChange", kdlib::DebugCallbackNoChange)
@ -1378,7 +1292,7 @@ void pykd_init()
.value("ThisCall", kdlib::CallConv_ThisCall ) .value("ThisCall", kdlib::CallConv_ThisCall )
.value("MipsCall", kdlib::CallConv_MipsCall ) .value("MipsCall", kdlib::CallConv_MipsCall )
.value("Generic", kdlib::CallConv_Generic ) .value("Generic", kdlib::CallConv_Generic )
.value("AlphaCall ", kdlib::CallConv_AlphaCall ) .value("AlphaCall ", kdlib::CallConv_AlphaCall )
.value("PpcCall", kdlib::CallConv_PpcCall ) .value("PpcCall", kdlib::CallConv_PpcCall )
.value("ShCall", kdlib::CallConv_ShCall ) .value("ShCall", kdlib::CallConv_ShCall )
.value("ArmCall", kdlib::CallConv_ArmCall ) .value("ArmCall", kdlib::CallConv_ArmCall )
@ -1397,12 +1311,12 @@ void pykd_init()
.value("ARM", kdlib::CPU_ARM ) .value("ARM", kdlib::CPU_ARM )
; ;
python::enum_<kdlib::VarStorage>("Location", "Location of a variable") python::enum_<kdlib::VarStorage>("Location", "Location of a varibale")
.value("Reg", kdlib::RegisterVar) .value("Reg", kdlib::RegisterVar)
.value("Memory", kdlib::MemoryVar) .value("Memory", kdlib::MemoryVar)
; ;
python::enum_<kdlib::MemoryProtect>("memoryProtect", "Memory protection attributes") python::enum_<kdlib::MemoryProtect>("memoryProtect", "Memory protection attribiuties")
.value("PageNoAccess", kdlib::PageNoAccess) .value("PageNoAccess", kdlib::PageNoAccess)
.value("PageReadOnly", kdlib::PageReadOnly) .value("PageReadOnly", kdlib::PageReadOnly)
.value("PageReadWrite", kdlib::PageReadWrite) .value("PageReadWrite", kdlib::PageReadWrite)
@ -1413,24 +1327,12 @@ void pykd_init()
.value("PageExecuteWriteCopy", kdlib::PageExecuteWriteCopy) .value("PageExecuteWriteCopy", kdlib::PageExecuteWriteCopy)
; ;
python::enum_<kdlib::MemoryState>("memoryState", "Memory state")
.value("Commit", kdlib::MemCommit)
.value("Reserve", kdlib::MemReserve)
.value("Free", kdlib::MemFree)
;
python::enum_<kdlib::MemoryType>("memoryType", "Memory type")
.value("Mapped", kdlib::MemMapped)
.value("Image", kdlib::MemImage)
.value("Private", kdlib::MemPrivate)
;
python::enum_<kdlib::ProcessDebugOptions>("ProcessDebugOptions", "Process debug option") python::enum_<kdlib::ProcessDebugOptions>("ProcessDebugOptions", "Process debug option")
.value("BreakOnStart", kdlib::ProcessBreakOnStart) .value("BreakOnStart", kdlib::ProcessBreakOnStart)
.value("BreakOnStop", kdlib::ProcessBreakOnStop) .value("BreakOnStop", kdlib::ProcessBreakOnStop)
.value("DebugChildren", kdlib::ProcessDebugChildren) .value("DebugChildren", kdlib::ProcessDebugChildren)
.value("NoDebugHeap", kdlib::ProcessNoDebugHeap) .value("NoDebugHeap", kdlib::ProcessNoDebugHeap)
.value("Default", kdlib::ProcessDebugDefault) .value("Deafult", kdlib::ProcessDebugDefault)
; ;
python::class_<EventHandler, boost::noncopyable>( python::class_<EventHandler, boost::noncopyable>(
@ -1442,7 +1344,7 @@ void pykd_init()
"Triggered module load event. Parameter are long: module base, string: module name\n" "Triggered module load event. Parameter are long: module base, string: module name\n"
"For ignore event method must return eventResult.noChange" ) "For ignore event method must return eventResult.noChange" )
.def( "onUnloadModule", &EventHandler::onModuleUnload, .def( "onUnloadModule", &EventHandler::onModuleUnload,
"Triggered module unload event. Parameter are long: module base, string: module name\n" "Triggered module unload event. Parameter are long: module base, string: module name\n"
"For ignore event method must return eventResult.noChange" ) "For ignore event method must return eventResult.noChange" )
.def( "onException", &EventHandler::onException, .def( "onException", &EventHandler::onException,
"Triggered exception event. Parameter - exceptionInfo\n" "Triggered exception event. Parameter - exceptionInfo\n"
@ -1521,54 +1423,6 @@ void pykd_init()
.value("Execute", kdlib::Execute) .value("Execute", kdlib::Execute)
; ;
python::enum_<kdlib::OutputFlag>("outputFlag", "Set of output mask")
.value("Normal", kdlib::Normal)
.value("Error", kdlib::Error)
.value("Warning", kdlib::Warning)
.value("Verbose", kdlib::Verbose)
.value("Prompt", kdlib::Prompt)
.value("PromptRegister", kdlib::PromptRegister)
.value("ExtensionWarning", kdlib::ExtensionWarning)
.value("Debuggee", kdlib::Debuggee)
.value("DebuggeePrompt", kdlib::DebuggeePrompt)
.value("Symbols", kdlib::Symbols)
.value("Status", kdlib::Status)
.value("All", kdlib::All)
;
python::enum_<kdlib::DumpType>("dumpType", "Dump type")
.value("Small", kdlib::Small)
.value("Default", kdlib::Default)
.value("Full", kdlib::Full)
.value("Image", kdlib::Image)
.value("KernelSmall", kdlib::KernelSmall)
.value("Kernel", kdlib::Kernel)
.value("KernelFull", kdlib::KernelFull)
;
python::enum_<kdlib::DumpFormat>("dumpFormat", "Dump format")
.value("UserSmallFullMemory", kdlib::UserSmallFullMemory)
.value("UserSmallHandleData", kdlib::UserSmallHandleData)
.value("UserSmallUnloadedModules", kdlib::UserSmallUnloadedModules)
.value("UserSmallIndirectMemory", kdlib::UserSmallIndirectMemory)
.value("UserSmallDataSegments", kdlib::UserSmallDataSegments)
.value("UserSmallFilterMemory", kdlib::UserSmallFilterMemory)
.value("UserSmallFilterPaths", kdlib::UserSmallFilterPaths)
.value("UserSmallProcessThreadData", kdlib::UserSmallProcessThreadData)
.value("UserSmallPrivateReadWriteMemory", kdlib::UserSmallPrivateReadWriteMemory)
.value("UserSmallNoOptionalData", kdlib::UserSmallNoOptionalData)
.value("UserSmallFullMemoryInfo", kdlib::UserSmallFullMemoryInfo)
.value("UserSmallThreadInfo", kdlib::UserSmallThreadInfo)
.value("UserSmallCodeSegments", kdlib::UserSmallCodeSegments)
.value("UserSmallNoAuxiliaryState", kdlib::UserSmallNoAuxiliaryState)
.value("UserSmallFullAuxiliaryState", kdlib::UserSmallFullAuxiliaryState)
.value("UserSmallModuleHeaders", kdlib::UserSmallModuleHeaders)
.value("UserSmallFilterTriage", kdlib::UserSmallFilterTriage)
.value("UserSmallAddAvxXStateContext", kdlib::UserSmallAddAvxXStateContext)
.value("UserSmallIptTrace", kdlib::UserSmallIptTrace)
.value("UserSmallIgnoreInaccessibleMem", kdlib::UserSmallIgnoreInaccessibleMem)
;
// C++ exception translation to python // C++ exception translation to python
pykd::registerExceptions(); pykd::registerExceptions();
} }

View File

@ -1,8 +1,6 @@
#include "stdafx.h" #include "stdafx.h"
#include "pymodule.h" #include "pymodule.h"
#include <iomanip>
#include <ctime>
namespace pykd { namespace pykd {
@ -50,8 +48,20 @@ std::wstring ModuleAdapter::print( kdlib::Module& module )
sstr << L"Image: " << module.getImageName() << std::endl; sstr << L"Image: " << module.getImageName() << std::endl;
sstr << L"Symbols: " << module.getSymFile() << std::endl; sstr << L"Symbols: " << module.getSymFile() << std::endl;
time_t timeStamp = module.getTimeDataStamp();
sstr << L"Timestamp: " << timeStamp << " (" << std::put_time(std::gmtime(&timeStamp), L"%c") << L')' << std::endl; //if ( m_symSession )
//{
// sstr << "Symbols: " << m_symSession->getSymbolFileName() << std::endl;
// std::string buildDesc = m_symSession->getBuildDescription();
// if (!buildDesc.empty())
// sstr << "\t" << buildDesc << std::endl;
//}
//else
//{
// sstr << "Symbols: not found" << std::endl;
//}
sstr << L"Timestamp: " << module.getTimeDataStamp() << std::endl;
sstr << L"Check Sum: " << module.getCheckSum() << std::endl; sstr << L"Check Sum: " << module.getCheckSum() << std::endl;
return sstr.str(); return sstr.str();
@ -93,15 +103,6 @@ python::list ModuleAdapter::enumTypes(kdlib::Module& module, const std::wstring
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
bool ModuleAdapter::isContainedSymbol(kdlib::ModulePtr& module, const std::wstring& symbolName)
{
if (!module->enumSymbols(symbolName).empty())
return true;
return !module->enumTypes(symbolName).empty();
}
///////////////////////////////////////////////////////////////////////////////
std::wstring ModuleAdapter::findSymbol( kdlib::Module& module, kdlib::MEMOFFSET_64 offset, bool showDisplacement ) std::wstring ModuleAdapter::findSymbol( kdlib::Module& module, kdlib::MEMOFFSET_64 offset, bool showDisplacement )
{ {

View File

@ -82,51 +82,20 @@ struct ModuleAdapter : public kdlib::Module
return module.getSymbolVa(symbolName); return module.getSymbolVa(symbolName);
} }
static python::object getAttrByName(kdlib::Module& module, const std::wstring &symbolName) static kdlib::MEMOFFSET_64 getSymbolVaAttr(kdlib::Module& module, const std::wstring &symbolName)
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;
try { try {
return python::object(module.getSymbolVa(symbolName)); return module.getSymbolVa(symbolName);
}
catch (kdlib::DbgException&)
{ }
try {
return python::object(module.getTypeByName(symbolName));
}
catch (kdlib::DbgException&)
{ }
std::wstringstream sstr;
sstr << L'\'' << module.getName() << L'\'' << L" module has not a symbol " << L'\'' << symbolName << L'\'';
throw AttributeException(std::string(_bstr_t(sstr.str().c_str())).c_str());
}
static python::object getItemByKey(kdlib::Module& module, const std::wstring &symbolName)
{
AutoRestorePyState pystate;
try {
return python::object(module.getSymbolVa(symbolName));
} }
catch (kdlib::DbgException&) catch (kdlib::DbgException&)
{ {
std::wstringstream sstr;
sstr << L'\'' << module.getName() << L'\'' << L" module has no symbol " << L'\'' << symbolName << L'\'';
throw AttributeException(std::string(_bstr_t(sstr.str().c_str())).c_str());
} }
try {
return python::object(module.getTypeByName(symbolName));
}
catch (kdlib::DbgException&)
{
}
std::wstringstream sstr;
sstr << L"module has not a symbol " << L'\'' << symbolName << L'\'';
throw KeyException(std::string(_bstr_t(sstr.str().c_str())).c_str());
} }
static kdlib::MEMOFFSET_32 getSymbolRva( kdlib::Module& module, const std::wstring &symbolName ) static kdlib::MEMOFFSET_32 getSymbolRva( kdlib::Module& module, const std::wstring &symbolName )
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;
@ -229,7 +198,6 @@ struct ModuleAdapter : public kdlib::Module
static python::list getTypedVarArrayByTypeName( kdlib::Module& module, kdlib::MEMOFFSET_64 offset, const std::wstring &typeName, size_t number ); static python::list getTypedVarArrayByTypeName( kdlib::Module& module, kdlib::MEMOFFSET_64 offset, const std::wstring &typeName, size_t number );
static bool isContainedSymbol(kdlib::ModulePtr& module, const std::wstring& symbolName);
}; };
} // end namespace pykd } // end namespace pykd

View File

@ -103,7 +103,7 @@ python::list getTypedVarArrayByType( kdlib::MEMOFFSET_64 offset, kdlib::TypeInfo
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
python::list TypedVarAdapter::getFields(const kdlib::TypedVarPtr& typedVar) python::list TypedVarAdapter::getFields( kdlib::TypedVar& typedVar )
{ {
typedef boost::tuple<std::wstring,kdlib::MEMOFFSET_32,kdlib::TypedVarPtr> FieldTuple; typedef boost::tuple<std::wstring,kdlib::MEMOFFSET_32,kdlib::TypedVarPtr> FieldTuple;
@ -113,18 +113,15 @@ python::list TypedVarAdapter::getFields(const kdlib::TypedVarPtr& typedVar)
AutoRestorePyState pystate; AutoRestorePyState pystate;
for ( size_t i = 0; i < typedVar->getElementCount(); ++i ) for ( size_t i = 0; i < typedVar.getElementCount(); ++i )
{ {
std::wstring name = typedVar->getElementName(i); std::wstring name = typedVar.getElementName(i);
kdlib::MEMOFFSET_32 offset = 0; kdlib::MEMOFFSET_32 offset = 0;
if (typedVar->getType()->isConstMember(i)) if (!typedVar.getType()->isStaticMember(i) )
continue; offset = typedVar.getElementOffset(i);
if (!typedVar->getType()->isStaticMember(i) ) kdlib::TypedVarPtr val = typedVar.getElement(i);
offset = typedVar->getElementOffset(i);
kdlib::TypedVarPtr val = typedVar->getElement(i);
lst.push_back( FieldTuple( name, offset, val ) ); lst.push_back( FieldTuple( name, offset, val ) );
} }
@ -139,77 +136,6 @@ python::list TypedVarAdapter::getFields(const kdlib::TypedVarPtr& typedVar)
return pylst; return pylst;
} }
python::list TypedVarAdapter::getMembers(const kdlib::TypedVarPtr& typedVar)
{
typedef boost::tuple<std::wstring, kdlib::MEMOFFSET_32, kdlib::TypedVarPtr> FieldTuple;
std::list<FieldTuple> lst;
do {
AutoRestorePyState pystate;
auto varType = typedVar->getType();
for (size_t i = 0; i < typedVar->getElementCount(); ++i)
{
if (varType->isConstMember(i) || varType->isInheritedMember(i))
continue;
std::wstring name = typedVar->getElementName(i);
kdlib::MEMOFFSET_32 offset = 0;
if (!varType->isStaticMember(i))
offset = typedVar->getElementOffset(i);
kdlib::TypedVarPtr val = typedVar->getElement(i);
lst.push_back(FieldTuple(name, offset, val));
}
} while (false);
python::list pylst;
for (std::list<FieldTuple>::const_iterator it = lst.begin(); it != lst.end(); ++it)
pylst.append(python::make_tuple(it->get<0>(), it->get<1>(), it->get<2>()));
return pylst;
}
///////////////////////////////////////////////////////////////////////////////
bool TypedVarAdapter::hasField(kdlib::TypedVarPtr& typedVar, const std::wstring &fieldName)
{
AutoRestorePyState pystate;
for (size_t i = 0; i < typedVar->getElementCount(); ++i)
{
std::wstring name = typedVar->getElementName(i);
if (name == fieldName)
return true;
}
return false;
}
///////////////////////////////////////////////////////////////////////////////
bool TypedVarAdapter::hasMethod(kdlib::TypedVarPtr& typedVar, const std::wstring &name)
{
AutoRestorePyState pystate;
try {
typedVar->getMethod(name);
return true;
}
catch (kdlib::DbgException&)
{
}
return false;
}
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
python::list TypedVarAdapter::getElementsDir(kdlib::TypedVar& typedVar) python::list TypedVarAdapter::getElementsDir(kdlib::TypedVar& typedVar)
@ -242,33 +168,31 @@ python::list TypedVarAdapter::getElementsDir(kdlib::TypedVar& typedVar)
kdlib::TypedVarPtr TypedVarAdapter::getFieldAttr(kdlib::TypedVar& typedVar, const std::wstring &name) kdlib::TypedVarPtr TypedVarAdapter::getFieldAttr(kdlib::TypedVar& typedVar, const std::wstring &name)
{ {
if (name == L"__name__")
throw AttributeException("no __name__ attribute");
AutoRestorePyState pystate;
try
{ {
return typedVar.getElement( name );
}
catch (kdlib::TypeException&)
{}
AutoRestorePyState pystate;
try try
{ {
return typedVar.getMethod(name); return typedVar.getElement( name );
} }
catch (kdlib::TypeException&) catch (kdlib::TypeException&)
{ {}
try
{
return typedVar.getMethod( name );
}
catch (kdlib::TypeException&)
{}
} }
std::wstringstream sstr;
std::stringstream sstr; sstr << L"typed var has no field " << L'\'' << name << L'\'';
sstr << "typed var has no field " << '\'' << _bstr_t(name.c_str()) << '\''; throw AttributeException(std::string(_bstr_t(sstr.str().c_str())).c_str());
throw AttributeException(sstr.str().c_str());
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
python::list TypedVarAdapter::getRawBytes(kdlib::TypedVar& typedVar) python::list TypedVarAdapter::getRawBytes(kdlib::TypedVar& typedVar)
@ -337,6 +261,7 @@ void TypedVarAdapter::setFieldAttr(kdlib::TypedVar& typedVar, const std::wstring
kdlib::TypedVarPtr TypedVarAdapter::getFieldByKey(kdlib::TypedVar& typedVar, const std::wstring &name) kdlib::TypedVarPtr TypedVarAdapter::getFieldByKey(kdlib::TypedVar& typedVar, const std::wstring &name)
{ {
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;
try try
@ -381,57 +306,5 @@ void TypedVarAdapter::setFieldByKey(kdlib::TypedVar& typedVar, const std::wstrin
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class PyScope : public kdlib::Scope
{
public:
kdlib::TypedValue get(const std::wstring& varName) const override
{
return getTypdedValueFromPyObj(m_scope[varName]);
}
virtual bool find(const std::wstring& varName, kdlib::TypedValue& value) const override
{
if (!m_scope.contains(varName))
return false;
value = getTypdedValueFromPyObj(m_scope[varName]);
return true;
}
PyScope(const python::object& scope) :
m_scope(scope)
{}
private:
python::object m_scope;
};
kdlib::TypedVarPtr evalExpr(const std::string expression, python::object& scope, kdlib::TypeInfoProviderPtr& typeInfoProvider )
{
if (scope)
{
return kdlib::evalExpr(expression, kdlib::ScopePtr(new PyScope(scope)), typeInfoProvider).get();
}
return kdlib::evalExpr(expression).get();
}
///////////////////////////////////////////////////////////////////////////////
kdlib::TypedValue getTypdedValueFromPyObj(const python::object& value)
{
python::extract<kdlib::TypedVarPtr> getTypedVar(value);
if (getTypedVar.check())
return getTypedVar();
return NumVariantAdaptor::convertToVariant(value);
}
///////////////////////////////////////////////////////////////////////////////
} // namespace pykd } // namespace pykd

View File

@ -7,7 +7,6 @@
namespace python = boost::python; namespace python = boost::python;
#include "kdlib/typedvar.h" #include "kdlib/typedvar.h"
#include "kdlib/typeinfo.h"
#include "stladaptor.h" #include "stladaptor.h"
#include "pythreadstate.h" #include "pythreadstate.h"
@ -143,10 +142,6 @@ struct TypedVarAdapter {
static void setField(kdlib::TypedVar& typedVar, const std::wstring &name, python::object& object); static void setField(kdlib::TypedVar& typedVar, const std::wstring &name, python::object& object);
static bool hasField(kdlib::TypedVarPtr& typedVar, const std::wstring &name);
static bool hasMethod(kdlib::TypedVarPtr& typedVar, const std::wstring &name);
static kdlib::TypedVarPtr getFieldAttr(kdlib::TypedVar& typedVar, const std::wstring &name); static kdlib::TypedVarPtr getFieldAttr(kdlib::TypedVar& typedVar, const std::wstring &name);
static void setFieldAttr(kdlib::TypedVar& typedVar, const std::wstring &name, python::object& object); static void setFieldAttr(kdlib::TypedVar& typedVar, const std::wstring &name, python::object& object);
@ -187,9 +182,7 @@ struct TypedVarAdapter {
return typedVar.str(); return typedVar.str();
} }
static python::list getFields(const kdlib::TypedVarPtr& typedVar); static python::list getFields( kdlib::TypedVar& typedVar );
static python::list getMembers(const kdlib::TypedVarPtr& typedVar);
static kdlib::TypeInfoPtr getType( kdlib::TypedVar& typedVar ) static kdlib::TypeInfoPtr getType( kdlib::TypedVar& typedVar )
{ {
@ -234,12 +227,6 @@ struct TypedVarAdapter {
{ {
return new TypedVarIterator(typedVar); return new TypedVarIterator(typedVar);
} }
}; };
kdlib::TypedValue getTypdedValueFromPyObj(const python::object& value);
kdlib::TypedVarPtr evalExpr(const std::string expression, python::object& scope = python::object(), kdlib::TypeInfoProviderPtr& typeInfoProvider = kdlib::getDefaultTypeInfoProvider());
} // end namespace pykd } // end namespace pykd

View File

@ -75,7 +75,7 @@ python::tuple findSymbolAndDisp( ULONG64 offset )
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
python::list TypeInfoAdapter::getFields( const kdlib::TypeInfoPtr &typeInfo ) python::list TypeInfoAdapter::getFields( kdlib::TypeInfo &typeInfo )
{ {
typedef boost::tuple<std::wstring,kdlib::TypeInfoPtr> FieldTuple; typedef boost::tuple<std::wstring,kdlib::TypeInfoPtr> FieldTuple;
@ -85,10 +85,10 @@ python::list TypeInfoAdapter::getFields( const kdlib::TypeInfoPtr &typeInfo )
AutoRestorePyState pystate; AutoRestorePyState pystate;
for ( size_t i = 0; i < typeInfo->getElementCount(); ++i ) for ( size_t i = 0; i < typeInfo.getElementCount(); ++i )
{ {
std::wstring name = typeInfo->getElementName(i); std::wstring name = typeInfo.getElementName(i);
kdlib::TypeInfoPtr val = typeInfo->getElement(i); kdlib::TypeInfoPtr val = typeInfo.getElement(i);
lst.push_back( FieldTuple( name, val ) ); lst.push_back( FieldTuple( name, val ) );
} }
@ -103,84 +103,6 @@ python::list TypeInfoAdapter::getFields( const kdlib::TypeInfoPtr &typeInfo )
return pylst; return pylst;
} }
python::list TypeInfoAdapter::getMembers(const kdlib::TypeInfoPtr &typeInfo)
{
typedef boost::tuple<std::wstring, kdlib::TypeInfoPtr> FieldTuple;
std::list<FieldTuple> lst;
do {
AutoRestorePyState pystate;
for (size_t i = 0; i < typeInfo->getElementCount(); ++i)
{
std::wstring name = typeInfo->getElementName(i);
kdlib::TypeInfoPtr val = typeInfo->getElement(i);
if (!typeInfo->isInheritedMember(i))
lst.push_back(FieldTuple(name, val));
}
} while (false);
python::list pylst;
for (std::list<FieldTuple>::const_iterator it = lst.begin(); it != lst.end(); ++it)
pylst.append(python::make_tuple(it->get<0>(), it->get<1>()));
return pylst;
}
bool TypeInfoAdapter::hasFieldOrMethod(kdlib::TypeInfoPtr& typeInfo, const std::wstring& fieldName)
{
AutoRestorePyState pystate;
for (size_t i = 0; i < typeInfo->getElementCount(); ++i)
{
std::wstring name = typeInfo->getElementName(i);
if (name == fieldName)
return true;
}
for (size_t i = 0; i < typeInfo->getMethodsCount(); ++i)
{
std::wstring name = typeInfo->getMethodName(i);
if (name == fieldName)
return true;
}
return false;
}
bool TypeInfoAdapter::hasField(kdlib::TypeInfoPtr &typeInfo, const std::wstring &fieldName)
{
AutoRestorePyState pystate;
for (size_t i = 0; i < typeInfo->getElementCount(); ++i)
{
std::wstring name = typeInfo->getElementName(i);
if (name == fieldName)
return true;
}
return false;
}
bool TypeInfoAdapter::hasMethod(kdlib::TypeInfoPtr &typeInfo, const std::wstring &fieldName)
{
AutoRestorePyState pystate;
for (size_t i = 0; i < typeInfo->getMethodsCount(); ++i)
{
std::wstring name = typeInfo->getMethodName(i);
if (name == fieldName)
return true;
}
return false;
}
python::list TypeInfoAdapter::getMethods(kdlib::TypeInfo &typeInfo) python::list TypeInfoAdapter::getMethods(kdlib::TypeInfo &typeInfo)
{ {
typedef boost::tuple<std::wstring, kdlib::TypeInfoPtr> FieldTuple; typedef boost::tuple<std::wstring, kdlib::TypeInfoPtr> FieldTuple;
@ -240,73 +162,48 @@ python::list TypeInfoAdapter::getBaseClasses(kdlib::TypeInfo &typeInfo)
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
python::list TypeInfoAdapter::getTemplateArgs(const kdlib::TypeInfoPtr &typeInfo) kdlib::TypeInfoPtr TypeInfoAdapter::getElementAttr(kdlib::TypeInfo &typeInfo, const std::wstring &name)
{ {
std::list<std::wstring> templateArgs;
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;
for (size_t i = 0; i < typeInfo->getTemplateArgsCount(); ++i) try {
{ return typeInfo.getElement(name);
templateArgs.push_back(typeInfo->getTemplateArg(i));
} }
catch (kdlib::TypeException&)
{}
try {
return typeInfo.getMethod(name);
}
catch (kdlib::TypeException&)
{}
} }
python::list pylst; std::wstringstream sstr;
sstr << L'\'' << typeInfo.getName() << L'\'' << L" type has no field " << L'\'' << name << L'\'';
for (const auto& arg : templateArgs) throw AttributeException(std::string(_bstr_t(sstr.str().c_str())).c_str());
pylst.append(arg);
return pylst;
}
///////////////////////////////////////////////////////////////////////////////
kdlib::TypeInfoPtr TypeInfoAdapter::getElementAttr(kdlib::TypeInfo &typeInfo, const std::wstring &name)
{
AutoRestorePyState pystate;
try {
return typeInfo.getElement(name);
}
catch (kdlib::TypeException&)
{}
try
{
return typeInfo.getMethod(name);
}
catch (kdlib::TypeException&)
{
}
std::stringstream sstr;
sstr << '\'' << _bstr_t(typeInfo.getName().c_str()) << '\''
<< " type has no field " << '\'' << _bstr_t(name.c_str()) << '\'';
throw AttributeException(sstr.str().c_str());
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
kdlib::TypeInfoPtr TypeInfoAdapter::getElementByKey(kdlib::TypeInfo &typeInfo, const std::wstring &name) kdlib::TypeInfoPtr TypeInfoAdapter::getElementByKey(kdlib::TypeInfo &typeInfo, const std::wstring &name)
{ {
{
AutoRestorePyState pystate;
AutoRestorePyState pystate; try {
return typeInfo.getElement(name);
}
catch (kdlib::TypeException&)
{}
try { try {
return typeInfo.getElement(name); return typeInfo.getMethod(name);
}
catch (kdlib::TypeException&)
{}
} }
catch (kdlib::TypeException&)
{}
try {
return typeInfo.getMethod(name);
}
catch (kdlib::TypeException&)
{}
std::wstringstream sstr; std::wstringstream sstr;
sstr << L'\'' << typeInfo.getName() << L'\'' << L" type has no field " << L'\'' << name << L'\''; sstr << L'\'' << typeInfo.getName() << L'\'' << L" type has no field " << L'\'' << name << L'\'';
@ -394,6 +291,7 @@ python::object callTypedVar(kdlib::TypedVarPtr& funcobj, python::tuple& args)
continue; continue;
} }
if ( python::extract<int>(args[i]).check() ) if ( python::extract<int>(args[i]).check() )
{ {
kdlib::NumVariant var= NumVariantAdaptor::convertToVariant(args[i]); kdlib::NumVariant var= NumVariantAdaptor::convertToVariant(args[i]);

View File

@ -69,12 +69,6 @@ inline kdlib::TypeInfoProviderPtr getTypeInfoProviderFromSource(const std::wstri
return kdlib::getTypeInfoProviderFromSource(sourceCode, compileOptions); return kdlib::getTypeInfoProviderFromSource(sourceCode, compileOptions);
} }
inline kdlib::SymbolProviderPtr getSymbolProviderFromSource(const std::wstring& sourceCode, const std::wstring& compileOptions = L"")
{
AutoRestorePyState pystate;
return kdlib::getSymbolProviderFromSource(sourceCode, compileOptions);
}
inline kdlib::TypeInfoProviderPtr getTypeInfoProviderFromPdb(const std::wstring& fileName, kdlib::MEMOFFSET_64 offset = 0UL) inline kdlib::TypeInfoProviderPtr getTypeInfoProviderFromPdb(const std::wstring& fileName, kdlib::MEMOFFSET_64 offset = 0UL)
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;
@ -149,30 +143,6 @@ struct TypeInfoAdapter : public kdlib::TypeInfo {
return typeInfo.getElementVa( name ); return typeInfo.getElementVa( name );
} }
static bool isStaticField(const kdlib::TypeInfoPtr &typeInfo, const std::wstring &name)
{
AutoRestorePyState pystate;
return typeInfo->isStaticMember(name);
}
static bool isStaticFieldByIndex(const kdlib::TypeInfoPtr &typeInfo, size_t index)
{
AutoRestorePyState pystate;
return typeInfo->isStaticMember(index);
}
static bool isConstField(const kdlib::TypeInfoPtr &typeInfo, const std::wstring &name)
{
AutoRestorePyState pystate;
return typeInfo->isConstMember(name);
}
static bool isConstFieldByIndex(const kdlib::TypeInfoPtr &typeInfo, size_t index)
{
AutoRestorePyState pystate;
return typeInfo->isConstMember(index);
}
static kdlib::TypeInfoPtr getElementByName( kdlib::TypeInfo &typeInfo, const std::wstring &name ) static kdlib::TypeInfoPtr getElementByName( kdlib::TypeInfo &typeInfo, const std::wstring &name )
{ {
@ -180,10 +150,6 @@ struct TypeInfoAdapter : public kdlib::TypeInfo {
return typeInfo.getElement(name); return typeInfo.getElement(name);
} }
static bool hasField(kdlib::TypeInfoPtr &typeInfo, const std::wstring &name);
static bool hasMethod(kdlib::TypeInfoPtr &typeInfo, const std::wstring &fieldName);
static kdlib::TypeInfoPtr getElementAttr(kdlib::TypeInfo &typeInfo, const std::wstring &name); static kdlib::TypeInfoPtr getElementAttr(kdlib::TypeInfo &typeInfo, const std::wstring &name);
static kdlib::TypeInfoPtr getElementByKey(kdlib::TypeInfo &typeInfo, const std::wstring &name); static kdlib::TypeInfoPtr getElementByKey(kdlib::TypeInfo &typeInfo, const std::wstring &name);
@ -332,12 +298,6 @@ struct TypeInfoAdapter : public kdlib::TypeInfo {
return typeInfo.isNoType(); return typeInfo.isNoType();
} }
static bool isTemplate(const kdlib::TypeInfoPtr &typeInfo)
{
AutoRestorePyState pystate;
return typeInfo->isTemplate();
}
static void appendField( kdlib::TypeInfo &typeInfo, const std::wstring &fieldName, kdlib::TypeInfoPtr &fieldType ) static void appendField( kdlib::TypeInfo &typeInfo, const std::wstring &fieldName, kdlib::TypeInfoPtr &fieldType )
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;
@ -362,9 +322,7 @@ struct TypeInfoAdapter : public kdlib::TypeInfo {
return typeInfo.str(); return typeInfo.str();
} }
static python::list getFields( const kdlib::TypeInfoPtr &typeInfo ); static python::list getFields( kdlib::TypeInfo &typeInfo );
static python::list getMembers(const kdlib::TypeInfoPtr &typeInfo);
static python::list getMethods(kdlib::TypeInfo &typeInfo); static python::list getMethods(kdlib::TypeInfo &typeInfo);
@ -372,18 +330,10 @@ struct TypeInfoAdapter : public kdlib::TypeInfo {
static python::list getBaseClasses(kdlib::TypeInfo &typeInfo); static python::list getBaseClasses(kdlib::TypeInfo &typeInfo);
static python::list getTemplateArgs(const kdlib::TypeInfoPtr &typeInfo);
static bool isZero(kdlib::TypeInfo &typeInfo) { static bool isZero(kdlib::TypeInfo &typeInfo) {
return false; return false;
} }
static bool isNotZero(kdlib::TypeInfo &typeInfo) {
return true;
}
static bool hasFieldOrMethod(kdlib::TypeInfoPtr& typedVar, const std::wstring& name);
}; };
@ -442,56 +392,6 @@ struct TypeInfoProviderAdapter : public kdlib::TypeInfoProvider
}; };
struct SymbolEnumeratorAdapter
{
SymbolEnumeratorAdapter(const kdlib::SymbolEnumeratorPtr& symEnum)
: m_symEnum(symEnum)
{}
static python::object getIter(const python::object& obj)
{
return obj;
}
python::tuple next()
{
std::wstring name;
kdlib::MEMOFFSET_64 offset;
kdlib::TypeInfoPtr typeInfo;
{
AutoRestorePyState pystate;
if (!m_symEnum->Next())
throw StopIteration("No more data.");
name = m_symEnum->getName();
offset = m_symEnum->getOffset();
typeInfo = m_symEnum->getType();
}
return python::make_tuple(name, offset, typeInfo);
}
private:
kdlib::SymbolEnumeratorPtr m_symEnum;
};
struct SymbolProviderAdapter
{
static SymbolEnumeratorAdapter* getIter(const kdlib::SymbolProviderPtr &symProvider)
{
return new SymbolEnumeratorAdapter(symProvider->getSymbolEnumerator());
};
static SymbolEnumeratorAdapter* getIterWithMask(const kdlib::SymbolProviderPtr &symProvider, const std::wstring& mask)
{
return new SymbolEnumeratorAdapter(symProvider->getSymbolEnumerator(mask));
}
};
struct BaseTypesEnum { struct BaseTypesEnum {
static kdlib::TypeInfoPtr getUInt1B() { return pykd::getTypeInfoByName(L"UInt1B"); } static kdlib::TypeInfoPtr getUInt1B() { return pykd::getTypeInfoByName(L"UInt1B"); }
static kdlib::TypeInfoPtr getUInt2B() { return pykd::getTypeInfoByName(L"UInt2B"); } static kdlib::TypeInfoPtr getUInt2B() { return pykd::getTypeInfoByName(L"UInt2B"); }
@ -511,4 +411,9 @@ struct BaseTypesEnum {
static kdlib::TypeInfoPtr getDouble() { return pykd::getTypeInfoByName(L"Double"); } static kdlib::TypeInfoPtr getDouble() { return pykd::getTypeInfoByName(L"Double"); }
}; };
} // end namespace pykd } // end namespace pykd

View File

@ -14,12 +14,12 @@ class NumVariantAdaptor : public kdlib::NumConvertable
public: public:
static kdlib::NumVariant convertToVariant(const python::object &obj) static kdlib::NumVariant NumVariantAdaptor::convertToVariant( const python::object &obj)
{ {
kdlib::NumVariant var; kdlib::NumVariant var;
python::extract<kdlib::NumConvertable> getNumVar(obj); python::extract<kdlib::NumConvertable> getNumVar(obj);
if (getNumVar.check()) if ( getNumVar.check() )
{ {
var = getNumVar(); var = getNumVar();
return var; return var;
@ -49,24 +49,23 @@ public:
} }
#endif #endif
if (PyLong_Check(obj.ptr())) if (_PyLong_Sign(obj.ptr()) >= 0)
{
if (_PyLong_NumBits(obj.ptr()) > 64)
throw pykd::OverflowException("int too big to convert");
var.setULongLong(PyLong_AsUnsignedLongLong(obj.ptr()));
}
else
{ {
if (_PyLong_NumBits(obj.ptr()) > 63) if (_PyLong_NumBits(obj.ptr()) > 63)
{ throw pykd::OverflowException("int too big to convert");
if (_PyLong_NumBits(obj.ptr()) > 64)
throw pykd::OverflowException("int too big to convert");
var.setULongLong(PyLong_AsUnsignedLongLong(obj.ptr())); var.setLongLong(PyLong_AsLongLong(obj.ptr()));
}
else
{
var.setLongLong(PyLong_AsLongLong(obj.ptr()));
}
return var;
} }
throw kdlib::TypeException(L"failed convert argument");
return var;
} }
static python::object NumVariantAdaptor::convertToPython( const kdlib::NumVariant& var ) static python::object NumVariantAdaptor::convertToPython( const kdlib::NumVariant& var )
@ -282,7 +281,7 @@ public:
static std::string hex(kdlib::NumConvertable& var) { static std::string hex(kdlib::NumConvertable& var) {
kdlib::NumVariant v = var; kdlib::NumVariant v = var;
return _bstr_t(v.asHex().c_str()); return std::string("0x") + std::string(_bstr_t(v.asHex().c_str()));
} }
static bool isInteger(kdlib::NumConvertable& var) { static bool isInteger(kdlib::NumConvertable& var) {

View File

@ -12,8 +12,6 @@ namespace python = boost::python;
#include "dbgexcept.h" #include "dbgexcept.h"
#include "pydbgio.h" #include "pydbgio.h"
#include <python.h>
using namespace kdlib::windbg; using namespace kdlib::windbg;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -230,16 +228,16 @@ KDLIB_EXT_COMMAND_METHOD_IMPL(PykdExt, py)
{ {
PyInterpreterState *interpreter = localState->interp; PyInterpreterState *interpreter = localState->interp;
//while( interpreter->tstate_head != NULL ) while( interpreter->tstate_head != NULL )
//{ {
// PyThreadState *threadState = (PyThreadState*)(interpreter->tstate_head); PyThreadState *threadState = (PyThreadState*)(interpreter->tstate_head);
// PyThreadState_Clear(threadState); PyThreadState_Clear(threadState);
// PyThreadState_Swap( NULL ); PyThreadState_Swap( NULL );
// PyThreadState_Delete(threadState); PyThreadState_Delete(threadState);
//} }
PyInterpreterState_Clear(interpreter); PyInterpreterState_Clear(interpreter);

View File

@ -17,15 +17,3 @@ py -3.7 setup.py bdist_zip --plat-name=win32
py -3.7 setup.py bdist_zip --plat-name=win-amd64 py -3.7 setup.py bdist_zip --plat-name=win-amd64
py -3.7 setup.py bdist_wheel --plat-name=win32 --python-tag=cp37 py -3.7 setup.py bdist_wheel --plat-name=win32 --python-tag=cp37
py -3.7 setup.py bdist_wheel --plat-name=win-amd64 --python-tag=cp37 py -3.7 setup.py bdist_wheel --plat-name=win-amd64 --python-tag=cp37
py -3.8 setup.py bdist_zip --plat-name=win32
py -3.8 setup.py bdist_zip --plat-name=win-amd64
py -3.8 setup.py bdist_wheel --plat-name=win32 --python-tag=cp38
py -3.8 setup.py bdist_wheel --plat-name=win-amd64 --python-tag=cp38
py -3.9 setup.py bdist_zip --plat-name=win32
py -3.9 setup.py bdist_zip --plat-name=win-amd64
py -3.9 setup.py bdist_wheel --plat-name=win32 --python-tag=cp39
py -3.9 setup.py bdist_wheel --plat-name=win-amd64 --python-tag=cp39
py setup.py bdist_pdb

View File

@ -5,11 +5,10 @@ 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.15' _version = '0.3.4.1'
def getReleaseSrc(): def getReleaseSrc():
return 'Release_%d.%d' % sys.version_info[0:2] return 'Release_%d.%d' % sys.version_info[0:2]
@ -61,7 +60,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"
@ -107,25 +106,6 @@ elif "bdist_zip" in sys.argv:
print("OK") print("OK")
elif "bdist_pdb" in sys.argv:
#make pdb archive
pyVersion = ('2.7', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11')
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
@ -142,4 +122,127 @@ elif "bdist_pdb" 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)

View File

@ -227,7 +227,7 @@ class IpPacket:
s += "\tflags: %x\n" % self.flags s += "\tflags: %x\n" % self.flags
s += "\toffset: %x" % ( self.offset * 8) s += "\toffset: %x" % ( self.offset * 8)
if ( self.offset == 0 ) and ( self.flags & 0x4 == 0 ): if ( self.offset == 0 ) and ( self.flags & 0x4 == 0 ):
s += " (not fragmented)\n" s += " (not fargmented)\n"
elif self.offset == 0 : elif self.offset == 0 :
s += " (first fragment)\n" s += " (first fragment)\n"
elif not ( self.flags & 0x4 == 0 ): elif not ( self.flags & 0x4 == 0 ):
@ -480,7 +480,7 @@ def getPacketsFromNbl( nblAddr ):
except TypeException: except TypeException:
dprintln( "the symbols are wrong" ) dprintln( "the symbols ar wrong" )
def printNblStruct( nblAddr, showNdisStruct = False, beginProtocol="eth", beginOffset=0 ): def printNblStruct( nblAddr, showNdisStruct = False, beginProtocol="eth", beginOffset=0 ):
@ -525,7 +525,7 @@ def printNblStruct( nblAddr, showNdisStruct = False, beginProtocol="eth", beginO
except TypeException: except TypeException:
dprintln( "the symbols are wrong" ) dprintln( "the symbols ar wrong" )
def main(): def main():
@ -536,7 +536,7 @@ def main():
parser = OptionParser(usage="usage: !py nbl [options] address") parser = OptionParser(usage="usage: !py nbl [options] address")
parser.add_option("-s", "--struct", action="store_true", dest="showNdisStruct", default=False, help="Show NDIS structures" ) parser.add_option("-s", "--struct", action="store_true", dest="showNdisStruct", default=False, help="Show NDIS structures" )
parser.add_option("-p", "--proto", action="store", type="string", dest="startProtocol", default="eth", help="Packet protocol. Can be eth, ip4, ip6, tcp, udp. By default - eth." ) parser.add_option("-p", "--proto", action="store", type="string", dest="startProtocol", default="eth", help="Packet protocol. Can be eth, ip4, ip6, tcp, udp. By default - eth." )
parser.add_option("-o", "--offset", action="store", type="long", dest="beginOffset", default=0, help="Bytes offset from packet beginning" ) parser.add_option("-o", "--offset", action="store", type="long", dest="beginOffset", default=0, help="Bytes offset from packet begining" )
parser.add_option("-r", "--raw", action="store_true", dest="rawBuffer", default=False, help="Show raw buffer") parser.add_option("-r", "--raw", action="store_true", dest="rawBuffer", default=False, help="Show raw buffer")
(options, args) = parser.parse_args() (options, args) = parser.parse_args()

View File

@ -6,7 +6,7 @@ import sys
def usage(): def usage():
print("python pytowiki.py module_name output_file") print "python pytowiki.py module_name output_file"
class CodeplexFormatter: class CodeplexFormatter:
@ -134,7 +134,7 @@ def buildDoc( ioStream, formatter, apiInfo ):
ioStream.write( formatter.bulletItem( formatter.link( p[0], cls.__name__ + "." + p[0]) ) ) ioStream.write( formatter.bulletItem( formatter.link( p[0], cls.__name__ + "." + p[0]) ) )
ioStream.write( formatter.endl() ) ioStream.write( formatter.endl() )
methods = list(filter( lambda m: m.__doc__ != None, cls.methods ) ) methods = filter( lambda m: m.__doc__ != None, cls.methods )
if methods: if methods:
ioStream.write( formatter.header4( "Methods:") ) ioStream.write( formatter.header4( "Methods:") )
@ -174,7 +174,7 @@ def main():
module = __import__( moduleName ) module = __import__( moduleName )
with open( fileName, "w" ) as wikiIo: with file( fileName, "w" ) as wikiIo:
apiInfo = ModuleInfo( module ) apiInfo = ModuleInfo( module )
@ -185,7 +185,7 @@ def main():
except ImportWarning: except ImportWarning:
print("failed to import module ", moduleName) print "failed to import module " + moduleName
if __name__ == "__main__": if __name__ == "__main__":

View File

@ -6,7 +6,7 @@ import os
class ARM64DumpTest(unittest.TestCase): class ARM64DumpTest(unittest.TestCase):
def setUp(self): def setUp(self):
dump_file = os.path.join( os.path.dirname(sys.argv[0]), dump_file = os.path.join( os.path.dirname(sys.argv[0]),
r"..\..\kdlibcpp\kdlib\tests\dumps\win10_arm64_mem\win10_arm64_mem.cab" ) r"..\..\kdlibcpp\kdlib\tests\dumps\win10_arm64_mem.cab" )
self.dump_id = pykd.loadDump( dump_file ) self.dump_id = pykd.loadDump( dump_file )
def tearDown(self): def tearDown(self):

View File

@ -6,7 +6,7 @@ import os
class ARMDumpTest(unittest.TestCase): class ARMDumpTest(unittest.TestCase):
def setUp(self): def setUp(self):
dump_file = os.path.join( os.path.dirname(sys.argv[0]), dump_file = os.path.join( os.path.dirname(sys.argv[0]),
r"..\..\kdlibcpp\kdlib\tests\dumps\win10_arm_rpi3_mem\win10_arm_rpi3_mem.cab" ) r"..\..\kdlibcpp\kdlib\tests\dumps\win10_arm_rpi3_mem.cab" )
self.dump_id = pykd.loadDump( dump_file ) self.dump_id = pykd.loadDump( dump_file )
def tearDown(self): def tearDown(self):

View File

@ -3,36 +3,23 @@ import unittest
import target import target
import pykd import pykd
class OutHandler( pykd.eventHandler ): class handler( pykd.eventHandler ):
def __init__(self): def __init__(self):
pykd.eventHandler.__init__(self) pykd.eventHandler.__init__(self)
self.out_counter=0 self.counter=0
self.verbose_counter = 0
def onDebugOutput(self, text, mask): def onException(self, param):
if mask == pykd.outputFlag.Normal: self.counter += 1
self.out_counter += 1 return pykd.DEBUG_STATUS_NO_CHANGE
elif mask == pykd.outputFlag.Verbose:
self.verbose_counter += 1
class OutputHandlerTest( unittest.TestCase ): def onExecutionStatusChange(self,status):
print status
def setUp(self): class EventTest( unittest.TestCase ):
self.oldMask = pykd.getOutputMask()
self.handler = OutHandler()
def tearDown(self): def testDebugBreak( self ):
pykd.killAllProcesses() h = handler()
pykd.setOutputMask(self.oldMask) pykd.go()
pykd.go()
def testDebugOutput(self): self.assertEqual( 2, h.counter )
pykd.startProcess( target.appPath )
self.assertTrue( 0 < self.handler.out_counter)
self.assertFalse( 0 < self.handler.verbose_counter)
def testDebugOutputMask(self):
pykd.setOutputMask(pykd.outputFlag.Normal | pykd.outputFlag.Verbose)
pykd.startProcess( target.appPath )
self.assertTrue( 0 < self.handler.out_counter)
self.assertTrue( 0 < self.handler.verbose_counter)

View File

@ -183,12 +183,6 @@ class MemoryTest( unittest.TestCase ):
self.assertFalse( pykd.isValid( 0 ) ) self.assertFalse( pykd.isValid( 0 ) )
self.assertFalse( pykd.isValid( 0xDEADBEAF ) ) self.assertFalse( pykd.isValid( 0xDEADBEAF ) )
def testVaAttrib(self):
self.assertEqual( \
(pykd.memoryProtect.PageWriteCopy, pykd.memoryState.Commit, pykd.memoryType.Image), \
pykd.getVaAttributes(target.module.begin()) \
)
def testPtrList( self ): def testPtrList( self ):
lst = pykd.loadPtrList( target.module.g_listHead ) lst = pykd.loadPtrList( target.module.g_listHead )
self.assertEqual( 5, len( lst ) ) self.assertEqual( 5, len( lst ) )

View File

@ -139,25 +139,4 @@ class ModuleTest( unittest.TestCase ):
def testModuleList(self): def testModuleList(self):
self.assertTrue( [] != pykd.getModulesList() ) self.assertTrue( [] != pykd.getModulesList() )
def testContain(self):
self.assertTrue("voidPtr" in target.module)
self.assertTrue("structTest" in target.module)
self.assertFalse("NotExist" in target.module)
self.assertRaises(Exception, lambda md : 2 in md, target.module)
def testGetByKey(self):
self.assertFalse(None == target.module["voidPtr"])
self.assertFalse(None == target.module["structTest"] )
self.assertRaises(KeyError, lambda md : target.module["Not Exist"], target.module)
def testEvalInModuleScope(self):
self.assertEqual( target.module.rva('voidPtr'), eval("voidPtr - %#x" % target.module.begin(), globals(), target.module) )
def testHasSymbol(self):
self.assertTrue(target.module.hasSymbol("voidPtr"))
self.assertTrue(target.module.hasSymbol("structTest"))
self.assertFalse(target.module.hasSymbol("notExists"))
def testPrint(self):
modAsStr = str(target.module)

View File

@ -30,7 +30,6 @@ import synsymtest
import taggedtest import taggedtest
import arm64dumptest import arm64dumptest
import armdumptest import armdumptest
import eventtest
pykd.initialize() pykd.initialize()
@ -66,16 +65,12 @@ 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( stacktest.DiaRegToRegRelativeI386Test ),
unittest.TestLoader().loadTestsFromTestCase( stacktest.DiaRegToRegRelativeAmd64Test ),
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 ),
unittest.TestLoader().loadTestsFromTestCase( taggedtest.TaggedTest ), unittest.TestLoader().loadTestsFromTestCase( taggedtest.TaggedTest ),
unittest.TestLoader().loadTestsFromTestCase( arm64dumptest.ARM64DumpTest ), unittest.TestLoader().loadTestsFromTestCase( arm64dumptest.ARM64DumpTest ),
unittest.TestLoader().loadTestsFromTestCase( armdumptest.ARMDumpTest ), unittest.TestLoader().loadTestsFromTestCase( armdumptest.ARMDumpTest ),
unittest.TestLoader().loadTestsFromTestCase( eventtest.OutputHandlerTest ),
#unittest.TestLoader().loadTestsFromTestCase( excepttest.ExceptionTest ), #unittest.TestLoader().loadTestsFromTestCase( excepttest.ExceptionTest ),
] ) ] )
@ -96,7 +91,7 @@ if __name__ == "__main__":
target.moduleName = os.path.splitext(os.path.basename(target.appPath))[0] target.moduleName = os.path.splitext(os.path.basename(target.appPath))[0]
unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run( getTestSuite() ) unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run( getTestSuite() )
#unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run( getTestSuite("typedvar.TypedVarTest.testEvalExprScopeLong") ) #unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run( getTestSuite("typedvar.TypedVarTest.testAttr") )
try: input = raw_input try: input = raw_input
except NameError: pass except NameError: pass

View File

@ -8,18 +8,18 @@
<StartupFile>pykdtest.py</StartupFile> <StartupFile>pykdtest.py</StartupFile>
<SearchPath> <SearchPath>
</SearchPath> </SearchPath>
<WorkingDirectory>C:\Users\User\Documents\projects\pykd2017\out\x64\Debug_3.7</WorkingDirectory> <WorkingDirectory>..\..\out\x64\Debug_2.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:\Users\User\Documents\projects\pykd2017\out\x64\Debug_2.7\targetapp.exe</CommandLineArguments> <CommandLineArguments>C:\proj\pykd-dev\out\x64\Debug\targetapp.exe</CommandLineArguments>
<InterpreterPath /> <InterpreterPath />
<InterpreterArguments> <InterpreterArguments>
</InterpreterArguments> </InterpreterArguments>
<EnableNativeCodeDebugging>True</EnableNativeCodeDebugging> <EnableNativeCodeDebugging>True</EnableNativeCodeDebugging>
<IsWindowsApplication>False</IsWindowsApplication> <IsWindowsApplication>False</IsWindowsApplication>
<InterpreterId>Global|PythonCore|3.7</InterpreterId> <InterpreterId>Global|PythonCore|2.7</InterpreterId>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -63,8 +63,6 @@
<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" />

View File

@ -1,7 +1,4 @@
import unittest import unittest
import os
import sys
import pykd import pykd
import target import target
@ -58,81 +55,3 @@ class StackTest(unittest.TestCase):
self.assertEqual(0, len(topFrame.getLocals())) self.assertEqual(0, len(topFrame.getLocals()))
class InlineStackTest(unittest.TestCase):
def setUp(self):
dumpDir = os.path.join( os.path.dirname(sys.argv[0]), r"..\..\kdlibcpp\kdlib\tests\dumps\targetapp_stacktest_x64_release")
dump_file = os.path.join( dumpDir, "targetapp_stacktest_x64_release.cab" )
self.symbolPath = pykd.getSymbolPath()
symbolPath = self.symbolPath + ";" + dumpDir
pykd.setSymbolPath(symbolPath)
self.dump_id = pykd.loadDump( dump_file )
def tearDown(self):
pykd.closeDump( self.dump_id )
pykd.setSymbolPath(self.symbolPath)
def testGetStack(self):
expectedStack = [
'targetapp!stackTestClass::stackMethod',
'targetapp!stackTestRun2',
'targetapp!stackTestRun1',
'targetapp!stackTestRun']
realStack = []
for frame in pykd.getStack(inlineFrames = True):
moduleName, symbolName, disp = frame.findSymbol()
realStack.append( "%s!%s" % ( moduleName, symbolName ) )
self.assertEqual( expectedStack, realStack[0:4])
def testFrameIsInline(self):
self.assertEqual([True, True, False, True],
[fr.isInline() for fr in pykd.getStack(inlineFrames = True)][:4]
)
def testGetSourceLine(self):
expectedStack = ['targetapp.cpp+129', 'targetapp.cpp+144', 'targetapp.cpp+172', 'targetapp.cpp+185']
realStack = []
for frame in pykd.getStack(inlineFrames = True)[:4]:
fileName, lineNo = frame.getSourceLine()
realStack.append("%s+%s" % ( os.path.basename(fileName), lineNo ) )
self.assertEqual( expectedStack, realStack)
class DiaRegToRegRelativeI386Test(unittest.TestCase):
def setUp(self):
dumpDir = os.path.join( os.path.dirname(sys.argv[0]), r"..\..\kdlibcpp\kdlib\tests\dumps\targetapp_test_cv_allreg_i386")
dump_file = os.path.join( dumpDir, "targetapp_test_cv_allreg_i386.cab" )
self.symbolPath = pykd.getSymbolPath()
symbolPath = self.symbolPath + ";" + dumpDir
pykd.setSymbolPath(symbolPath)
self.dump_id = pykd.loadDump( dump_file )
def tearDown(self):
pykd.closeDump( self.dump_id )
pykd.setSymbolPath(self.symbolPath)
def testParams(self):
params = pykd.getFrame().getParams()
self.assertNotEqual(0, len(params))
class DiaRegToRegRelativeAmd64Test(unittest.TestCase):
def setUp(self):
dumpDir = os.path.join( os.path.dirname(sys.argv[0]), r"..\..\kdlibcpp\kdlib\tests\dumps\targetapp_test_cv_allreg_amd64")
dump_file = os.path.join( dumpDir, "targetapp_test_cv_allreg_amd64.cab" )
self.symbolPath = pykd.getSymbolPath()
symbolPath = self.symbolPath + ";" + dumpDir
pykd.setSymbolPath(symbolPath)
self.dump_id = pykd.loadDump( dump_file )
def tearDown(self):
pykd.closeDump( self.dump_id )
pykd.setSymbolPath(self.symbolPath)
def testLocals(self):
locals = pykd.getFrame().getLocals()
self.assertNotEqual(0, len(locals))

View File

@ -28,15 +28,3 @@ class SynSymTest(unittest.TestCase):
self.assertRaises( pykd.DbgException, target.module.offset, "synSym2" ) self.assertRaises( pykd.DbgException, target.module.offset, "synSym2" )
self.assertRaises( pykd.DbgException, pykd.removeSyntheticSymbol, _synsym ) self.assertRaises( pykd.DbgException, pykd.removeSyntheticSymbol, _synsym )
def testModule(self):
"""Add and remove synthetic module"""
base = 64 * 1024
pykd.addSyntheticModule(base, 1024, "artificial_module1")
pykd.addSyntheticModule(base + 1024, 1024, "artificial_module2", "artificial_module2_path")
pykd.removeSyntheticSymbol( pykd.addSyntheticSymbol(base, 1, "artificial_symbol") )
pykd.removeSyntheticModule(base + 1024)
pykd.removeSyntheticModule(base)

View File

@ -6,7 +6,7 @@ import os
class TaggedTest(unittest.TestCase): class TaggedTest(unittest.TestCase):
def setUp(self): def setUp(self):
dump_file = os.path.join( os.path.dirname(sys.argv[0]), dump_file = os.path.join( os.path.dirname(sys.argv[0]),
r"..\..\kdlibcpp\kdlib\tests\dumps\win8_x64_mem\win8_x64_mem.cab" ) r"..\..\kdlibcpp\kdlib\tests\dumps\win8_x64_mem.cab" )
self.dump_id = pykd.loadDump( dump_file ) self.dump_id = pykd.loadDump( dump_file )
self._existing_id = "D03DC06F-D88E-44C5-BA2A-FAE035172D19" self._existing_id = "D03DC06F-D88E-44C5-BA2A-FAE035172D19"

View File

@ -21,14 +21,6 @@ class TypedVarTest( unittest.TestCase ):
tv = pykd.typedVar( "g_structTest" ) tv = pykd.typedVar( "g_structTest" )
tv = pykd.typedVar( target.moduleName + "!g_structTest" ) tv = pykd.typedVar( target.moduleName + "!g_structTest" )
def testCompareWithNone(self):
tv = target.module.typedVar( "ucharVar" )
self.assertFalse(tv == None)
self.assertTrue(tv != None)
self.assertFalse(not tv)
self.assertTrue(tv)
def testBaseTypes(self): def testBaseTypes(self):
self.assertEqual( 10, target.module.typedVar( "ucharVar" ) ) self.assertEqual( 10, target.module.typedVar( "ucharVar" ) )
self.assertEqual( 1020, target.module.typedVar( "ushortVar" ) ) self.assertEqual( 1020, target.module.typedVar( "ushortVar" ) )
@ -303,8 +295,8 @@ class TypedVarTest( unittest.TestCase ):
def testUdtSubscribe(self): def testUdtSubscribe(self):
tv = pykd.typedVar( "g_virtChild" ) tv = pykd.typedVar( "g_virtChild" )
self.assertEqual( 6, len(tv) ) self.assertEqual( 6, len(tv) )
fieldName = tv.fieldName(3) fieldName = tv.fieldName(5)
fieldVal = tv.field(3) fieldVal = tv.field(5)
self.assertEqual( fieldName, "m_baseField" ) self.assertEqual( fieldName, "m_baseField" )
self.assertEqual( fieldVal, tv.m_baseField ) self.assertEqual( fieldVal, tv.m_baseField )
@ -445,60 +437,10 @@ class TypedVarTest( unittest.TestCase ):
def testAttr(self): def testAttr(self):
var = target.module.typedVar("structTest", [0x55] * 20 ) var = target.module.typedVar("structTest", [0x55] * 20 )
self.assertTrue(hasattr(var, "m_field3"))
setattr(var, "m_field1", 11) setattr(var, "m_field1", 11)
self.assertEqual(11, getattr(var, "m_field1")) self.assertEqual(11, getattr(var, "m_field1"))
self.assertRaises(AttributeError, lambda x: getattr(x, "noexists"), var)
def testEvalPyScope(self):
var = target.module.typedVar("structTest", [0x55] * 20 )
self.assertEqual( var.m_field1 * 17, eval("m_field1 * 17", globals(), var) )
def testEvalExpr(self):
self.assertEqual( 2+2, pykd.evalExpr("2+2") )
self.assertEqual( target.module.typedVar("g_structTest").m_field1, pykd.evalExpr("g_structTest.m_field1") )
self.assertEqual( target.module.typedVar("g_testArray")[1].m_field3, pykd.evalExpr("(g_testArray + 1)->m_field3") )
def testEvalExprScope(self):
v1 = target.module.typedVar( "ulongVar" )
v2 = target.module.typedVar( "g_structTest" )
scope = { "v1" : v1, "v2" : v2 }
self.assertEqual( v1 + v2.m_field1, pykd.evalExpr("v1 + v2.m_field1", scope) )
def testEvalExprScopeLong(self):
v1 = 100
v2 = -500
scope = { "v1" : v1, "v2" : v2 }
self.assertEqual( v1 + v2, pykd.evalExpr("v1 + v2", scope))
self.assertEqual( v1 * v2, pykd.evalExpr("v1 * v2", locals()))
def testEvalExprScopeStruct(self):
var = pykd.typedVar("g_structTest1")
self.assertEqual(var.m_field1, pykd.evalExpr("m_field1", var))
self.assertEqual(var.m_field4.deref().m_field1, pykd.evalExpr("m_field4->m_field1", var))
def testEvalExprSizeof(self):
self.assertEqual(4, pykd.evalExpr("sizeof(int)"))
self.assertEqual(4, pykd.evalExpr("sizeof(int&)"))
self.assertEqual(pykd.ptrSize() * 10, pykd.evalExpr("sizeof(int*[10])"))
self.assertEqual(pykd.ptrSize(), pykd.evalExpr("sizeof(int(*)[10])"))
def testContain(self):
var = pykd.typedVar("g_structTest")
self.assertTrue("m_field1" in var)
self.assertFalse("NotExist" in var)
self.assertRaises(Exception, lambda var : 2 in var, var)
def testHasField(self):
var = pykd.typedVar("g_structTest")
self.assertTrue(var.hasField("m_field1"))
self.assertFalse(var.hasField("NotExist"))
def testHasMethod(self):
var = pykd.typedVar("g_classChild")
self.assertTrue(var.hasMethod("childMethod"))
self.assertTrue(var.hasMethod("staticMethod"))
self.assertTrue(var.hasMethod("virtMethod1"))
self.assertFalse(var.hasMethod("notExist"))
self.assertFalse(hasattr(var, "noexisit"))
self.assertRaises(AttributeError, getattr, *(var, "noexists"))
self.assertRaises(AttributeError, setattr, *(var, "noexists", 0))

View File

@ -40,9 +40,11 @@ class TypeInfoTest( unittest.TestCase ):
""" get field of the complex type """ """ get field of the complex type """
ti1 = target.module.type( "structTest" ) ti1 = target.module.type( "structTest" )
self.assertTrue( "UInt4B", ti1.m_field0.name() ) self.assertTrue( "UInt4B", ti1.m_field0.name() )
self.assertTrue( "m_field0" in ti1 ) self.assertTrue( "UInt4B", ti1["m_field0"].name() )
self.assertFalse( "not_exist" in ti1) # non-exsisting field self.assertTrue( hasattr( ti1, "m_field0" ) )
self.assertFalse( hasattr( ti1, "not_exists" ) )
self.assertRaises( AttributeError, lambda t: t.not_exists, ti1) # non-exsisting field self.assertRaises( AttributeError, lambda t: t.not_exists, ti1) # non-exsisting field
self.assertRaises( KeyError, lambda t: t["not_exists"], ti1) # non-exsisting field
def testBaseTypes( self ): def testBaseTypes( self ):
@ -162,21 +164,21 @@ class TypeInfoTest( unittest.TestCase ):
self.assertEqual( "structTest", ti.deref().name() ) self.assertEqual( "structTest", ti.deref().name() )
ti = pykd.typeInfo("structTest[2]") ti = pykd.typeInfo("structTest[2]")
self.assertEqual( "structTest", ti.deref().name() ) self.assertRaises( pykd.TypeException, ti.deref );
ti = target.module.type("classChild") ti = target.module.type("classChild")
self.assertRaises( pykd.TypeException, ti.deref ) self.assertRaises( pykd.TypeException, ti.deref );
def testNestedStruct( self ): def testNestedStruct( self ):
ti = target.module.type("structWithNested") ti = target.module.type("structWithNested")
self.assertTrue( ti.hasField("m_field")) self.assertTrue( hasattr( ti, "m_field" ) )
self.assertTrue( ti.hasField("m_field3")) self.assertTrue( hasattr( ti, "m_field3" ) )
self.assertTrue( ti.hasField("m_unnameStruct")) self.assertTrue( hasattr( ti, "m_unnameStruct" ) )
self.assertTrue( ti.m_unnameStruct.hasField("m_field2")) self.assertTrue( hasattr( ti.m_unnameStruct, "m_field2" ) )
self.assertFalse( ti.hasField( "m_field2" ) ) self.assertFalse( hasattr( ti, "m_field2" ) )
self.assertFalse( ti.hasField( "m_nestedFiled" ) ) self.assertFalse( hasattr( ti, "m_nestedFiled" ) )
ti = target.module.type("structWithNested::Nested") ti = target.module.type("structWithNested::Nested")
self.assertTrue( ti.hasField( "m_nestedFiled" ) ) self.assertTrue( hasattr( ti, "m_nestedFiled" ) )
def testPrint(self): def testPrint(self):
self.assertTrue( str(target.module.type( "ucharVar" ) ) ) self.assertTrue( str(target.module.type( "ucharVar" ) ) )
@ -242,12 +244,16 @@ class TypeInfoTest( unittest.TestCase ):
ti = pykd.typeInfo("UInt8B").arrayOf(10) ti = pykd.typeInfo("UInt8B").arrayOf(10)
self.assertTrue( "UInt8B[10]", ti.name() ) self.assertTrue( "UInt8B[10]", ti.name() )
def testCompareWithNone(self): def testCompareWihNone(self):
ti = pykd.typeInfo("UInt8B") ti = pykd.typeInfo("UInt8B")
self.assertFalse(ti == None) if ti == None:
self.assertTrue(ti != None) pass
self.assertFalse(not ti) if ti != None:
self.assertTrue(ti) pass
if not ti:
pass
if ti:
pass
def testFunction(self): def testFunction(self):
functype = target.module.typedVar( "CdeclFuncPtr" ).type().deref() functype = target.module.typedVar( "CdeclFuncPtr" ).type().deref()
@ -345,48 +351,17 @@ class TypeInfoTest( unittest.TestCase ):
self.assertEqual( classChild.baseClassOffset(0), classChild.baseClassOffset('classBase1')) self.assertEqual( classChild.baseClassOffset(0), classChild.baseClassOffset('classBase1'))
self.assertEqual(classChild.baseClassOffset(1), classChild.baseClassOffset('classBase2')) self.assertEqual(classChild.baseClassOffset(1), classChild.baseClassOffset('classBase2'))
def testPdbTypeProvider(self): def testPdbTypeProvider(self):
pdb = target.module.symfile() pdb = target.module.symfile()
typeProvider = pykd.getTypeInfoProviderFromPdb(pdb) typeProvider = pykd.getTypeInfoProviderFromPdb(pdb)
self.assertEqual("structTest", typeProvider.getTypeByName("structTest").name()) self.assertEqual("structTest", typeProvider.getTypeByName("structTest").name())
self.assertEqual("structTest", typeProvider.structTest.name()) self.assertEqual("structTest", typeProvider.structTest.name())
self.assertEqual(15, len(list(typeProvider.typeIterator("*struct*")))) self.assertEqual(22, len(list(typeProvider.typeIterator("*struct*"))))
def testScopeName(self): def testScopeName(self):
self.assertEqual( target.module.name(), pykd.typeInfo( "structTest" ).scopeName() ) self.assertEqual( target.module.name(), pykd.typeInfo( "structTest" ).scopeName() )
self.assertEqual( target.module.name(), pykd.typeInfo( "structWithNested::Nested" ).scopeName() ) self.assertEqual( target.module.name(), pykd.typeInfo( "structWithNested::Nested" ).scopeName() )
def testContain(self):
ti = target.module.type( "structTest" )
self.assertTrue("m_field1" in ti)
self.assertFalse("NotExist" in ti)
self.assertRaises(Exception, lambda t : 2 in t, ti)
def testTemplateType(self):
ti = target.module.type("g_testTemplateTwoTypes")
self.assertTrue(ti.isTemplate)
self.assertEqual(['int', 'TestClassTemplate<int>'], ti.getTemplateArgs() )
def testMembers(self):
self.assertEqual(
['__VFN_table', '__VFN_table', 'm_staticConst', 'm_staticField', 'm_childField',
'm_childField2', 'm_childField3', 'm_enumField'],
[ member[0] for member in pykd.typeInfo( "classChild" ).members() ])
def testIsStaticField(self):
ti = pykd.typeInfo("classChild")
self.assertTrue(ti.isStaticField("m_staticField"))
self.assertFalse(ti.isStaticField("m_baseField"))
def testIsConstField(self):
ti = pykd.typeInfo("classChild")
self.assertTrue(ti.isStaticField("m_staticConst"))
self.assertFalse(ti.isConstField("m_staticConst"))
#def testClangCompile(self):
# src_code = '#include <windows.h>\r\n'
# include_path = '"C:/Program Files (x86)/Windows Kits/8.1/Include/um";"C:/Program Files (x86)/Windows Kits/8.1/Include/shared'
# compile_opts = '-I%s -w' % include_path
# symbolEnum = pykd.getSymbolProviderFromSource(src_code, compile_opts)
# for symName, _, symType in symbolEnum :
# print( symName, symType.name() )