diff --git a/pykd-0.3-2013.sln b/pykd-0.3-2013.sln
index fdb6011..316e45a 100644
--- a/pykd-0.3-2013.sln
+++ b/pykd-0.3-2013.sln
@@ -108,8 +108,8 @@ Global
{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
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.ActiveCfg = Debug_Static|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.Build.0 = Debug_Static|Win32
+ {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.ActiveCfg = Debug|Win32
+ {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.Build.0 = Debug|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|x64.ActiveCfg = Debug|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|x64.Build.0 = Debug|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_3.5|Win32.ActiveCfg = Debug|Win32
diff --git a/pykd/packages.pykd_vc120.config b/pykd/packages.pykd_vc120.config
index e0dd492..01665ca 100644
--- a/pykd/packages.pykd_vc120.config
+++ b/pykd/packages.pykd_vc120.config
@@ -9,4 +9,6 @@
+
+
diff --git a/pykd/pykd_vc120.vcxproj b/pykd/pykd_vc120.vcxproj
index 590c1ef..ccdd926 100644
--- a/pykd/pykd_vc120.vcxproj
+++ b/pykd/pykd_vc120.vcxproj
@@ -65,6 +65,7 @@
Unicode
v120_xp
2.7
+ MDd
DynamicLibrary
@@ -72,6 +73,7 @@
Unicode
v120_xp
3.5
+ MDd
DynamicLibrary
@@ -79,6 +81,7 @@
Unicode
v120_xp
3.6
+ MDd
DynamicLibrary
@@ -86,6 +89,7 @@
Unicode
v120_xp
2.7
+ MDd
DynamicLibrary
@@ -93,6 +97,7 @@
Unicode
v120_xp
3.5
+ MDd
DynamicLibrary
@@ -100,6 +105,7 @@
Unicode
v120_xp
3.6
+ MDd
DynamicLibrary
@@ -108,6 +114,7 @@
Unicode
v120_xp
2.7
+ MT
DynamicLibrary
@@ -116,6 +123,7 @@
Unicode
v120_xp
3.5
+ MT
DynamicLibrary
@@ -124,6 +132,7 @@
Unicode
v120_xp
3.6
+ MT
DynamicLibrary
@@ -132,6 +141,7 @@
Unicode
v120_xp
2.7
+ MT
DynamicLibrary
@@ -140,6 +150,7 @@
Unicode
v120_xp
3.5
+ MT
DynamicLibrary
@@ -148,6 +159,7 @@
Unicode
v120_xp
3.6
+ MT
v120
@@ -201,7 +213,7 @@
- 67fda795
+ bb9fbdf7
true
@@ -300,7 +312,7 @@
Disabled
WIN32;_DEBUG;_WINDOWS;_USRDLL;PYKD_EXPORTS;%(PreprocessorDefinitions)
$(ProjectDir)..\kdlibcpp\include;
- MultiThreadedDebug
+ MultiThreadedDebugDLL
Windows
@@ -654,6 +666,8 @@
+
+
@@ -669,5 +683,7 @@
+
+
\ No newline at end of file
diff --git a/pykd/pykdver.h b/pykd/pykdver.h
index cf9b2bc..b0ab6f1 100644
--- a/pykd/pykdver.h
+++ b/pykd/pykdver.h
@@ -1,8 +1,8 @@
#define PYKD_VERSION_MAJOR 0
#define PYKD_VERSION_MINOR 3
-#define PYKD_VERSION_SUBVERSION 1
-#define PYKD_VERSION_BUILDNO 10
+#define PYKD_VERSION_SUBVERSION 2
+#define PYKD_VERSION_BUILDNO 0
#define __VER_STR2__(x) #x
#define __VER_STR1__(x) __VER_STR2__(x)
diff --git a/pykd/pymod.cpp b/pykd/pymod.cpp
index ef19d06..86c4659 100644
--- a/pykd/pymod.cpp
+++ b/pykd/pymod.cpp
@@ -100,6 +100,8 @@ BOOST_PYTHON_FUNCTION_OVERLOADS( Module_enumTypes, ModuleAdapter::enumTypes, 1,
BOOST_PYTHON_FUNCTION_OVERLOADS( TypeInfo_ptrTo, TypeInfoAdapter::ptrTo, 1, 2 );
+BOOST_PYTHON_FUNCTION_OVERLOADS( getTypeFromSource_, pykd::getTypeFromSource, 2, 3 );
+
namespace pykd {
@@ -416,6 +418,11 @@ BOOST_PYTHON_MODULE( pykd )
python::def( "callFunctionByPtr", python::raw_function(pykd::callFunctionByVar, 1) );
python::def( "callFunctionByAddr", python::raw_function(pykd::callFunctionByOffset, 2) );
+ python::def( "getTypeFromSource", &pykd::getTypeFromSource, getTypeFromSource_( python::args("sourceCode", "typeName", "compileOptions"),
+ "Create typeInfo class from C/C++ source code") );
+ python::def( "getTypeInfoProviderFromSource", &pykd::getTypeInfoProviderFromSource,
+ "Create typeInfo provider from C/C++ source code");
+
// CPU registers
python::def( "reg", pykd::getRegisterByName,
"Return a CPU regsiter value by the register's name" );
@@ -1160,6 +1167,11 @@ BOOST_PYTHON_MODULE( pykd )
"Change the current instruction" )
.def( "__str__", DisasmAdapter::instruction );
+ python::class_("typeInfoProvider",
+ "Get abstaract access to different type info sources", python::no_init)
+ .def( "getTypeByName", TypeInfoProviderAdapter::getTypeByName,
+ "Get type info by it's name" )
+ ;
python::enum_("eventResult", "Return value of event handler")
.value("Proceed", kdlib::DebugCallbackProceed)
diff --git a/pykd/pytypeinfo.h b/pykd/pytypeinfo.h
index 55234e1..13bda70 100644
--- a/pykd/pytypeinfo.h
+++ b/pykd/pytypeinfo.h
@@ -55,6 +55,18 @@ inline kdlib::TypeInfoPtr getTypeInfoByName( const std::wstring &name )
return kdlib::loadType( name );
}
+inline kdlib::TypeInfoPtr getTypeFromSource( const std::wstring& sourceCode, const std::wstring& typeName, const std::wstring& compileOptions=L"")
+{
+ AutoRestorePyState pystate;
+ return kdlib::compileType( sourceCode, typeName, compileOptions);
+}
+
+inline kdlib::TypeInfoProviderPtr getTypeInfoProviderFromSource(const std::wstring& sourceCode, const std::wstring& compileOptions=L"")
+{
+ AutoRestorePyState pystate;
+ return kdlib::getTypeInfoProviderFromSource(sourceCode, compileOptions);
+}
+
struct TypeInfoAdapter : public kdlib::TypeInfo {
static std::wstring getName( kdlib::TypeInfo &typeInfo )
@@ -286,6 +298,17 @@ struct TypeInfoAdapter : public kdlib::TypeInfo {
};
+
+struct TypeInfoProviderAdapter : public kdlib::TypeInfoProvider
+{
+
+ static kdlib::TypeInfoPtr getTypeByName( kdlib::TypeInfoProvider &typeInfoProvider, const std::wstring& name)
+ {
+ AutoRestorePyState pystate;
+ return typeInfoProvider.getTypeByName(name);
+ }
+};
+
struct BaseTypesEnum {
static kdlib::TypeInfoPtr getUInt1B() { return pykd::getTypeInfoByName(L"UInt1B"); }
static kdlib::TypeInfoPtr getUInt2B() { return pykd::getTypeInfoByName(L"UInt2B"); }
diff --git a/setup/setup.py b/setup/setup.py
index 95f697a..d2bfb76 100644
--- a/setup/setup.py
+++ b/setup/setup.py
@@ -8,7 +8,7 @@ import sys
_name = "pykd"
_desc = "python windbg extension"
-_version = '0.3.1.8'
+_version = '0.3.2.0'
def getReleaseSrc():
return 'Release_%d.%d' % sys.version_info[0:2]