Commit 4dc6f73c authored by SND\kernelnet_cp's avatar SND\kernelnet_cp
Browse files

[pykd] fixed: issue 9560 ( dbgCommand truncates long output string )



git-svn-id: https://pykd.svn.codeplex.com/svn@70097 9b283d60-5439-405e-af05-b73fd8c4d996
parent a7855ea4
......@@ -14,9 +14,22 @@ void dbgPrint::dprint( const boost::python::object& obj, bool dml )
{
std::wstring str = boost::python::extract<std::wstring>( obj );
HRESULT hres = dbgExt->control4->ControlledOutputWide( dml ? DEBUG_OUTCTL_AMBIENT_DML : DEBUG_OUTCTL_AMBIENT_TEXT, DEBUG_OUTPUT_NORMAL, L"%ws", str.c_str() );
std::wcout << str;
if ( isWindbgExt() )
{
for ( size_t i = 0; i < str.size() / 100 + 1; ++i )
{
dbgExt->control4->ControlledOutputWide(
dml ? DEBUG_OUTCTL_AMBIENT_DML : DEBUG_OUTCTL_AMBIENT_TEXT, DEBUG_OUTPUT_NORMAL,
L"%ws",
str.substr( i*100, min( str.size() - i*100, 100 ) ).c_str()
);
}
}
else
{
std::wcout << str;
}
}
/////////////////////////////////////////////////////////////////////////////////
......@@ -24,10 +37,23 @@ void dbgPrint::dprint( const boost::python::object& obj, bool dml )
void dbgPrint::dprintln( const boost::python::object& obj, bool dml )
{
std::wstring str = boost::python::extract<std::wstring>( obj );
dbgExt->control4->ControlledOutputWide( dml ? DEBUG_OUTCTL_AMBIENT_DML : DEBUG_OUTCTL_AMBIENT_TEXT, DEBUG_OUTPUT_NORMAL, L"%ws\r\n", str.c_str() );
std::wcout << str;
str += L"\r\n";
if ( isWindbgExt() )
{
for ( size_t i = 0; i < str.size() / 100 + 1; ++i )
{
dbgExt->control4->ControlledOutputWide(
dml ? DEBUG_OUTCTL_AMBIENT_DML : DEBUG_OUTCTL_AMBIENT_TEXT, DEBUG_OUTPUT_NORMAL,
L"%ws",
str.substr( i*100, min( str.size() - i*100, 100 ) ).c_str()
);
}
}
else
{
std::wcout << str;
}
}
/////////////////////////////////////////////////////////////////////////////////
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment