[bootstrapper] fixed : issue #3839 ( windbg is crashed after system reboot )

git-svn-id: https://pykd.svn.codeplex.com/svn@90920 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2016-02-17 07:10:09 +00:00 committed by Mikhail I. Izmestev
parent ca820532f5
commit 12693cae96

View File

@ -199,25 +199,13 @@ public:
m_globalInterpreter = new PythonInterpreter();
m_globalInterpreter->acivate();
//m_globalInterpreter->acivate();
python::object main = boost::python::import("__main__");
//python::object main = boost::python::import("__main__");
python::object main_namespace = main.attr("__dict__");
//python::object main_namespace = main.attr("__dict__");
// Python debug output console helper classes
python::class_<DbgOut>("dout", "dout", python::no_init)
.def("write", &DbgOut::write)
.def("writedml", &DbgOut::writedml)
.def("flush", &DbgOut::flush)
.add_property("encoding", &DbgOut::encoding)
.add_property("closed", &DbgOut::closed);
python::class_<DbgIn>("din", "din", python::no_init)
.def("readline", &DbgIn::readline)
.add_property("closed", &DbgIn::closed);
m_globalInterpreter->deactivate();
//m_globalInterpreter->deactivate();
}
void acivateGlobal() {
@ -266,6 +254,20 @@ private:
{
Py_Initialize();
PyEval_InitThreads();
// Python debug output console helper classes
python::class_<DbgOut>("dout", "dout", python::no_init)
.def("write", &DbgOut::write)
.def("writedml", &DbgOut::writedml)
.def("flush", &DbgOut::flush)
.add_property("encoding", &DbgOut::encoding)
.add_property("closed", &DbgOut::closed);
python::class_<DbgIn>("din", "din", python::no_init)
.def("readline", &DbgIn::readline)
.add_property("closed", &DbgIn::closed);
m_globalState = PyEval_SaveThread();
}