From 0cec9aa5e02c8c69b8b6554f21097e719a5aa0dc Mon Sep 17 00:00:00 2001 From: "SND\\EreTIk_cp" Date: Fri, 21 Feb 2014 09:02:17 +0000 Subject: [PATCH] [0.3.x] add: getCurrentProcessExeName git-svn-id: https://pykd.svn.codeplex.com/svn@87324 9b283d60-5439-405e-af05-b73fd8c4d996 --- pykd/pydbgeng.h | 7 ++++++- pykd/pymod.cpp | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pykd/pydbgeng.h b/pykd/pydbgeng.h index 504106b..947c10c 100644 --- a/pykd/pydbgeng.h +++ b/pykd/pydbgeng.h @@ -224,13 +224,18 @@ inline void setImplicitProcess(kdlib::MEMOFFSET_64 offset) AutoRestorePyState pystate; kdlib::setImplicitProcess(offset); } - inline kdlib::MEMOFFSET_64 getImplicitProcessOffset() { AutoRestorePyState pystate; return kdlib::getImplicitProcessOffset(); } +inline std::wstring getCurrentProcessExecutableName() +{ + AutoRestorePyState pystate; + return kdlib::getCurrentProcessExecutableName(); +} + python::list getProcessThreads(); python::list getTargetProcesses(); diff --git a/pykd/pymod.cpp b/pykd/pymod.cpp index e58a028..9711292 100644 --- a/pykd/pymod.cpp +++ b/pykd/pymod.cpp @@ -365,8 +365,8 @@ BOOST_PYTHON_MODULE( pykd ) "Return current offset" ); python::def( "setImplicitProcess", pykd::setImplicitProcess, "Set implicit process" ); - // python::def( "getCurrentProcessExeName", &getCurrentProcessExecutableName, - // "Return name of executable file loaded in the current 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,