IDA SDK
|
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.
Public Attributes | |
int32 | rvtype = RVT_INT |
one of Register value types | |
union { | |
uint64 ival | |
RVT_INT. | |
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) | |
}; | |
Public Member Functions | |
bool | use_bytevec () const |
regval_t (const regval_t &r) | |
regval_t & | operator= (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 Set int value (ival) | |
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_t & | set_bytes (int _rvtype) |
Initialize this regval to an empty custom value. | |
void | set_unavailable () |
Mark as unavailable. | |
Getters | |
Get custom value | |
bytevec_t & | bytes () |
const bytevec_t & | bytes () const |
Get const custom value. | |
void * | get_data () |
Get pointer to value. | |
const void * | get_data () const |
Get const pointer to value. | |
size_t | get_data_size () const |
Get size of value. | |