Compare commits

...

83 Commits

Author SHA1 Message Date
Colin Xu
98980c4414 Enable pykd for python 3.10.
Signed-off-by: Colin Xu <colin.xu@gmail.com>
2023-02-21 20:50:54 -08:00
Colin Xu
bd66633136 Update kdlibcpp submodule to fork repo.
Signed-off-by: Colin Xu <Colin.Xu@gmail.com>
2023-02-17 16:21:18 +08:00
ussrhero
eeabea3f8d Update README.md 2020-10-21 14:16:34 -04:00
ussrhero
29a0fc0c09 Merge branch '0.3.4.15' into '0.3.2'
0.3.4.15

See merge request pykd/pykd!12
2020-10-21 14:14:57 -04:00
ussrhero
22cf84b27e 0.3.4.15 2020-10-21 14:14:57 -04:00
ussrhero
8bd990fcf6 Merge branch '0.3.4.14' into '0.3.2'
0.3.4.14

See merge request pykd/pykd!11
2020-05-27 17:56:23 -04:00
ussrhero
6e966b96be added getDumpFormat ( returns format of the dump ) 2020-05-28 00:28:30 +03:00
ussrhero
8167656e04 added getDumpType ( returns dump's type ) 2020-05-28 00:03:38 +03:00
ussrhero
cf27e9072d change kdlibcpp version to 0.3.4.15 2020-05-27 21:46:44 +03:00
ussrhero
fe85b1e6a5 fixed getVaState function 2020-04-04 10:57:42 +03:00
ussrhero
46382d24fa Merge branch '0.3.4.13' into 0.3.2 2020-03-28 11:58:08 +03:00
ussrhero
7bc86e0c53 fixed tests 2020-03-28 11:49:50 +03:00
ussrhero
5bfa947185 set kdlib to 1.2.14 2020-03-21 18:32:34 +03:00
ussrhero
c36dafa380 Merge branch 'm417z/pykd-patch-1' into 0.3.2 2020-03-21 12:39:03 +03:00
ussrhero
d8f99d73e8 Merge branch 'patch-2' into '0.3.2'
Update nbl.py - fixed typos

See merge request pykd/pykd!9
2020-03-20 17:04:38 -04:00
Michael
33787db547 Update nbl.py - fixed typos 2020-03-17 12:45:54 -04:00
Michael
cccc1103b1 Update pymod.cpp - fix a couple of typos 2020-03-17 12:43:09 -04:00
ussrhero
dfb935f3f8 added : additional parameter for debugCommand routine to control an output mask 2020-03-16 23:12:47 +03:00
ussrhero
fce592816d added : new typeInfo cache 2020-03-16 21:45:12 +03:00
ussrhero
f9a0361d85 started work at 0.3.4.13 2020-03-16 21:41:53 +03:00
ussrhero
af9127d5d5 Update README.md 2020-02-15 05:18:49 -05:00
ussrhero
25fbe8a6f6 added : getVaState ( state of memory: commited, reserved, free)
added : getVaType ( type of memory: image, mapped, private )
added : getVaAttributes ( returns tuple of (protect, state, type) )
2020-02-14 00:52:58 +03:00
ussrhero
fcf6d9927b fixed issue #65 (getting element by index from pointer works incorrectly) 2020-02-09 20:38:54 +03:00
ussrhero
eb6b11a55d fixed issue #64 ( evalExpr raise exception with template with const class ) 2020-02-08 14:36:51 +03:00
ussrhero
b2d7e2d7dc fixed printing struct with const members 2020-02-03 00:12:26 +03:00
ussrhero
52463eb340 fixed issue #61 ( evalExpr raises exception for code with wchar_t as a template argument ) 2020-01-04 23:51:37 +03:00
ussrhero
0f0c5667df started work at 0.3.4.12 2020-01-04 23:43:11 +03:00
ussrhero
be01beb07f change kdlibcpp version to 1.2.12 2020-01-02 15:54:31 +03:00
ussrhero
ad341bee9f fixed comparing typeInfo with None 2019-12-29 12:48:52 +03:00
ussrhero
a447202c6a revert changes for #50 2019-12-29 00:17:35 +03:00
ussrhero
c8d153a1d4 fixed functions description 2019-12-15 13:36:52 +03:00
ussrhero
0a1fc9bee3 Merge branch 'fix_amd64_cv_allreg' into '0.3.2'
Fix amd64 CV_ALLREG_VFRAME

See merge request pykd/pykd!7
2019-11-28 07:03:13 -05:00
Mikhail I. Izmestev
b17ac9dd05 update kdlib with fix for amd64 CV_ALLREG_VFRAME 2019-11-28 11:34:26 +04:00
Mikhail I. Izmestev
897b7fc82d add test cases for symbols with CV_ALLREG_VFRAME register 2019-11-28 11:33:29 +04:00
ussrhero
1af548beda python38 support 2019-10-20 09:37:30 +03:00
ussrhero
d68a9d82de updated wiki generator 2019-10-19 23:25:19 +03:00
ussrhero
c0943dd033 updated kdlibcpp version to 1.2.11 2019-10-02 22:44:00 +03:00
ussrhero
e22b4cd38a updated kdlibcpp version to 1.2.11 2019-10-02 00:28:11 +03:00
ussrhero
a99b758dd9 reworked symbol enumeration 2019-09-29 21:55:29 +03:00
ussrhero
15a99d60de updated kdlibcpp 2019-09-24 01:38:28 +03:00
ussrhero
490730dabc added : getSymbolEnumeratorFromSource routine (create symbol enumerator for source code) 2019-09-19 00:41:46 +03:00
ussrhero
85028a9a1b added TypeInfo.isConstField method (return True if a field is a const field) 2019-09-17 00:30:20 +03:00
ussrhero
7d9b0faffa added TypeInfo.isStaticField method ( return True if a field is a static field ) 2019-09-17 00:20:24 +03:00
ussrhero
0450a3abdf typedVar.members methods ( return defined members of class, not inherited) 2019-09-17 00:17:09 +03:00
ussrhero
a0f0905cf9 Merge branch '0.3.2' of https://githomelab.ru/pykd/pykd into 0.3.2 2019-09-02 23:48:10 +03:00
ussrhero
4de8114c3e added setStatusMessage ( set a message at a windbg status bar ) 2019-09-02 23:47:58 +03:00
Administrator
c28dac3979 Update README.md 2019-08-04 15:06:28 -04:00
ussrhero
b5f56b61c9 Update README.md 2019-08-03 05:48:13 -04:00
ussrhero
a3da177dc1 fixed typeinfo tests 2019-07-30 00:06:59 +03:00
ussrhero
badd9762a3 change kdlibcpp version to 1.2.10 2019-07-29 23:54:21 +03:00
ussrhero
10344dbd09 added : typeInfo.isTemplate method ( return true if type is template )
added : typeInfo.getTemplateArgs method ( return list of template args name )
2019-07-29 23:34:18 +03:00
ussrhero
852908bb40 Merge branch '0.3.2' of https://githomelab.ru/pykd/pykd into 0.3.2 2019-07-29 23:31:23 +03:00
ussrhero
daaa04a5a4 added : getHostProcessPath ( return image path of the process running python interpreter with a pykd ) 2019-07-29 23:30:50 +03:00
ussrhero
c23cea4249 Update README.md 2019-06-07 17:34:32 -04:00
ussrhero
dbbc41c16c change kdlibcpp version to 1.2.9 2019-06-07 23:31:55 +03:00
ussrhero
d5f4f146b1 Merge branch '0.3.2' of https://githomelab.ru/pykd/pykd into 0.3.2 2019-06-02 21:23:26 +03:00
ussrhero
924c31a9e0 added : typedVar.hasField ( check if a typedVar object has the specified field ) 2019-06-02 21:23:12 +03:00
ussrhero
3ab64bdc85 added : module.hasSymbol method (check if a module has the specified symbol) 2019-06-01 10:33:17 +03:00
ussrhero
5d5e634ace added typedInfo.hasField method 2019-06-01 00:24:17 +03:00
ussrhero
ee03c669ae fixed python long to typedVar conversion 2019-06-01 00:19:22 +03:00
ussrhero
11e38853dc fixed: #50 ( changed AttributeError to SymbolException ) 2019-05-30 00:48:27 +03:00
ussrhero
eaa9877096 Update README.md 2019-05-13 14:39:04 -04:00
ussrhero
babc6c691a Update README.md 2019-05-03 15:05:50 -04:00
ussrhero
89d5c3e5f9 added : stackFrame::getSourceLine method
:
2019-04-30 00:12:21 +03:00
ussrhero
877968ca92 added : stackFrame::isInline method 2019-04-29 23:45:12 +03:00
ussrhero
5d57560ec5 Merge branch '0.3.2' of https://githomelab.ru/pykd/pykd into 0.3.2 2019-04-29 22:08:10 +03:00
ussrhero
d47d70d71a fixed: #29 (support for inline in stack) 2019-04-29 22:07:50 +03:00
ussrhero
850e986a03 #42 add output of a timestamp as a readable date for module print 2019-04-29 22:05:21 +03:00
ussrhero
56ca5c68e3 set kdlibcpp to 1.2.8 2019-04-29 22:02:58 +03:00
ussrhero
1adbbb5811 adopted exsisting tests for new kdlibcpp 2019-04-21 13:06:39 +03:00
ussrhero
20a3c5904a set version to 3.4.6 2019-04-20 21:40:34 +03:00
ussrhero
1420b5b1a3 changed kdlibcpp version to 1.2.7 2019-04-20 21:36:18 +03:00
ussrhero
d848b61313 Update README.md 2019-02-20 15:19:29 -05:00
ussrhero
86e8383463 added : getOutputMask
added : setOutputMask
added : test for eventHanlder.onDebugOutput:
2019-02-20 00:48:41 +03:00
ussrhero
c6800333c3 move to the new stable kdlibcpp version 1.2.5 2019-02-11 18:55:24 +03:00
ussrhero
d1ac91ae71 adopted to new version kdlibcpp 2019-02-04 20:44:05 +03:00
Aleksey R
5f0d7125a4 add: addSyntheticModule, removeSyntheticModule 2019-01-10 20:08:14 +03:00
ussrhero
99b48ad0b4 added special method __contains__ for typedVar, typeInfo, module classes - support for 'in' operator 2019-01-04 16:37:14 +03:00
ussrhero
d7c18187af set kdlibcpp to stable 1.2.3 version 2019-01-03 23:55:33 +03:00
ussrhero
fc90ccc846 added: evalExpr routine ( Evaluate C++ expression with typed information ) 2018-12-29 02:01:52 +03:00
ussrhero
23c1376112 change kdlibcpp verison to 1.2.2 2018-11-17 14:59:57 +03:00
ussrhero
b90401000a updated pykd version 2018-11-15 00:36:11 +03:00
ussrhero
6ba76e15e4 updated kdlibcpp 2018-11-15 00:30:53 +03:00
42 changed files with 3910 additions and 2419 deletions

2
.gitignore vendored Normal file
View File

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

2
.gitmodules vendored
View File

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

View File

@ -1,4 +1,4 @@
# Pykd - python extension for WinDBG
# Pykd - not only python extension for WinDBG
## 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!
@ -6,15 +6,36 @@ This project can help to automate debugging and crash dump analysis using Python
## 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?
## Pykd bootstrapper
Use it to run pykd within windbg. [link](https://githomelab.ru/pykd/pykd-ext)
## Getting started
* You should have installed python. Supported python: 2.7, 3.5 - 3.9
* Install pykd with command: 'pip install pykd'
* Use windbg extension (bootstrapper) to run pykd with windbg
## Releases:
[Last Release](/../wikis/Last Release)
## Windbg extension (bootstarpper)
Use it to run pykd within windbg.
[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
[Wiki Home](/../wikis/Home)
[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 ?
* install VS 2017
@ -32,4 +53,14 @@ https://git-scm.com/
git clone --recurse-submodules https://githomelab.ru/pykd/pykd.git local_dir
```
* 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 b92e0fbcc0628b2e8dc320f79a2bb9464b8d9908
Subproject commit e54598d2f904acab23d340c93ce77c551a396ecb

150
pykd.sln
View File

@ -42,75 +42,126 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_2.7|Win32 = Debug_2.7|Win32
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|x64 = Debug_3.5|x64
Debug_3.6|Win32 = Debug_3.6|Win32
Debug_3.6|x64 = Debug_3.6|x64
Debug_3.7|Win32 = Debug_3.7|Win32
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|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|x64 = Release_3.5|x64
Release_3.6|Win32 = Release_3.6|Win32
Release_3.6|x64 = Release_3.6|x64
Release_3.7|Win32 = Release_3.7|Win32
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
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.Build.0 = 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|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|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|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|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|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|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|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|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|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|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|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|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|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|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|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|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|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|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|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|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|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|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|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.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.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.Build.0 = Debug|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.5|x64.ActiveCfg = Debug|x64
@ -123,10 +174,22 @@ Global
{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.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.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.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.Build.0 = Release_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.5|x64.ActiveCfg = Release_Static|x64
@ -139,10 +202,22 @@ Global
{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.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.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.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.Build.0 = Debug_3.5|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_3.5|x64.ActiveCfg = Debug_3.5|x64
@ -155,10 +230,22 @@ Global
{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.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.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.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.Build.0 = Release_3.5|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.5|x64.ActiveCfg = Release_3.5|x64
@ -171,10 +258,21 @@ Global
{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.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.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.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.Build.0 = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.5|x64.ActiveCfg = Debug|x64
@ -187,22 +285,42 @@ Global
{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.Build.0 = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Win32.ActiveCfg = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Win32.Build.0 = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|x64.ActiveCfg = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|x64.Build.0 = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.5|Win32.ActiveCfg = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.5|Win32.Build.0 = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.5|x64.ActiveCfg = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.5|x64.Build.0 = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|Win32.ActiveCfg = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|Win32.Build.0 = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|x64.ActiveCfg = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|x64.Build.0 = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|Win32.ActiveCfg = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|Win32.Build.0 = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|x64.ActiveCfg = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|x64.Build.0 = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.8|Win32.ActiveCfg = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.8|Win32.Build.0 = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.8|x64.ActiveCfg = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.8|x64.Build.0 = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.9|Win32.ActiveCfg = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.9|Win32.Build.0 = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.9|x64.ActiveCfg = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_3.9|x64.Build.0 = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Win32.ActiveCfg = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Win32.Build.0 = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|x64.ActiveCfg = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|x64.Build.0 = Debug|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.10|Win32.ActiveCfg = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.10|Win32.Build.0 = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.10|x64.ActiveCfg = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.10|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
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -105,7 +105,11 @@ 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.
char *f = const_cast<char *>(filename);
// Let python open the file to avoid potential binary incompatibilities.
#if PY_VERSION_HEX >= 0x03040000
#if PY_VERSION_HEX >= 0x030a0000
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");
#elif PY_VERSION_HEX >= 0x03000000
PyObject *fo = Py_BuildValue("s", f);

View File

@ -11,6 +11,10 @@
<package id="Python35" version="3.5.1.1" targetFramework="Native" />
<package id="Python36" version="3.6.0" 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="llvm-cmake" version="6.0.0.1" targetFramework="Native" />
</packages>

View File

@ -69,14 +69,14 @@ std::wstring getRegisterName(unsigned long index)
///////////////////////////////////////////////////////////////////////////////
python::list getCurrentStack()
python::list getStack(bool inlineFrames)
{
kdlib::StackPtr stack;
unsigned long numberFrames;
do {
AutoRestorePyState pystate;
stack = kdlib::getStack();
stack = kdlib::getStack(inlineFrames);
numberFrames = stack->getFrameCount();
} while(false);
@ -242,6 +242,37 @@ 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)
{

View File

@ -70,6 +70,16 @@ public:
AutoRestorePyState pystate;
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);
};
/////////////////////////////////////////////////////////////////////////////////
@ -157,7 +167,7 @@ inline void switchProcessorMode() {
kdlib::switchCPUMode();
}
python::list getCurrentStack();
python::list getStack(bool inlineFrames = false);
inline kdlib::StackFramePtr getCurrentFrame() {
AutoRestorePyState pystate;

View File

@ -163,6 +163,19 @@ 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()
{
kdlib::SystemCrashInfo crashInfo = {};
@ -213,4 +226,20 @@ 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

View File

@ -19,10 +19,10 @@ kdlib::PROCESS_DEBUG_ID startProcess(const std::wstring &processName, const kdl
}
inline
kdlib::PROCESS_DEBUG_ID attachProcess(kdlib::PROCESS_ID pid)
kdlib::PROCESS_DEBUG_ID attachProcess(kdlib::PROCESS_ID pid, const kdlib::ProcessDebugFlags& flags = kdlib::ProcessDebugDefault)
{
AutoRestorePyState pystate;
return kdlib::attachProcess(pid);
return kdlib::attachProcess(pid, flags);
}
inline
@ -104,13 +104,13 @@ bool isKernelDebugging()
inline
python::object debugCommand( const std::wstring &command, bool suppressOutput = true)
python::object debugCommand( const std::wstring &command, bool suppressOutput = true, const kdlib::OutputFlagsSet& captureFlags = kdlib::OutputFlag::Normal)
{
std::wstring debugResult;
{
AutoRestorePyState pystate;
debugResult = kdlib::debugCommand(command, suppressOutput);
debugResult = kdlib::debugCommand(command, suppressOutput, captureFlags);
}
if (debugResult.size() > 0 )
@ -133,6 +133,34 @@ void changeDebugOptions(kdlib::DebugOptionsSet &addOptions, kdlib::DebugOptionsS
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
@ -279,6 +307,7 @@ inline void setImplicitProcess(kdlib::MEMOFFSET_64 offset)
AutoRestorePyState pystate;
kdlib::setImplicitProcess(offset);
}
inline kdlib::MEMOFFSET_64 getImplicitProcessOffset()
{
AutoRestorePyState pystate;
@ -290,6 +319,8 @@ python::list getProcessThreads();
python::list getTargetProcesses();
python::list getLocalProcesses();
std::wstring getHostProcessPath();
///////////////////////////////////////////////////////////////////////////////
inline
@ -456,6 +487,9 @@ kdlib::SyntheticSymbol addSyntheticSymbol( kdlib::MEMOFFSET_64 offset, unsigned
void removeSyntheticSymbol(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

View File

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

View File

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

View File

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

View File

@ -9,6 +9,14 @@
<Configuration>Debug_2.7</Configuration>
<Platform>x64</Platform>
</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">
<Configuration>Debug_3.5</Configuration>
<Platform>Win32</Platform>
@ -33,6 +41,22 @@
<Configuration>Debug_3.7</Configuration>
<Platform>x64</Platform>
</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">
<Configuration>Release_2.7</Configuration>
<Platform>Win32</Platform>
@ -41,6 +65,14 @@
<Configuration>Release_2.7</Configuration>
<Platform>x64</Platform>
</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">
<Configuration>Release_3.5</Configuration>
<Platform>Win32</Platform>
@ -65,6 +97,22 @@
<Configuration>Release_3.7</Configuration>
<Platform>x64</Platform>
</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>
<PropertyGroup Label="Globals">
<ProjectGuid>{C4C45791-0201-4406-BC5C-A384B01E3BF5}</ProjectGuid>
@ -108,6 +156,30 @@
<PythonVersion>3.7</PythonVersion>
<LLVM_USE_CRT_DEBUG>MDd</LLVM_USE_CRT_DEBUG>
</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">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
@ -140,6 +212,30 @@
<PythonVersion>3.7</PythonVersion>
<LLVM_USE_CRT_DEBUG>MDd</LLVM_USE_CRT_DEBUG>
</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">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@ -176,6 +272,33 @@
<PythonVersion>3.7</PythonVersion>
<LLVM_USE_CRT_RELEASE>MT</LLVM_USE_CRT_RELEASE>
</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">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@ -212,7 +335,33 @@
<PythonVersion>3.7</PythonVersion>
<LLVM_USE_CRT_RELEASE>MT</LLVM_USE_CRT_RELEASE>
</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" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@ -228,6 +377,15 @@
<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" />
</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">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
@ -240,6 +398,15 @@
<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" />
</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">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
@ -252,6 +419,15 @@
<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" />
</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">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
@ -264,6 +440,15 @@
<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" />
</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">
<NuGetPackageImportStamp>bb9fbdf7</NuGetPackageImportStamp>
</PropertyGroup>
@ -299,6 +484,30 @@
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
</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'">
<LinkIncremental>true</LinkIncremental>
<TargetExt>.pyd</TargetExt>
@ -331,6 +540,30 @@
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</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'">
<LinkIncremental>false</LinkIncremental>
<TargetExt>.pyd</TargetExt>
@ -359,6 +592,27 @@
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
</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'">
<LinkIncremental>false</LinkIncremental>
<TargetExt>.pyd</TargetExt>
@ -387,6 +641,27 @@
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
</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'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
@ -476,6 +751,72 @@
</Command>
</CustomBuildStep>
</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'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
@ -564,6 +905,72 @@
</Command>
</CustomBuildStep>
</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'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
@ -584,7 +991,7 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.5|Win32'">
@ -607,7 +1014,7 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.6|Win32'">
@ -630,7 +1037,7 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.7|Win32'">
@ -652,6 +1059,75 @@
<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.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>
<Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
@ -676,7 +1152,7 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.5|x64'">
@ -699,7 +1175,7 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.6|x64'">
@ -722,7 +1198,7 @@
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
<Command>copy $(OutDir)..\Debug\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_3.7|x64'">
@ -744,6 +1220,75 @@
<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.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>
<Command>copy $(OutDir)..\Release\targetapp.exe $(OutDir)</Command>
</PostBuildEvent>
@ -901,6 +1446,8 @@
<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\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>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@ -919,5 +1466,7 @@
<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\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>
</Project>

View File

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

View File

@ -266,8 +266,32 @@ inline kdlib::MemoryProtect getVaProtect( kdlib::MEMOFFSET_64 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

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,8 @@
#include "stdafx.h"
#include "pymodule.h"
#include <iomanip>
#include <ctime>
namespace pykd {
@ -48,20 +50,8 @@ std::wstring ModuleAdapter::print( kdlib::Module& module )
sstr << L"Image: " << module.getImageName() << std::endl;
sstr << L"Symbols: " << module.getSymFile() << 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;
time_t timeStamp = module.getTimeDataStamp();
sstr << L"Timestamp: " << timeStamp << " (" << std::put_time(std::gmtime(&timeStamp), L"%c") << L')' << std::endl;
sstr << L"Check Sum: " << module.getCheckSum() << std::endl;
return sstr.str();
@ -103,6 +93,15 @@ 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 )
{

View File

@ -82,19 +82,50 @@ struct ModuleAdapter : public kdlib::Module
return module.getSymbolVa(symbolName);
}
static kdlib::MEMOFFSET_64 getSymbolVaAttr(kdlib::Module& module, const std::wstring &symbolName)
static python::object getAttrByName(kdlib::Module& module, const std::wstring &symbolName)
{
AutoRestorePyState pystate;
try {
return module.getSymbolVa(symbolName);
return python::object(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&)
{
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 )
{
@ -198,6 +229,7 @@ struct ModuleAdapter : public kdlib::Module
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

View File

@ -103,7 +103,7 @@ python::list getTypedVarArrayByType( kdlib::MEMOFFSET_64 offset, kdlib::TypeInfo
///////////////////////////////////////////////////////////////////////////////
python::list TypedVarAdapter::getFields( kdlib::TypedVar& typedVar )
python::list TypedVarAdapter::getFields(const kdlib::TypedVarPtr& typedVar)
{
typedef boost::tuple<std::wstring,kdlib::MEMOFFSET_32,kdlib::TypedVarPtr> FieldTuple;
@ -113,15 +113,18 @@ python::list TypedVarAdapter::getFields( kdlib::TypedVar& typedVar )
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;
if (!typedVar.getType()->isStaticMember(i) )
offset = typedVar.getElementOffset(i);
if (typedVar->getType()->isConstMember(i))
continue;
kdlib::TypedVarPtr val = typedVar.getElement(i);
if (!typedVar->getType()->isStaticMember(i) )
offset = typedVar->getElementOffset(i);
kdlib::TypedVarPtr val = typedVar->getElement(i);
lst.push_back( FieldTuple( name, offset, val ) );
}
@ -136,6 +139,77 @@ python::list TypedVarAdapter::getFields( kdlib::TypedVar& typedVar )
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)
@ -168,30 +242,32 @@ python::list TypedVarAdapter::getElementsDir(kdlib::TypedVar& typedVar)
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
{
return typedVar.getElement( name );
}
catch (kdlib::TypeException&)
{}
try
{
return typedVar.getMethod( name );
}
catch (kdlib::TypeException&)
{}
try
{
return typedVar.getMethod(name);
}
catch (kdlib::TypeException&)
{
}
std::wstringstream sstr;
sstr << L"typed var has no field " << L'\'' << name << L'\'';
throw AttributeException(std::string(_bstr_t(sstr.str().c_str())).c_str());
}
std::stringstream sstr;
sstr << "typed var has no field " << '\'' << _bstr_t(name.c_str()) << '\'';
throw AttributeException(sstr.str().c_str());
}
///////////////////////////////////////////////////////////////////////////////
@ -261,7 +337,6 @@ void TypedVarAdapter::setFieldAttr(kdlib::TypedVar& typedVar, const std::wstring
kdlib::TypedVarPtr TypedVarAdapter::getFieldByKey(kdlib::TypedVar& typedVar, const std::wstring &name)
{
{
AutoRestorePyState pystate;
try
@ -306,5 +381,57 @@ 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

View File

@ -7,6 +7,7 @@
namespace python = boost::python;
#include "kdlib/typedvar.h"
#include "kdlib/typeinfo.h"
#include "stladaptor.h"
#include "pythreadstate.h"
@ -142,6 +143,10 @@ struct TypedVarAdapter {
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 void setFieldAttr(kdlib::TypedVar& typedVar, const std::wstring &name, python::object& object);
@ -182,7 +187,9 @@ struct TypedVarAdapter {
return typedVar.str();
}
static python::list getFields( kdlib::TypedVar& typedVar );
static python::list getFields(const kdlib::TypedVarPtr& typedVar);
static python::list getMembers(const kdlib::TypedVarPtr& typedVar);
static kdlib::TypeInfoPtr getType( kdlib::TypedVar& typedVar )
{
@ -227,6 +234,12 @@ struct TypedVarAdapter {
{
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

View File

@ -75,7 +75,7 @@ python::tuple findSymbolAndDisp( ULONG64 offset )
///////////////////////////////////////////////////////////////////////////////
python::list TypeInfoAdapter::getFields( kdlib::TypeInfo &typeInfo )
python::list TypeInfoAdapter::getFields( const kdlib::TypeInfoPtr &typeInfo )
{
typedef boost::tuple<std::wstring,kdlib::TypeInfoPtr> FieldTuple;
@ -85,10 +85,10 @@ python::list TypeInfoAdapter::getFields( kdlib::TypeInfo &typeInfo )
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);
kdlib::TypeInfoPtr val = typeInfo.getElement(i);
std::wstring name = typeInfo->getElementName(i);
kdlib::TypeInfoPtr val = typeInfo->getElement(i);
lst.push_back( FieldTuple( name, val ) );
}
@ -103,6 +103,84 @@ python::list TypeInfoAdapter::getFields( kdlib::TypeInfo &typeInfo )
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)
{
typedef boost::tuple<std::wstring, kdlib::TypeInfoPtr> FieldTuple;
@ -162,48 +240,73 @@ python::list TypeInfoAdapter::getBaseClasses(kdlib::TypeInfo &typeInfo)
///////////////////////////////////////////////////////////////////////////////
kdlib::TypeInfoPtr TypeInfoAdapter::getElementAttr(kdlib::TypeInfo &typeInfo, const std::wstring &name)
python::list TypeInfoAdapter::getTemplateArgs(const kdlib::TypeInfoPtr &typeInfo)
{
std::list<std::wstring> templateArgs;
{
AutoRestorePyState pystate;
try {
return typeInfo.getElement(name);
for (size_t i = 0; i < typeInfo->getTemplateArgsCount(); ++i)
{
templateArgs.push_back(typeInfo->getTemplateArg(i));
}
catch (kdlib::TypeException&)
{}
}
python::list pylst;
try {
return typeInfo.getMethod(name);
}
catch (kdlib::TypeException&)
{}
for (const auto& arg : templateArgs)
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::wstringstream sstr;
sstr << L'\'' << typeInfo.getName() << L'\'' << L" type has no field " << L'\'' << name << L'\'';
throw AttributeException(std::string(_bstr_t(sstr.str().c_str())).c_str());
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)
{
{
AutoRestorePyState pystate;
try {
return typeInfo.getElement(name);
}
catch (kdlib::TypeException&)
{}
AutoRestorePyState pystate;
try {
return typeInfo.getMethod(name);
}
catch (kdlib::TypeException&)
{}
try {
return typeInfo.getElement(name);
}
catch (kdlib::TypeException&)
{}
try {
return typeInfo.getMethod(name);
}
catch (kdlib::TypeException&)
{}
std::wstringstream sstr;
sstr << L'\'' << typeInfo.getName() << L'\'' << L" type has no field " << L'\'' << name << L'\'';
@ -291,7 +394,6 @@ python::object callTypedVar(kdlib::TypedVarPtr& funcobj, python::tuple& args)
continue;
}
if ( python::extract<int>(args[i]).check() )
{
kdlib::NumVariant var= NumVariantAdaptor::convertToVariant(args[i]);

View File

@ -69,6 +69,12 @@ inline kdlib::TypeInfoProviderPtr getTypeInfoProviderFromSource(const std::wstri
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)
{
AutoRestorePyState pystate;
@ -143,6 +149,30 @@ struct TypeInfoAdapter : public kdlib::TypeInfo {
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 )
{
@ -150,6 +180,10 @@ struct TypeInfoAdapter : public kdlib::TypeInfo {
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 getElementByKey(kdlib::TypeInfo &typeInfo, const std::wstring &name);
@ -298,6 +332,12 @@ struct TypeInfoAdapter : public kdlib::TypeInfo {
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 )
{
AutoRestorePyState pystate;
@ -322,7 +362,9 @@ struct TypeInfoAdapter : public kdlib::TypeInfo {
return typeInfo.str();
}
static python::list getFields( kdlib::TypeInfo &typeInfo );
static python::list getFields( const kdlib::TypeInfoPtr &typeInfo );
static python::list getMembers(const kdlib::TypeInfoPtr &typeInfo);
static python::list getMethods(kdlib::TypeInfo &typeInfo);
@ -330,10 +372,18 @@ struct TypeInfoAdapter : public kdlib::TypeInfo {
static python::list getBaseClasses(kdlib::TypeInfo &typeInfo);
static python::list getTemplateArgs(const kdlib::TypeInfoPtr &typeInfo);
static bool isZero(kdlib::TypeInfo &typeInfo) {
return false;
}
static bool isNotZero(kdlib::TypeInfo &typeInfo) {
return true;
}
static bool hasFieldOrMethod(kdlib::TypeInfoPtr& typedVar, const std::wstring& name);
};
@ -392,6 +442,56 @@ 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 {
static kdlib::TypeInfoPtr getUInt1B() { return pykd::getTypeInfoByName(L"UInt1B"); }
static kdlib::TypeInfoPtr getUInt2B() { return pykd::getTypeInfoByName(L"UInt2B"); }
@ -411,9 +511,4 @@ struct BaseTypesEnum {
static kdlib::TypeInfoPtr getDouble() { return pykd::getTypeInfoByName(L"Double"); }
};
} // end namespace pykd

View File

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

View File

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

View File

@ -16,4 +16,16 @@ py -3.6 setup.py bdist_wheel --plat-name=win-amd64 --python-tag=cp36
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_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,10 +5,11 @@ import os
import shutil
import zipfile
import sys
import itertools
_name = "pykd"
_desc = "python windbg extension"
_version = '0.3.4.0'
_version = '0.3.4.15'
def getReleaseSrc():
return 'Release_%d.%d' % sys.version_info[0:2]
@ -60,7 +61,7 @@ if "bdist_wheel" in sys.argv:
elif "bdist_zip" in sys.argv:
#make package catalog
#make package catalog
if "--plat-name=win32" in sys.argv:
plat_name="win32"
@ -105,6 +106,26 @@ elif "bdist_zip" in sys.argv:
archive.write( os.path.join(package_dir, srcFile), compress_type = zipfile.ZIP_DEFLATED)
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
@ -122,127 +143,3 @@ elif "bdist_zip" in sys.argv:
#from setuptools import setup
#from wheel.bdist_wheel import bdist_wheel
#import pkg_resources
#import argparse
#import os
#import shutil
#import zipfile
#import sys
#_name = "pykd"
#_desc = "python windbg extension"
#_version = '0.3.1.2'
#def getReleaseSrc():
# return 'Release_%d.%d' % sys.version_info[0:2]
#def makeWheel(args):
# # remove build catalog
# build_dir = os.path.join(os.path.curdir, 'build' )
# if os.path.exists(build_dir):
# shutil.rmtree(build_dir)
# # make package catalog
# package_dir = os.path.join(os.path.curdir, _name )
# if os.path.exists(package_dir):
# shutil.rmtree(package_dir)
# os.mkdir(package_dir)
# shutil.copy("__init__.py", package_dir)
# bin_dir = os.path.join( os.path.curdir, '..', 'bin')
# pykd_dir = os.path.join( os.path.curdir, '..', 'out')
# if args.plat_name == 'win32':
# bin_dir = os.path.join( bin_dir, 'x86')
# pykd_dir = os.path.join(pykd_dir, 'Win32', getReleaseSrc())
# elif args.plat_name == 'win-amd64':
# bin_dir = os.path.join( bin_dir, 'x64')
# pykd_dir = os.path.join(pykd_dir, 'X64', getReleaseSrc())
# else:
# assert(0)
# assert(os.path.isdir(bin_dir))
# for binFile in [ f for f in os.listdir(bin_dir) if not os.path.isdir(f) ]:
# shutil.copy( os.path.join(bin_dir, binFile), os.path.join(package_dir, binFile) )
# shutil.copy( os.path.join(pykd_dir, 'pykd.pyd'), os.path.join(package_dir, 'pykd.pyd') )
# setup(
# name = _name,
# version = _version,
# description = _desc,
# cmdclass = { 'bdist_wheel' : bdist_wheel },
# packages = ['pykd'],
# package_dir = {'pykd': package_dir},
# package_data = { 'pykd' :["*.pyd", "*.dll"]},
# include_package_data=True,
# zip_safe = False,
# universal = True,
# #python_tag = args.python_tag
# )
#def makeZip(args):
# #make package catalog
# package_dir = os.path.join(os.path.curdir, _name )
# if os.path.exists(package_dir):
# shutil.rmtree(package_dir)
# os.mkdir(package_dir)
# bin_dir = os.path.join( os.path.curdir, '..', 'bin')
# pykd_dir = os.path.join( os.path.curdir, '..', 'out')
# if args.plat_name == 'win32':
# bin_dir = os.path.join( bin_dir, 'x86')
# pykd_dir = os.path.join(pykd_dir, 'Win32', getReleaseSrc())
# elif args.plat_name == 'win-amd64':
# bin_dir = os.path.join( bin_dir, 'x64')
# pykd_dir = os.path.join(pykd_dir, 'X64', getReleaseSrc())
# else:
# assert(0)
# pyver="%d%d" % sys.version_info[0:2]
# zip_str = "pykd-%s-py%s-%s" % ( _version, pyver, args.plat_name )
# zip_name = zip_str + ".zip"
# assert(os.path.isdir(bin_dir))
# for binFile in [ f for f in os.listdir(bin_dir) if not os.path.isdir(f) ]:
# shutil.copy( os.path.join(bin_dir, binFile), os.path.join(package_dir, binFile) )
# shutil.copy( os.path.join(pykd_dir, 'pykd.pyd'), os.path.join(package_dir, 'pykd.pyd') )
# dist_dir = os.path.join(os.path.curdir, 'dist')
# if not os.path.exists(dist_dir):
# os.mkdir(dist_dir)
# with zipfile.ZipFile(os.path.join(os.path.curdir, 'dist', zip_name), mode='w' ) as archive:
# for srcFile in os.listdir(package_dir):
# print( "zipped %s" % (srcFile) )
# archive.write( os.path.join(package_dir, srcFile), compress_type = zipfile.ZIP_DEFLATED)
# print("OK")
#parser = argparse.ArgumentParser()
#subparsers = parser.add_subparsers()
#wheelParser = subparsers.add_parser('bdist_wheel')
#wheelParser.add_argument('--plat-name', choices = ['win32', 'win-amd64'], default=pkg_resources.get_build_platform() )
#wheelParser.add_argument('--python-tag', choices=['2.7', '3.5'])
#wheelParser.set_defaults(func=makeWheel)
#zipParser = subparsers.add_parser('bdist_zip')
#zipParser.add_argument('--plat-name', choices = ['win32', 'win-amd64'], default=pkg_resources.get_build_platform() )
#zipParser.set_defaults(func=makeZip)
#args = parser.parse_args()
#args.func(args)

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -6,7 +6,7 @@ import os
class ARM64DumpTest(unittest.TestCase):
def setUp(self):
dump_file = os.path.join( os.path.dirname(sys.argv[0]),
r"..\..\kdlibcpp\kdlib\tests\dumps\win10_arm64_mem.cab" )
r"..\..\kdlibcpp\kdlib\tests\dumps\win10_arm64_mem\win10_arm64_mem.cab" )
self.dump_id = pykd.loadDump( dump_file )
def tearDown(self):
@ -14,41 +14,41 @@ class ARM64DumpTest(unittest.TestCase):
def testArm64(self):
# dbgmem
self.assertEqual( 0, pykd.addr64(0) )
self.assertEqual( 0, pykd.addr64(0) )
self.assertEqual( 0x80000000, pykd.addr64(0x80000000) )
# dbgeng
self.assertEqual( pykd.CPUType.ARM64, pykd.getCPUType() )
self.assertEqual( pykd.CPUType.ARM64, pykd.getCPUMode() )
self.assertTrue( pykd.is64bitSystem() )
self.assertEqual( 8, pykd.ptrSize() )
self.assertEqual( pykd.CPUType.ARM64, pykd.getCPUType() )
self.assertEqual( pykd.CPUType.ARM64, pykd.getCPUMode() )
self.assertTrue( pykd.is64bitSystem() )
self.assertEqual( 8, pykd.ptrSize() )
self.assertEqual( pykd.expr("@$retreg"), pykd.reg("x0") )
# typeinfo
self.assertEqual( 8, pykd.typeInfo("nt!_IRP*").size() )
self.assertEqual( 8, pykd.typeInfo("nt!_IRP*").size() )
# symexport
self.assertEqual( pykd.expr("clipsp!ClipSpInitialize"), pykd.module("clipsp").ClipSpInitialize )
# cpu context
cpu = pykd.cpu()
self.assertEqual( pykd.expr("@$ip"), cpu.ip )
self.assertEqual( pykd.expr("@$csp"), cpu.sp )
self.assertEqual( pykd.expr("@fp"), cpu.fp )
self.assertEqual( pykd.expr("clipsp!ClipSpInitialize"), pykd.module("clipsp").ClipSpInitialize )
# cpu context
cpu = pykd.cpu()
self.assertEqual( pykd.expr("@$ip"), cpu.ip )
self.assertEqual( pykd.expr("@$csp"), cpu.sp )
self.assertEqual( pykd.expr("@fp"), cpu.fp )
# stack
stack = pykd.getStack()
self.assertTrue( len(stack) > 11 )
self.assertEqual( "nt!KeBugCheck2", pykd.findSymbol(stack[0].ip, False) )
self.assertEqual( "Wdf01000!FxRequest::CompleteInternal", pykd.findSymbol(stack[11].ip, False) )
self.assertEqual( 0, stack[11].getParam("Status") )
self.assertEqual( 0xffffc18eaa798940, stack[11].getLocal("irp").m_Irp )
stack = pykd.getStack()
self.assertTrue( len(stack) > 11 )
self.assertEqual( "nt!KeBugCheck2", pykd.findSymbol(stack[0].ip, False) )
self.assertEqual( "Wdf01000!FxRequest::CompleteInternal", pykd.findSymbol(stack[11].ip, False) )
self.assertEqual( 0, stack[11].getParam("Status") )
self.assertEqual( 0xffffc18eaa798940, stack[11].getLocal("irp").m_Irp )

View File

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

View File

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

@ -182,6 +182,12 @@ class MemoryTest( unittest.TestCase ):
self.assertTrue( pykd.isValid( target.module.begin() ) )
self.assertFalse( pykd.isValid( 0 ) )
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 ):
lst = pykd.loadPtrList( target.module.g_listHead )

View File

@ -139,4 +139,25 @@ class ModuleTest( unittest.TestCase ):
def testModuleList(self):
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,6 +30,7 @@ import synsymtest
import taggedtest
import arm64dumptest
import armdumptest
import eventtest
pykd.initialize()
@ -65,13 +66,17 @@ def getTestSuite( singleName = "" ):
unittest.TestLoader().loadTestsFromTestCase( breakpoint.BreakpointTest ),
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( targetprocess.ProcessTest ),
unittest.TestLoader().loadTestsFromTestCase( ehloadtest.EhLoadTest ),
unittest.TestLoader().loadTestsFromTestCase( taggedtest.TaggedTest ),
unittest.TestLoader().loadTestsFromTestCase( arm64dumptest.ARM64DumpTest ),
unittest.TestLoader().loadTestsFromTestCase( armdumptest.ARMDumpTest ),
unittest.TestLoader().loadTestsFromTestCase( eventtest.OutputHandlerTest ),
#unittest.TestLoader().loadTestsFromTestCase( excepttest.ExceptionTest ),
] )
else:
@ -91,7 +96,7 @@ if __name__ == "__main__":
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("typedvar.TypedVarTest.testAttr") )
#unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run( getTestSuite("typedvar.TypedVarTest.testEvalExprScopeLong") )
try: input = raw_input
except NameError: pass

View File

@ -8,18 +8,18 @@
<StartupFile>pykdtest.py</StartupFile>
<SearchPath>
</SearchPath>
<WorkingDirectory>..\..\out\x64\Debug_2.7</WorkingDirectory>
<WorkingDirectory>C:\Users\User\Documents\projects\pykd2017\out\x64\Debug_3.7</WorkingDirectory>
<OutputPath>.</OutputPath>
<Name>pykdtest</Name>
<RootNamespace>pykdtest</RootNamespace>
<LaunchProvider>Standard Python launcher</LaunchProvider>
<CommandLineArguments>C:\proj\pykd-dev\out\x64\Debug\targetapp.exe</CommandLineArguments>
<CommandLineArguments>C:\Users\User\Documents\projects\pykd2017\out\x64\Debug_2.7\targetapp.exe</CommandLineArguments>
<InterpreterPath />
<InterpreterArguments>
</InterpreterArguments>
<EnableNativeCodeDebugging>True</EnableNativeCodeDebugging>
<IsWindowsApplication>False</IsWindowsApplication>
<InterpreterId>Global|PythonCore|2.7</InterpreterId>
<InterpreterId>Global|PythonCore|3.7</InterpreterId>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
@ -63,6 +63,8 @@
<InterpreterReference Include="Global|PythonCore|2.7-32" />
<InterpreterReference Include="Global|PythonCore|2.7" />
<InterpreterReference Include="Global|PythonCore|3.6" />
<InterpreterReference Include="Global|PythonCore|3.7" />
<InterpreterReference Include="Global|PythonCore|3.7-32" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" />

View File

@ -1,4 +1,7 @@
import unittest
import os
import sys
import pykd
import target
@ -55,3 +58,81 @@ class StackTest(unittest.TestCase):
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,3 +28,15 @@ class SynSymTest(unittest.TestCase):
self.assertRaises( pykd.DbgException, target.module.offset, "synSym2" )
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):
def setUp(self):
dump_file = os.path.join( os.path.dirname(sys.argv[0]),
r"..\..\kdlibcpp\kdlib\tests\dumps\win8_x64_mem.cab" )
r"..\..\kdlibcpp\kdlib\tests\dumps\win8_x64_mem\win8_x64_mem.cab" )
self.dump_id = pykd.loadDump( dump_file )
self._existing_id = "D03DC06F-D88E-44C5-BA2A-FAE035172D19"

View File

@ -21,6 +21,14 @@ class TypedVarTest( unittest.TestCase ):
tv = pykd.typedVar( "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):
self.assertEqual( 10, target.module.typedVar( "ucharVar" ) )
self.assertEqual( 1020, target.module.typedVar( "ushortVar" ) )
@ -295,8 +303,8 @@ class TypedVarTest( unittest.TestCase ):
def testUdtSubscribe(self):
tv = pykd.typedVar( "g_virtChild" )
self.assertEqual( 6, len(tv) )
fieldName = tv.fieldName(5)
fieldVal = tv.field(5)
fieldName = tv.fieldName(3)
fieldVal = tv.field(3)
self.assertEqual( fieldName, "m_baseField" )
self.assertEqual( fieldVal, tv.m_baseField )
@ -437,10 +445,60 @@ class TypedVarTest( unittest.TestCase ):
def testAttr(self):
var = target.module.typedVar("structTest", [0x55] * 20 )
self.assertTrue(hasattr(var, "m_field3"))
setattr(var, "m_field1", 11)
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,11 +40,9 @@ class TypeInfoTest( unittest.TestCase ):
""" get field of the complex type """
ti1 = target.module.type( "structTest" )
self.assertTrue( "UInt4B", ti1.m_field0.name() )
self.assertTrue( "UInt4B", ti1["m_field0"].name() )
self.assertTrue( hasattr( ti1, "m_field0" ) )
self.assertFalse( hasattr( ti1, "not_exists" ) )
self.assertTrue( "m_field0" in ti1 )
self.assertFalse( "not_exist" in 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 ):
@ -164,21 +162,21 @@ class TypeInfoTest( unittest.TestCase ):
self.assertEqual( "structTest", ti.deref().name() )
ti = pykd.typeInfo("structTest[2]")
self.assertRaises( pykd.TypeException, ti.deref );
self.assertEqual( "structTest", ti.deref().name() )
ti = target.module.type("classChild")
self.assertRaises( pykd.TypeException, ti.deref );
self.assertRaises( pykd.TypeException, ti.deref )
def testNestedStruct( self ):
ti = target.module.type("structWithNested")
self.assertTrue( hasattr( ti, "m_field" ) )
self.assertTrue( hasattr( ti, "m_field3" ) )
self.assertTrue( hasattr( ti, "m_unnameStruct" ) )
self.assertTrue( hasattr( ti.m_unnameStruct, "m_field2" ) )
self.assertFalse( hasattr( ti, "m_field2" ) )
self.assertFalse( hasattr( ti, "m_nestedFiled" ) )
self.assertTrue( ti.hasField("m_field"))
self.assertTrue( ti.hasField("m_field3"))
self.assertTrue( ti.hasField("m_unnameStruct"))
self.assertTrue( ti.m_unnameStruct.hasField("m_field2"))
self.assertFalse( ti.hasField( "m_field2" ) )
self.assertFalse( ti.hasField( "m_nestedFiled" ) )
ti = target.module.type("structWithNested::Nested")
self.assertTrue( hasattr( ti, "m_nestedFiled" ) )
self.assertTrue( ti.hasField( "m_nestedFiled" ) )
def testPrint(self):
self.assertTrue( str(target.module.type( "ucharVar" ) ) )
@ -244,16 +242,12 @@ class TypeInfoTest( unittest.TestCase ):
ti = pykd.typeInfo("UInt8B").arrayOf(10)
self.assertTrue( "UInt8B[10]", ti.name() )
def testCompareWihNone(self):
def testCompareWithNone(self):
ti = pykd.typeInfo("UInt8B")
if ti == None:
pass
if ti != None:
pass
if not ti:
pass
if ti:
pass
self.assertFalse(ti == None)
self.assertTrue(ti != None)
self.assertFalse(not ti)
self.assertTrue(ti)
def testFunction(self):
functype = target.module.typedVar( "CdeclFuncPtr" ).type().deref()
@ -351,17 +345,48 @@ class TypeInfoTest( unittest.TestCase ):
self.assertEqual( classChild.baseClassOffset(0), classChild.baseClassOffset('classBase1'))
self.assertEqual(classChild.baseClassOffset(1), classChild.baseClassOffset('classBase2'))
def testPdbTypeProvider(self):
pdb = target.module.symfile()
typeProvider = pykd.getTypeInfoProviderFromPdb(pdb)
self.assertEqual("structTest", typeProvider.getTypeByName("structTest").name())
self.assertEqual("structTest", typeProvider.structTest.name())
self.assertEqual(22, len(list(typeProvider.typeIterator("*struct*"))))
self.assertEqual(15, len(list(typeProvider.typeIterator("*struct*"))))
def testScopeName(self):
self.assertEqual( target.module.name(), pykd.typeInfo( "structTest" ).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() )