mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 21:03:23 +08:00
[~] updated : __str__ method for typedVar class
git-svn-id: https://pykd.svn.codeplex.com/svn@60264 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
25e7428ac1
commit
a3560b2b77
@ -434,11 +434,11 @@ typedVarClass::print() const
|
|||||||
if ( field->type.isComplex() )
|
if ( field->type.isComplex() )
|
||||||
sstr << field->type.name();
|
sstr << field->type.name();
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if ( field->size == field->type.size() )
|
|
||||||
{
|
{
|
||||||
boost::python::object attr = m_pyobj.attr( field->name.c_str() );
|
boost::python::object attr = m_pyobj.attr( field->name.c_str() );
|
||||||
|
|
||||||
|
if ( field->size == field->type.size() )
|
||||||
|
{
|
||||||
if ( attr.ptr() == Py_None )
|
if ( attr.ptr() == Py_None )
|
||||||
{
|
{
|
||||||
sstr << "memory error";
|
sstr << "memory error";
|
||||||
@ -450,6 +450,15 @@ typedVarClass::print() const
|
|||||||
sstr << hex << "0x" << val << dec << " ( " << val << " )";
|
sstr << hex << "0x" << val << dec << " ( " << val << " )";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for ( size_t i = 0; i < field->size/field->type.size(); ++i )
|
||||||
|
{
|
||||||
|
unsigned __int64 val = boost::python::extract<unsigned __int64>( attr[i] );
|
||||||
|
|
||||||
|
sstr << "\n\t\t\t[" << i << "] " << hex << "0x" << val << dec << " ( " << val << " )";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sstr << std::endl;
|
sstr << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user