IDA C++ SDK 9.2
Loading...
Searching...
No Matches
regval_t Struct Reference

Structure to hold a register value. More...

#include <idd.hpp>

Public Member Functions

bool use_bytevec () const
 regval_t ()
 regval_t (const regval_t &r)
 ~regval_t ()
regval_toperator= (const regval_t &r)
 Assign this regval to the given value.
void clear ()
 Clear register value.
bool operator== (const regval_t &r) const
 Compare two regvals with '=='.
bool operator!= (const regval_t &r) const
 Compare two regvals with '!='.
void swap (regval_t &r)
 Set this = r and r = this.
void _set_int (uint64 x)
 Use set_int()
void _set_float (const bytevec_t &v)
 Use set_float()
void _set_bytes (const uchar *data, size_t size, int _rvtype=0)
 Use set_bytes(const uchar *, size_t)
void _set_bytes (const bytevec_t &v, int _rvtype=0)
 Use set_bytes(const bytevec_t &)
bytevec_t_set_bytes (int _rvtype)
 Use set_bytes()
void _set_unavailable ()
 Use set_unavailable()
Setters

These functions ensure that the previous value is cleared

void set_int (uint64 x)
void set_float (const bytevec_t &v)
 Set float value.
void set_bytes (const uchar *data, size_t size, int _rvtype=0)
 Set custom regval with raw data.
void set_bytes (const bytevec_t &v, int _rvtype=0)
 Set custom value with existing bytevec.
bytevec_tset_bytes (int _rvtype)
 Initialize this regval to an empty custom value.
void set_unavailable ()
 Mark as unavailable.
Getters
bytevec_tbytes ()
const bytevec_tbytes () const
 Get const custom value.
voidget_data ()
 Get pointer to value.
const voidget_data () const
 Get const pointer to value.
size_t get_data_size () const
 Get size of value.

Public Attributes

int32 rvtype = RVT_INT
 one of Register value types
union { 
   uint64   ival 
 RVT_INT. More...
   uchar   reserve [sizeof(bytevec_t)] 
 bytevec_t: custom data type (use bytes() to access it) RVT_FLOAT: floating point value in native CPU format if there are more than one fpvalue formats with the same length, use custom types to distinguish them (only one of them can be RVT_FLOAT) More...
}; 

Detailed Description

Structure to hold a register value.

Small values (up to 64-bit integers and floating point values) use #RVT_INT and #RVT_FLOAT types. For bigger values the bytes() vector is used.

Constructor & Destructor Documentation

◆ regval_t() [1/2]

regval_t::regval_t ( )
inline

◆ regval_t() [2/2]

regval_t::regval_t ( const regval_t & r)
inline

◆ ~regval_t()

regval_t::~regval_t ( )
inline

Member Function Documentation

◆ use_bytevec()

bool regval_t::use_bytevec ( ) const
inline

◆ operator=()

regval_t & regval_t::operator= ( const regval_t & r)
inline

Assign this regval to the given value.

◆ clear()

void regval_t::clear ( )
inline

Clear register value.

◆ operator==()

bool regval_t::operator== ( const regval_t & r) const
inline

Compare two regvals with '=='.

◆ operator!=()

bool regval_t::operator!= ( const regval_t & r) const
inline

Compare two regvals with '!='.

◆ swap()

void regval_t::swap ( regval_t & r)
inline

Set this = r and r = this.

◆ _set_int()

void regval_t::_set_int ( uint64 x)
inline

Use set_int()

◆ _set_float()

void regval_t::_set_float ( const bytevec_t & v)
inline

◆ _set_bytes() [1/3]

void regval_t::_set_bytes ( const uchar * data,
size_t size,
int _rvtype = 0 )
inline

Use set_bytes(const uchar *, size_t)

◆ _set_bytes() [2/3]

void regval_t::_set_bytes ( const bytevec_t & v,
int _rvtype = 0 )
inline

Use set_bytes(const bytevec_t &)

◆ _set_bytes() [3/3]

bytevec_t & regval_t::_set_bytes ( int _rvtype)
inline

◆ _set_unavailable()

void regval_t::_set_unavailable ( )
inline

◆ set_int()

void regval_t::set_int ( uint64 x)
inline

Set int value (ival)

◆ set_float()

void regval_t::set_float ( const bytevec_t & v)
inline

Set float value.

◆ set_bytes() [1/3]

void regval_t::set_bytes ( const uchar * data,
size_t size,
int _rvtype = 0 )
inline

Set custom regval with raw data.

◆ set_bytes() [2/3]

void regval_t::set_bytes ( const bytevec_t & v,
int _rvtype = 0 )
inline

Set custom value with existing bytevec.

◆ set_bytes() [3/3]

bytevec_t & regval_t::set_bytes ( int _rvtype)
inline

Initialize this regval to an empty custom value.

◆ set_unavailable()

void regval_t::set_unavailable ( )
inline

Mark as unavailable.

◆ bytes() [1/2]

bytevec_t & regval_t::bytes ( )
inline

Get custom value

◆ bytes() [2/2]

const bytevec_t & regval_t::bytes ( ) const
inline

Get const custom value.

◆ get_data() [1/2]

void * regval_t::get_data ( )
inline

Get pointer to value.

◆ get_data() [2/2]

const void * regval_t::get_data ( ) const
inline

Get const pointer to value.

◆ get_data_size()

size_t regval_t::get_data_size ( ) const
inline

Get size of value.

Member Data Documentation

◆ rvtype

int32 regval_t::rvtype = RVT_INT

◆ ival

uint64 regval_t::ival

RVT_INT.

◆ reserve

uchar regval_t::reserve[sizeof(bytevec_t)]

bytevec_t: custom data type (use bytes() to access it) RVT_FLOAT: floating point value in native CPU format if there are more than one fpvalue formats with the same length, use custom types to distinguish them (only one of them can be RVT_FLOAT)

◆ [union]

union { ... } regval_t

The documentation for this struct was generated from the following file: