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

#include <regfinder.hpp>

Classes

struct  cond_t
struct  flow_t
struct  move_desc_t

Public Member Functions

bool does_call_spoil_stkvars () const
bool allow_xrefs_cache () const
 reg_finder_t (const procmod_t &_pm, int _proc_maxop=3, uint32 _flags=RF_DOES_CALL_SPOIL_STKVARS)
virtual ~reg_finder_t ()
void invalidate_cache (ea_t to, ea_t from, cref_t cref)
void invalidate_cache ()
void invalidate_xrefs_cache (ea_t ea, dref_t dref)
rvi_t find (ea_t ea, rfop_t rfop, int max_depth=0, size_t linear_insns=0)
int find_nearest (reg_value_info_t *rvi, ea_t ea, const int reg[2], size_t linear_insns=10)
bool find_const (uval_t *val, ea_t ea, rfop_t rfop, int max_depth=0)
bool find_spd (sval_t *spval, ea_t ea, int reg=-1, int max_depth=-1)
rfop_t make_rfop (const op_t &_op, const insn_t &insn, func_t *pfn)
rvi_t find_op_addr (const op_t &memop, const insn_t &insn, int max_depth=0)
void emulate_mem_read (rvi_t *value, const rvi_t &addr, int width, bool is_signed, const insn_t &insn)
bool can_resolve_mem (ea_t ea) const

Public Attributes

const procmod_tpm
const int proc_maxop
uint32 flags

Static Public Attributes

static constexpr uint32 RF_DOES_CALL_SPOIL_STKVARS = 0x0001
static constexpr uint32 RF_ALLOW_XREFS_CACHE = 0x0002

Protected Types

using rvi_t = reg_value_info_t
using rfop_t = reg_finder_op_t
using block_t = reg_finder_block_t
using pred_t = reg_finder_pred_t

Protected Member Functions

bool only_linear_flow () const
virtual flow_t process_delay_slot (ea_t ea, cref_t) const
virtual cond_t get_cond (ea_t ea) const
virtual rvi_t handle_well_known_regs (flow_t flow, rfop_t rfop, bool is_func_start) const
virtual bool is_mem_readonly (ea_t) const
virtual int get_sp_reg (ea_t ea) const
virtual bool is_funcwide_reg (ea_t ea, int reg) const
virtual bool can_track_op (op_t *op, const insn_t &insn, func_t *pfn) const
virtual bool is_move_insn (move_desc_t *move_desc, const rfop_t &rfop, const insn_t &insn)
virtual bool emulate_insn (rvi_t *value, const rfop_t &rfop, const insn_t &insn, flow_t flow)
rvi_t find (flow_t flow, rfop_t rfop)
rvi_t find (flow_t flow, int reg)
void calc_op_addr (rvi_t *addr, const op_t &memop, const insn_t &insn, flow_t flow)
void emulate_binary_op (rvi_t *value, rvi_t::arith_op_t aop, const op_t &op1, const op_t &op2, const insn_t &insn, flow_t flow, reg_finder_binary_ops_adjust_fun adjust=nullptr, void *ud=nullptr)
void emulate_unary_op (rvi_t *value, rvi_t::arith_op_t aop, int reg, const insn_t &insn, flow_t flow)
bool may_modify_stkvar (rvi_t *value, rfop_t rfop, const insn_t &insn)

Protected Attributes

func_tcur_func = nullptr
size_t initial_block_idx = 0
bool fixed_max_depth = false
int cur_max_depth = 0
int cur_call_depth = 0
size_t linear_flow_cnt = 0
size_t bblk_cnt = 0
ea_t aborting_ea = BADADDR
rvi_t standalone_value
op_t fake_op1
op_t fake_op2

Static Protected Attributes

static constexpr size_t NO_CHAIN = size_t(-1)

Friends

struct reg_finder_block_t
struct reg_finder_pred_t
struct reg_finder_chainvec_t
struct reg_finder_rfop_chains_t
struct reg_finder_xrefs_cache_t

Member Typedef Documentation

◆ rvi_t

using reg_finder_t::rvi_t = reg_value_info_t
protected

◆ rfop_t

◆ block_t

◆ pred_t

Constructor & Destructor Documentation

◆ reg_finder_t()

reg_finder_t::reg_finder_t ( const procmod_t & _pm,
int _proc_maxop = 3,
uint32 _flags = RF_DOES_CALL_SPOIL_STKVARS )
inline

◆ ~reg_finder_t()

virtual reg_finder_t::~reg_finder_t ( )
inlinevirtual

Member Function Documentation

◆ does_call_spoil_stkvars()

bool reg_finder_t::does_call_spoil_stkvars ( ) const
inline

◆ allow_xrefs_cache()

bool reg_finder_t::allow_xrefs_cache ( ) const
inline

◆ only_linear_flow()

bool reg_finder_t::only_linear_flow ( ) const
inlineprotected

◆ invalidate_cache() [1/2]

void reg_finder_t::invalidate_cache ( ea_t to,
ea_t from,
cref_t cref )
inline

◆ invalidate_cache() [2/2]

void reg_finder_t::invalidate_cache ( )
inline

◆ invalidate_xrefs_cache()

void reg_finder_t::invalidate_xrefs_cache ( ea_t ea,
dref_t dref )
inline

◆ find() [1/3]

rvi_t reg_finder_t::find ( ea_t ea,
rfop_t rfop,
int max_depth = 0,
size_t linear_insns = 0 )
inline

◆ find_nearest()

int reg_finder_t::find_nearest ( reg_value_info_t * rvi,
ea_t ea,
const int reg[2],
size_t linear_insns = 10 )
inline

◆ find_const()

bool reg_finder_t::find_const ( uval_t * val,
ea_t ea,
rfop_t rfop,
int max_depth = 0 )
inline

◆ find_spd()

bool reg_finder_t::find_spd ( sval_t * spval,
ea_t ea,
int reg = -1,
int max_depth = -1 )
inline

◆ make_rfop()

rfop_t reg_finder_t::make_rfop ( const op_t & _op,
const insn_t & insn,
func_t * pfn )
inline

◆ find_op_addr()

rvi_t reg_finder_t::find_op_addr ( const op_t & memop,
const insn_t & insn,
int max_depth = 0 )
inline

◆ emulate_mem_read()

void reg_finder_t::emulate_mem_read ( rvi_t * value,
const rvi_t & addr,
int width,
bool is_signed,
const insn_t & insn )
inline

◆ can_resolve_mem()

bool reg_finder_t::can_resolve_mem ( ea_t ea) const
inline

◆ process_delay_slot()

virtual flow_t reg_finder_t::process_delay_slot ( ea_t ea,
cref_t  ) const
inlineprotectedvirtual

◆ get_cond()

virtual cond_t reg_finder_t::get_cond ( ea_t ea) const
inlineprotectedvirtual

◆ handle_well_known_regs()

virtual rvi_t reg_finder_t::handle_well_known_regs ( flow_t flow,
rfop_t rfop,
bool is_func_start ) const
inlineprotectedvirtual

◆ is_mem_readonly()

virtual bool reg_finder_t::is_mem_readonly ( ea_t ) const
inlineprotectedvirtual

◆ get_sp_reg()

virtual int reg_finder_t::get_sp_reg ( ea_t ea) const
inlineprotectedvirtual

◆ is_funcwide_reg()

virtual bool reg_finder_t::is_funcwide_reg ( ea_t ea,
int reg ) const
inlineprotectedvirtual

◆ can_track_op()

virtual bool reg_finder_t::can_track_op ( op_t * op,
const insn_t & insn,
func_t * pfn ) const
inlineprotectedvirtual

◆ is_move_insn()

virtual bool reg_finder_t::is_move_insn ( move_desc_t * move_desc,
const rfop_t & rfop,
const insn_t & insn )
inlineprotectedvirtual

◆ emulate_insn()

virtual bool reg_finder_t::emulate_insn ( rvi_t * value,
const rfop_t & rfop,
const insn_t & insn,
flow_t flow )
inlineprotectedvirtual

◆ find() [2/3]

rvi_t reg_finder_t::find ( flow_t flow,
rfop_t rfop )
inlineprotected

◆ find() [3/3]

rvi_t reg_finder_t::find ( flow_t flow,
int reg )
inlineprotected

◆ calc_op_addr()

void reg_finder_t::calc_op_addr ( rvi_t * addr,
const op_t & memop,
const insn_t & insn,
flow_t flow )
inlineprotected

◆ emulate_binary_op()

void reg_finder_t::emulate_binary_op ( rvi_t * value,
rvi_t::arith_op_t aop,
const op_t & op1,
const op_t & op2,
const insn_t & insn,
flow_t flow,
reg_finder_binary_ops_adjust_fun adjust = nullptr,
void * ud = nullptr )
inlineprotected

◆ emulate_unary_op()

void reg_finder_t::emulate_unary_op ( rvi_t * value,
rvi_t::arith_op_t aop,
int reg,
const insn_t & insn,
flow_t flow )
inlineprotected

◆ may_modify_stkvar()

bool reg_finder_t::may_modify_stkvar ( rvi_t * value,
rfop_t rfop,
const insn_t & insn )
inlineprotected

◆ reg_finder_block_t

friend struct reg_finder_block_t
friend

◆ reg_finder_pred_t

friend struct reg_finder_pred_t
friend

◆ reg_finder_chainvec_t

friend struct reg_finder_chainvec_t
friend

◆ reg_finder_rfop_chains_t

friend struct reg_finder_rfop_chains_t
friend

◆ reg_finder_xrefs_cache_t

friend struct reg_finder_xrefs_cache_t
friend

Member Data Documentation

◆ pm

const procmod_t& reg_finder_t::pm

◆ proc_maxop

const int reg_finder_t::proc_maxop

◆ flags

uint32 reg_finder_t::flags

◆ RF_DOES_CALL_SPOIL_STKVARS

uint32 reg_finder_t::RF_DOES_CALL_SPOIL_STKVARS = 0x0001
staticconstexpr

◆ RF_ALLOW_XREFS_CACHE

uint32 reg_finder_t::RF_ALLOW_XREFS_CACHE = 0x0002
staticconstexpr

◆ cur_func

func_t* reg_finder_t::cur_func = nullptr
protected

◆ initial_block_idx

size_t reg_finder_t::initial_block_idx = 0
protected

◆ fixed_max_depth

bool reg_finder_t::fixed_max_depth = false
protected

◆ cur_max_depth

int reg_finder_t::cur_max_depth = 0
protected

◆ cur_call_depth

int reg_finder_t::cur_call_depth = 0
protected

◆ linear_flow_cnt

size_t reg_finder_t::linear_flow_cnt = 0
protected

◆ bblk_cnt

size_t reg_finder_t::bblk_cnt = 0
protected

◆ aborting_ea

ea_t reg_finder_t::aborting_ea = BADADDR
protected

◆ standalone_value

rvi_t reg_finder_t::standalone_value
protected

◆ NO_CHAIN

size_t reg_finder_t::NO_CHAIN = size_t(-1)
staticconstexprprotected

◆ fake_op1

op_t reg_finder_t::fake_op1
protected

◆ fake_op2

op_t reg_finder_t::fake_op2
protected

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