def read_value(addr_space, value_type, vaddr):
 if (not builtin_types.has_key(value_type)):
  raise Exception(('Invalid built-in type %s' % value_type))
 type_unpack_char = builtin_types[value_type][1]
 type_size = builtin_types[value_type][0]
 buf = addr_space.read(vaddr, type_size)
 if (buf is None):
  return None
 (val,) = struct.unpack(type_unpack_char, buf)
 return val

def read_value ( addr_space , value_type , vaddr ) : if ( not builtin_types . has_key ( value_type ) ) : raise Exception ( ( 'Invalid built-in type %s' % value_type ) ) type_unpack_char = builtin_types [ value_type ] [ 1 ] type_size = builtin_types [ value_type ] [ 0 ] buf = addr_space . read ( vaddr , type_size ) if ( buf is None ) : return None ( val , ) = struct . unpack ( type_unpack_char , buf ) return val
read the low-level value for a built-in type .