mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:53:23 +08:00
[bootstrapper] fixed : issue #13528 (dml does not work)
[bootstrapper] fixed : issue #13529 (isWindbgExt routine returns false) git-svn-id: https://pykd.svn.codeplex.com/svn@90381 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
041a58f6e0
commit
0aa0c0522b
@ -102,6 +102,7 @@ bool isKernelDebugging()
|
||||
return kdlib::isKernelDebugging();
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
python::object debugCommand( const std::wstring &command, bool suppressOutput = true)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ inline void dprint( const std::wstring &str, bool dml = false )
|
||||
{
|
||||
python::object sys = python::import("sys");
|
||||
|
||||
if (dml && PyObject_HasAttrString(python::object(sys.attr("stdout")).ptr(), "writedml"))
|
||||
if (dml && 0 != PyObject_HasAttrString(python::object(sys.attr("stdout")).ptr(), "writedml"))
|
||||
sys.attr("stdout").attr("writedml")(str);
|
||||
else
|
||||
sys.attr("stdout").attr("write")( str );
|
||||
@ -83,4 +83,13 @@ public:
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline
|
||||
bool isWindbgExt()
|
||||
{
|
||||
python::object sys = python::import("sys");
|
||||
return 0 != PyObject_HasAttrString(python::object(sys.attr("stdout")).ptr(), "writedml");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define PYKD_VERSION_MAJOR 0
|
||||
#define PYKD_VERSION_MINOR 3
|
||||
#define PYKD_VERSION_SUBVERSION 0
|
||||
#define PYKD_VERSION_BUILDNO 21
|
||||
#define PYKD_VERSION_BUILDNO 22
|
||||
|
||||
#define __VER_STR2__(x) #x
|
||||
#define __VER_STR1__(x) __VER_STR2__(x)
|
||||
|
@ -101,6 +101,7 @@ void remote_initialize( const std::wstring& remoteOptions )
|
||||
|
||||
void uninitialize()
|
||||
{
|
||||
AutoRestorePyState pystate;
|
||||
kdlib::uninitialize();
|
||||
}
|
||||
|
||||
@ -159,7 +160,7 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
"Check if it is a dump analyzing ( not living debuggee )" );
|
||||
python::def( "isKernelDebugging", pykd::isKernelDebugging,
|
||||
"Check if kernel dubugging is running" );
|
||||
python::def( "isWindbgExt", PykdExt::isInit,
|
||||
python::def( "isWindbgExt", pykd::isWindbgExt,
|
||||
"Check if script works in windbg context" );
|
||||
python::def( "writeDump", pykd::writeDump,
|
||||
"Create memory dump file" );
|
||||
|
@ -74,18 +74,22 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>$(ProjectName)</TargetName>
|
||||
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>$(ProjectName)</TargetName>
|
||||
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>$(ProjectName)</TargetName>
|
||||
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_2.7|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>$(ProjectName)</TargetName>
|
||||
<OutDir>$(SolutionDir)out\$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_2.7|Win32'">
|
||||
<ClCompile>
|
||||
@ -193,7 +197,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="export.def" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="packages.pykd_bootstrapper_vc120.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -125,6 +125,5 @@
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
<None Include="packages.pykd_bootstrapper_vc120.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -343,6 +343,7 @@ void PykdBootsTrapper::setUp()
|
||||
// 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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user