From b7ce577654c85636e6ea26c532392eca23f65d92 Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" <SND\kernelnet_cp@9b283d60-5439-405e-af05-b73fd8c4d996> Date: Tue, 26 Apr 2016 10:04:22 +0000 Subject: [PATCH] [pykd_bootstrapper] fixed : issue #13888 ( Kernel debug. After reboot module class works inproperly ) git-svn-id: https://pykd.svn.codeplex.com/svn@90977 9b283d60-5439-405e-af05-b73fd8c4d996 --- pykd_bootstrapper/version.h | 2 +- pykd_bootstrapper/windbgext.cpp | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pykd_bootstrapper/version.h b/pykd_bootstrapper/version.h index ab3ac3c..b70f446 100644 --- a/pykd_bootstrapper/version.h +++ b/pykd_bootstrapper/version.h @@ -3,7 +3,7 @@ #define PYKDEXT_VERSION_MAJOR 1 #define PYKDEXT_VERSION_MINOR 0 #define PYKDEXT_VERSION_SUBVERSION 1 -#define PYKDEXT_VERSION_BUILDNO 12 +#define PYKDEXT_VERSION_BUILDNO 13 #define __VER_STR2__(x) #x #define __VER_STR1__(x) __VER_STR2__(x) diff --git a/pykd_bootstrapper/windbgext.cpp b/pykd_bootstrapper/windbgext.cpp index 57079d2..7327304 100644 --- a/pykd_bootstrapper/windbgext.cpp +++ b/pykd_bootstrapper/windbgext.cpp @@ -190,6 +190,15 @@ public: delete m_globalInterpreter; m_globalInterpreter = 0; PyThreadState_Swap(m_globalState); + + if (m_pykdInit) + { + python::object main = python::import("__main__"); + python::object globalScope(main.attr("__dict__")); + python::exec("__import__('pykd').deinitialize()", globalScope); + m_pykdInit = false; + } + m_globalState = PyEval_SaveThread(); } @@ -198,14 +207,6 @@ public: PyEval_RestoreThread(m_globalState); m_globalInterpreter = new PythonInterpreter(); - - //m_globalInterpreter->acivate(); - - //python::object main = boost::python::import("__main__"); - - //python::object main_namespace = main.attr("__dict__"); - - //m_globalInterpreter->deactivate(); } void acivateGlobal() {