mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[pykd] updated: typedVar
git-svn-id: https://pykd.svn.codeplex.com/svn@68332 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
027bea8f7c
commit
621138b107
@ -389,15 +389,8 @@ valueLoader( void* address, size_t size )
|
||||
if ( size == sizeof(valType) )
|
||||
{
|
||||
valType v = *(valType*)address;
|
||||
//return boost::python::long_( (unsigned __int64)v );
|
||||
|
||||
return boost::python::object( v );
|
||||
|
||||
|
||||
//if ( loadMemory( address, &v, sizeof(v) ) )
|
||||
//{
|
||||
// return boost::python::long_( (unsigned __int64)v );
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -407,8 +400,6 @@ valueLoader( void* address, size_t size )
|
||||
{
|
||||
valType v = *( (valType*)address + i );
|
||||
arr.append( v );
|
||||
|
||||
//arr[i] = boost::python::long_( (unsigned __int64)v );
|
||||
}
|
||||
|
||||
return arr;
|
||||
@ -417,6 +408,33 @@ valueLoader( void* address, size_t size )
|
||||
throw TypeException();
|
||||
}
|
||||
|
||||
template<>
|
||||
boost::python::object
|
||||
valueLoader<char>( void* address, size_t size )
|
||||
{
|
||||
if ( size == sizeof(char) )
|
||||
{
|
||||
int v = *(char*)address;
|
||||
|
||||
return boost::python::object( v );
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::python::list arr;
|
||||
|
||||
for ( unsigned int i = 0; i < size / sizeof(char); ++i )
|
||||
{
|
||||
int v = *( (char*)address + i );
|
||||
arr.append( v );
|
||||
}
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
throw TypeException();
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
boost::python::object
|
||||
valueLoader<void*>( void* address, size_t size )
|
||||
|
Loading…
Reference in New Issue
Block a user