mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[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:
parent
ca820532f5
commit
12693cae96
@ -199,25 +199,13 @@ public:
|
|||||||
|
|
||||||
m_globalInterpreter = new PythonInterpreter();
|
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
|
//m_globalInterpreter->deactivate();
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void acivateGlobal() {
|
void acivateGlobal() {
|
||||||
@ -266,6 +254,20 @@ private:
|
|||||||
{
|
{
|
||||||
Py_Initialize();
|
Py_Initialize();
|
||||||
PyEval_InitThreads();
|
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();
|
m_globalState = PyEval_SaveThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user