mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-19 19:13:22 +08:00
[!] bug fixed: issue #8103 ( !py windbg extension imports modules into the global space )
git-svn-id: https://pykd.svn.codeplex.com/svn@59901 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
44aeda68fb
commit
af3e45bae6
@ -96,7 +96,7 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
boost::python::def( "dprintln", &DbgPrint::dprintln );
|
||||
boost::python::def( "loadDump", &dbgLoadDump );
|
||||
boost::python::def( "dbgCommand", &dbgCommand );
|
||||
boost::python::def( "is64bitSystem", is64bitSystem );
|
||||
boost::python::def( "is64bitSystem", &is64bitSystem );
|
||||
boost::python::def( "isKernelDebugging", &isKernelDebugging );
|
||||
boost::python::def( "ptrSize", ptrSize );
|
||||
boost::python::def( "reg", &loadRegister );
|
||||
@ -241,6 +241,8 @@ HRESULT
|
||||
CALLBACK
|
||||
py( PDEBUG_CLIENT4 client, PCSTR args)
|
||||
{
|
||||
PyThreadState *interpreter = Py_NewInterpreter();
|
||||
|
||||
try {
|
||||
|
||||
DbgExt ext = { 0 };
|
||||
@ -255,7 +257,7 @@ py( PDEBUG_CLIENT4 client, PCSTR args)
|
||||
boost::python::object global(main.attr("__dict__"));
|
||||
|
||||
// ïåðåíàïðàâëåíèå ñòàíäàðòíûõ ïîòîêîâ ÂÂ
|
||||
boost::python::object sys = boost::python::import( "sys");
|
||||
boost::python::object sys = boost::python::import("sys");
|
||||
|
||||
dbgOut dout;
|
||||
sys.attr("stdout") = boost::python::object( dout );
|
||||
@ -349,6 +351,8 @@ py( PDEBUG_CLIENT4 client, PCSTR args)
|
||||
{
|
||||
}
|
||||
|
||||
Py_EndInterpreter( interpreter );
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user