diff --git a/pykd/pydbgeng.h b/pykd/pydbgeng.h index 0c16f8f..f9548e0 100644 --- a/pykd/pydbgeng.h +++ b/pykd/pydbgeng.h @@ -235,7 +235,7 @@ inline kdlib::PROCESS_DEBUG_ID getProcessIdByOffset( kdlib::MEMOFFSET_64 offset return kdlib::getProcessIdByOffset(offset); } -inline kdlib::PROCESS_DEBUG_ID getProcessIdBySystemId( kdlib::PROCESS_ID pid = -1 ) +inline kdlib::PROCESS_DEBUG_ID getProcessIdBySystemId( kdlib::PROCESS_ID pid) { AutoRestorePyState pystate; return kdlib::getProcessIdBySystemId(pid); @@ -253,6 +253,12 @@ inline kdlib::MEMOFFSET_64 getProcessOffset( kdlib::PROCESS_DEBUG_ID id = -1) return kdlib::getProcessOffset(id); } +inline std::wstring getProcessExecutableName(kdlib::PROCESS_DEBUG_ID id = -1) +{ + AutoRestorePyState pystate; + return kdlib::getProcessExecutableName(id); +} + inline void setImplicitProcess(kdlib::MEMOFFSET_64 offset) { AutoRestorePyState pystate; @@ -264,11 +270,6 @@ inline kdlib::MEMOFFSET_64 getImplicitProcessOffset() return kdlib::getImplicitProcessOffset(); } -inline std::wstring getCurrentProcessExecutableName() -{ - AutoRestorePyState pystate; - return kdlib::getCurrentProcessExecutableName(); -} python::list getProcessThreads(); python::list getTargetProcesses(); diff --git a/pykd/pykdver.h b/pykd/pykdver.h index dd3231b..84bb5db 100644 --- a/pykd/pykdver.h +++ b/pykd/pykdver.h @@ -2,7 +2,7 @@ #define PYKD_VERSION_MAJOR 0 #define PYKD_VERSION_MINOR 3 #define PYKD_VERSION_SUBVERSION 0 -#define PYKD_VERSION_BUILDNO 17 +#define PYKD_VERSION_BUILDNO 18 #define __VER_STR2__(x) #x #define __VER_STR1__(x) __VER_STR2__(x) diff --git a/pykd/pymod.cpp b/pykd/pymod.cpp index 1341f3c..aa23e99 100644 --- a/pykd/pymod.cpp +++ b/pykd/pymod.cpp @@ -66,7 +66,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS( findSymbol_, pykd::findSymbol, 1, 2 ); BOOST_PYTHON_FUNCTION_OVERLOADS( getProcessOffset_, pykd::getProcessOffset, 0, 1); BOOST_PYTHON_FUNCTION_OVERLOADS( getProcessSystemId_, pykd::getProcessSystemId, 0, 1); -BOOST_PYTHON_FUNCTION_OVERLOADS( getProcessIdBySystemId_, pykd::getProcessIdBySystemId, 0, 1 ); +BOOST_PYTHON_FUNCTION_OVERLOADS( getProcessExecutableName_, pykd::getProcessExecutableName, 0, 1); BOOST_PYTHON_FUNCTION_OVERLOADS( getThreadOffset_, pykd::getThreadOffset, 0, 1); BOOST_PYTHON_FUNCTION_OVERLOADS( getThreadSystemId_, pykd::getThreadSystemId, 0, 1); @@ -391,8 +391,10 @@ BOOST_PYTHON_MODULE( pykd ) "Return the location in the target's memory of the process structure ( PEB )" ) ); python::def( "getProcessSystemID", pykd::getProcessSystemId, getProcessSystemId_( python::args( "Id" ), "Return system process ID ( PID )" ) ); - python::def( "getProcessIdBySystemID", pykd::getProcessIdBySystemId, getProcessIdBySystemId_( python::args("Pid"), - "Return process ID by the system's process ID ( PID )" ) ); + python::def("getProcessExeName", pykd::getProcessExecutableName, getProcessExecutableName_(python::args("Id"), + "Return name of executable file of the process")); + python::def( "getProcessIdBySystemID", pykd::getProcessIdBySystemId, + "Return process ID by the system's process ID ( PID )" ); python::def( "getCurrentProcess", pykd::getCurrentProcess, "Return current offset" ); python::def( "getCurrentProcessId", pykd::getCurrentProcessId, @@ -405,8 +407,6 @@ BOOST_PYTHON_MODULE( pykd ) "Return implicit process" ); python::def( "setImplicitProcess", pykd::setImplicitProcess, "Set implicit process" ); - python::def( "getCurrentProcessExeName", pykd::getCurrentProcessExecutableName, - "Return name of executable file loaded in the current process"); python::def( "getProcessThreads", pykd::getProcessThreads, "Get all process's threads " ); python::def( "getTargetProcesses", pykd::getTargetProcesses,