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

#include <regfinder.hpp>

Inheritance diagram for reg_value_info_t:

Public Member Functions

 reg_value_info_t ()
 reg_value_info_t (const reg_value_base_t &base, int _slotsize, int _addrsize)
 reg_value_info_t (reg_value_base_t &&base, int _slotsize, int _addrsize)
void set_context (int _slotsize, int _addrsize)
 Set the context.
void set_context (const reg_finder_t *rf)
bool get_num (uint64 *uval) const
 Return the number if the value is a constant (truncated to SLOTSIZE).
bool get_addr (ea_t *addr) const
 Return the address if the value is a constant (truncated to ADDRSIZE).
bool get_spd (sval_t *sval) const
 Return the SP delta if the value depends on the stack pointer (sign-extended to ADDRSIZE).
void truncate (int width=0)
 Truncate the value to WIDTH (in bytes).
void trunc_uval (const procmod_t &pm)

Protected Attributes

int slotsize = 0
int addrsize = 0

Constructor & Destructor Documentation

◆ reg_value_info_t() [1/3]

reg_value_info_t::reg_value_info_t ( )
inline

◆ reg_value_info_t() [2/3]

reg_value_info_t::reg_value_info_t ( const reg_value_base_t & base,
int _slotsize,
int _addrsize )
inline

◆ reg_value_info_t() [3/3]

reg_value_info_t::reg_value_info_t ( reg_value_base_t && base,
int _slotsize,
int _addrsize )
inline

Member Function Documentation

◆ set_context() [1/2]

void reg_value_info_t::set_context ( int _slotsize,
int _addrsize )
inline

Set the context.

Note
The proc module cannot just call set_num(), it must also set the sizes.

◆ set_context() [2/2]

void reg_value_info_t::set_context ( const reg_finder_t * rf)
inline

◆ get_num()

bool reg_value_info_t::get_num ( uint64 * uval) const
inline

Return the number if the value is a constant (truncated to SLOTSIZE).

See also
is_num()

◆ get_addr()

bool reg_value_info_t::get_addr ( ea_t * addr) const
inline

Return the address if the value is a constant (truncated to ADDRSIZE).

See also
is_num()

◆ get_spd()

bool reg_value_info_t::get_spd ( sval_t * sval) const
inline

Return the SP delta if the value depends on the stack pointer (sign-extended to ADDRSIZE).

See also
is_spd()
Parameters
[out]svalthe value of SP minus the initial value of SP at the function start.

◆ truncate()

void reg_value_info_t::truncate ( int width = 0)
inline

Truncate the value to WIDTH (in bytes).

For numbers: zero-truncate to WIDTH. For SP deltas: sign-extend to WIDTH. If WIDTH = 0, defaults to SLOTSIZE for numbers and ADDRSIZE for SP deltas.

◆ trunc_uval()

void reg_value_info_t::trunc_uval ( const procmod_t & pm)
inline
Deprecated
9.3 source-compat shim; prefer truncate().

Member Data Documentation

◆ slotsize

int reg_value_info_t::slotsize = 0
protected

◆ addrsize

int reg_value_info_t::addrsize = 0
protected

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