diff --git a/pykd/dbgext.cpp b/pykd/dbgext.cpp index 9d6fc40..e93212f 100644 --- a/pykd/dbgext.cpp +++ b/pykd/dbgext.cpp @@ -221,6 +221,8 @@ BOOST_PYTHON_MODULE( pykd ) "Delete synthetic symbols by virtual address" ); boost::python::def( "delSynSymbolsMask", &delSyntheticSymbolsMask, "Delete synthetic symbols by mask of module and symbol name"); + boost::python::def( "debuggerPath", &getDebuggerImage, + "Return full path to the process image that uses pykd" ); boost::python::class_( "typeInfo", "Class representing non-primitive type info: structure, union, etc. attributes is a fields of non-primitive type" ) @@ -253,7 +255,7 @@ BOOST_PYTHON_MODULE( pykd ) DEF_PY_GLOBAL( "ulong_t", TypeInfo("", "unsigned long") ); DEF_PY_GLOBAL( "int_t", TypeInfo("", "int") ); DEF_PY_GLOBAL( "uint_t", TypeInfo("", "unsigned int") ); - DEF_PY_GLOBAL( "ptr_t", TypeInfo("", "void*") ); + //DEF_PY_GLOBAL( "ptr_t", TypeInfo("", "void*") ); DEF_PY_GLOBAL( "double_t", TypeInfo("", "double") ); DEF_PY_GLOBAL( "longlong_t", TypeInfo("", "int64") ); DEF_PY_GLOBAL( "ulonglong_t", TypeInfo("", "unsigned int64") ); diff --git a/pykd/dbgsystem.cpp b/pykd/dbgsystem.cpp index 069ef41..2cf890a 100644 --- a/pykd/dbgsystem.cpp +++ b/pykd/dbgsystem.cpp @@ -1,5 +1,7 @@ #include "stdafx.h" +#include + #include "dbgext.h" #include "dbgexcept.h" #include "dbgsystem.h" @@ -124,3 +126,13 @@ isDumpAnalyzing() } /////////////////////////////////////////////////////////////////////////////////// + +std::string +getDebuggerImage() +{ + std::vector buffer(MAX_PATH); + GetModuleFileNameExA( GetCurrentProcess(), NULL, &buffer[0], buffer.size() ); + return std::string( &buffer[0] ); +} + +/////////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/pykd/dbgsystem.h b/pykd/dbgsystem.h index 7b52da9..88e337b 100644 --- a/pykd/dbgsystem.h +++ b/pykd/dbgsystem.h @@ -28,4 +28,8 @@ isKernelDebugging(); bool isDumpAnalyzing(); +std::string +getDebuggerImage(); + + ///////////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/pykd/pykd.vcproj b/pykd/pykd.vcproj index 41a9c66..d121df2 100644 --- a/pykd/pykd.vcproj +++ b/pykd/pykd.vcproj @@ -66,7 +66,7 @@ />