From ca820532f572af25ec495073b488c074643d7804 Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" Date: Thu, 28 Jan 2016 15:27:49 +0000 Subject: [PATCH] [0.3.x] fixed : issue #13829 ( !pykd.install raises exception ) git-svn-id: https://pykd.svn.codeplex.com/svn@90915 9b283d60-5439-405e-af05-b73fd8c4d996 --- pykd/pydbgio.h | 8 ++++++++ pykd/pymod.cpp | 6 ++++-- pykd_bootstrapper/version.h | 2 +- pykd_bootstrapper/windbgext.cpp | 15 +++++++++++++-- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/pykd/pydbgio.h b/pykd/pydbgio.h index cd01312..ea8d987 100644 --- a/pykd/pydbgio.h +++ b/pykd/pydbgio.h @@ -71,6 +71,10 @@ public: std::wstring encoding() { return L"ascii"; } + + bool closed() { + return false; + } }; /////////////////////////////////////////////////////////////////////////////// @@ -87,6 +91,10 @@ public: std::wstring encoding() { return L"ascii"; } + + bool closed() { + return false; + } }; /////////////////////////////////////////////////////////////////////////////// diff --git a/pykd/pymod.cpp b/pykd/pymod.cpp index 65bf83b..2a226a1 100644 --- a/pykd/pymod.cpp +++ b/pykd/pymod.cpp @@ -205,11 +205,13 @@ BOOST_PYTHON_MODULE( pykd ) .def( "write", &DbgOut::write ) .def( "writedml", &DbgOut::writedml) .def( "flush", &DbgOut::flush ) - .add_property( "encoding", &DbgOut::encoding ); + .add_property( "encoding", &DbgOut::encoding ) + .add_property( "closed", &DbgOut::closed ); python::class_( "din", "din", python::no_init ) .def( "readline", &DbgIn::readline ) - .add_property( "encoding", &DbgIn::encoding ); + .add_property( "encoding", &DbgIn::encoding ) + .add_property("closed", &DbgIn::closed ); // system properties python::def( "ptrSize", pykd::ptrSize, diff --git a/pykd_bootstrapper/version.h b/pykd_bootstrapper/version.h index 6052862..d6d573a 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 10 +#define PYKDEXT_VERSION_BUILDNO 11 #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 d1b033d..1efa90f 100644 --- a/pykd_bootstrapper/windbgext.cpp +++ b/pykd_bootstrapper/windbgext.cpp @@ -74,6 +74,10 @@ public: return L"ascii"; } + bool closed() { + return false; + } + private: CComQIPtr m_control; @@ -103,6 +107,11 @@ public: return inputstr.empty() ? L"\n" : inputstr; } + bool closed() { + return false; + } + + private: CComQIPtr m_control; @@ -201,10 +210,12 @@ public: .def("write", &DbgOut::write) .def("writedml", &DbgOut::writedml) .def("flush", &DbgOut::flush) - .add_property("encoding", &DbgOut::encoding); + .add_property("encoding", &DbgOut::encoding) + .add_property("closed", &DbgOut::closed); python::class_("din", "din", python::no_init) - .def("readline", &DbgIn::readline); + .def("readline", &DbgIn::readline) + .add_property("closed", &DbgIn::closed); m_globalInterpreter->deactivate(); }