mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[pykd] fixed: issue 9560 ( dbgCommand truncates long output string )
git-svn-id: https://pykd.svn.codeplex.com/svn@70097 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
a7855ea4d1
commit
4dc6f73c5a
@ -14,9 +14,22 @@ void dbgPrint::dprint( const boost::python::object& obj, bool dml )
|
|||||||
{
|
{
|
||||||
std::wstring str = boost::python::extract<std::wstring>( obj );
|
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() );
|
if ( isWindbgExt() )
|
||||||
|
{
|
||||||
|
|
||||||
std::wcout << str;
|
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 )
|
void dbgPrint::dprintln( const boost::python::object& obj, bool dml )
|
||||||
{
|
{
|
||||||
std::wstring str = boost::python::extract<std::wstring>( obj );
|
std::wstring str = boost::python::extract<std::wstring>( obj );
|
||||||
|
str += L"\r\n";
|
||||||
|
|
||||||
dbgExt->control4->ControlledOutputWide( dml ? DEBUG_OUTCTL_AMBIENT_DML : DEBUG_OUTCTL_AMBIENT_TEXT, DEBUG_OUTPUT_NORMAL, L"%ws\r\n", str.c_str() );
|
if ( isWindbgExt() )
|
||||||
|
{
|
||||||
std::wcout << str;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user