Commit dfb935f3 authored by ussrhero's avatar ussrhero
Browse files

added : additional parameter for debugCommand routine to control an output mask

parent fce59281
...@@ -104,13 +104,13 @@ bool isKernelDebugging() ...@@ -104,13 +104,13 @@ bool isKernelDebugging()
inline 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; std::wstring debugResult;
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;
debugResult = kdlib::debugCommand(command, suppressOutput); debugResult = kdlib::debugCommand(command, suppressOutput, captureFlags);
} }
if (debugResult.size() > 0 ) if (debugResult.size() > 0 )
......
...@@ -42,7 +42,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS( terminateProcess_, pykd::terminateProcess, 0, ...@@ -42,7 +42,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS( terminateProcess_, pykd::terminateProcess, 0,
BOOST_PYTHON_FUNCTION_OVERLOADS(closeDump_, pykd::closeDump, 0, 1); BOOST_PYTHON_FUNCTION_OVERLOADS(closeDump_, pykd::closeDump, 0, 1);
BOOST_PYTHON_FUNCTION_OVERLOADS( attachKernel_, pykd::attachKernel, 0, 1 ); BOOST_PYTHON_FUNCTION_OVERLOADS( attachKernel_, pykd::attachKernel, 0, 1 );
BOOST_PYTHON_FUNCTION_OVERLOADS( evaluate_, pykd::evaluate, 1, 2 ); BOOST_PYTHON_FUNCTION_OVERLOADS( evaluate_, pykd::evaluate, 1, 2 );
BOOST_PYTHON_FUNCTION_OVERLOADS( debugCommand_, pykd::debugCommand, 1, 2 ); BOOST_PYTHON_FUNCTION_OVERLOADS( debugCommand_, pykd::debugCommand, 1, 3 );
BOOST_PYTHON_FUNCTION_OVERLOADS( dprint_, pykd::dprint, 1, 2 ); BOOST_PYTHON_FUNCTION_OVERLOADS( dprint_, pykd::dprint, 1, 2 );
BOOST_PYTHON_FUNCTION_OVERLOADS( dprintln_, pykd::dprintln, 1, 2 ); BOOST_PYTHON_FUNCTION_OVERLOADS( dprintln_, pykd::dprintln, 1, 2 );
...@@ -207,8 +207,10 @@ void pykd_init() ...@@ -207,8 +207,10 @@ void pykd_init()
"Break into debugger" ); "Break into debugger" );
python::def( "expr", pykd::evaluate, evaluate_( python::args( "expression", "cplusplus" ), python::def( "expr", pykd::evaluate, evaluate_( python::args( "expression", "cplusplus" ),
"Evaluate windbg expression" ) ); "Evaluate windbg expression" ) );
python::def( "dbgCommand", &pykd::debugCommand, python::def( "dbgCommand", &pykd::debugCommand, debugCommand_( python::args(
debugCommand_( python::args( "command", "suppressOutput"), "Run a debugger's command and return it's result as a string" ) ); "command", "suppressOutput", "outputMask"),
"Run a debugger's command and return it's result as a string. You can set additional outputMask" \
"if you want to get also error messages" ) );
python::def( "go", pykd::targetGo, python::def( "go", pykd::targetGo,
"Go debugging" ); "Go debugging" );
python::def( "step", pykd::targetStep, python::def( "step", pykd::targetStep,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment