IDA C++ SDK 9.2
|
Go to the source code of this file.
Classes | |
struct | reg_finder_op_t |
struct | reg_finder_t |
struct | reg_finder_t::cond_t |
struct | reg_finder_t::flow_t |
struct | reg_finder_t::move_desc_t |
Typedefs | |
typedef void(* | reg_finder_binary_ops_adjust_fun) (reg_value_info_t *v1, reg_value_info_t *v2, const insn_t &insn, void *ud) |
Functions | |
DECLARE_REG_VALUE_DEF_HELPERS (idaman) struct reg_value_def_t | |
the register value and its defining instruction | |
DECLARE_TYPE_AS_MOVABLE (reg_value_def_t) | |
DECLARE_REG_VALUE_INFO_HELPERS (idaman) struct reg_value_info_t | |
the value in a register after emulating instructions | |
DECLARE_REG_FINDER_HELPERS (idaman) struct reg_finder_block_t | |
idaman int ida_export | find_reg_value (uval_t *uval, ea_t ea, int reg) |
Find register value using the register tracker. | |
idaman int ida_export | find_sp_value (sval_t *sval, ea_t ea, int reg=-1) |
Find a value of the SP based register using the register tracker. | |
idaman bool ida_export | find_reg_value_info (reg_value_info_t *rvi, ea_t ea, int reg, int max_depth=0) |
Find register value using the register tracker. | |
idaman int ida_export | find_nearest_rvi (reg_value_info_t *rvi, ea_t ea, const int reg[2]) |
Find the value of any of the two registers using the register tracker. | |
idaman void ida_export | invalidate_regfinder_cache (ea_t to=BADADDR, ea_t from=BADADDR, cref_t cref=fl_U) |
The control flow from FROM to TO has removed (CREF==fl_U) or added (CREF!=fl_U). | |
idaman void ida_export | invalidate_regfinder_xrefs_cache (ea_t to=BADADDR, dref_t dref=dr_O) |
The data reference to TO has added (DREF!=dr_O) or removed (DREF==dr_O). |
typedef void(* reg_finder_binary_ops_adjust_fun) (reg_value_info_t *v1, reg_value_info_t *v2, const insn_t &insn, void *ud) |
DECLARE_REG_VALUE_DEF_HELPERS | ( | idaman | ) |
the register value and its defining instruction
< the value
< the instruction address
< the instruction code (processor specific)
< additional info about the value
< like 'addi reg, imm'
< the value depends on DEF_EA only for numbers
< the value is like GOT only for numbers
How to print reg_value_def_t?
< without a value
< as a number
< as a SP delta
< as an ABORTED value
Return the string representation.
DECLARE_TYPE_AS_MOVABLE | ( | reg_value_def_t | ) |
DECLARE_REG_VALUE_INFO_HELPERS | ( | idaman | ) |
the value in a register after emulating instructions
Undefine the value.
Return 'true' if we know nothing about a value.
Return the undefined value because of a dead end.
Return the value after aborting.
Return the unknown value after a bad insn.
Return the unknown value after executing the insn.
Return the unknown value from the function start.
Return the unknown value if it changes in a loop.
Return the unknown value if the register has incompatible values.
Return the unknown value if there are too many xrefs.
Return the unknown value if the register has too many values.
Return the value that is the RVAL number.
Return the value that is the RVAL number.
Return the value that is the initial stack pointer.
Return 'true' if the value is undefined because of a dead end.
Return 'true' if the tracking process was aborted.
Return 'true' if the value requires special handling.
Return 'true' if the value is unknown because of a bad insn.
Return 'true' if the value is unknown after executing the insn.
Return 'true' if the value is unknown from the function start.
Return 'true' if the value is unknown because it changes in a loop.
Return 'true' if the value is unknown because the register has incompatible values (a number and SP delta).
Return 'true' if the value is unknown because there are too many xrefs.
Return 'true' if the value is unknown because the register has too many values.
Return 'true' if the value is unknown.
Return 'true' if the value is a constant.
Return 'true' if the value depends on the stack pointer.
Return 'true' if the value is known (i.e. it is a number or SP delta).
Return the number if the value is a constant.
Return the SP delta if the value depends on the stack pointer.
[out] | sval | the value of SP minus the initial value of SP at the function start. |
Return the defining address.
Return the defining instruction code (processor specific).
Return the aborting depth if the value is ABORTED
Return a const iterator to the first value.
Return a const iterator right after the last value.
Return the number of values.
Check that the value is unique.
Check the given flag for each value.
Set the given flag for each value.
Set the value to be undefined because of a dead end.
Set the value to be unknown after a bad insn.
Set the value to be unknown after executing the insn.
Set the value to be unknown from the function start.
Set the value to be unknown because it changes in a loop.
Set the value to be unknown because the register has incompatible values.
Set the value to be unknown because there are too many xrefs.
Set the value to be unknown because the register has too many values.
Set the value after aborting.
Set the value to be a number after executing an insn.
Set the value to be numbers after executing an insn.
Set the value to be a number before an address.
The result of comparison of 2 value sets.
< L==R
< L contains R (i.e. R\L is empty)
< L is contained in R (i.e. L\R is empty)
< L\R is not empty and R\L is not empty
Add values from R into THIS ignoring duplicates.
EQUAL | THIS is not changed |
CONTAINS | THIS is not changed |
CONTAINED | THIS is a copy of R |
NOT_COMPARABLE | values from R are added to THIS |
Sign-, or zero-extend the number or SP delta value to full size. The initial value is considered to be of size WIDTH.
Truncate the number to the application bitness.
Add R to the value, save INSN as a defining instruction.
Subtract R from the value, save INSN as a defining instruction.
Make bitwise OR of R to the value, save INSN as a defining instruction.
Make bitwise AND of R to the value, save INSN as a defining instruction.
Make bitwise eXclusive OR of R to the value, save INSN as a defining instruction.
Make bitwise AND of the inverse of R to the value, save INSN as a defining instruction.
Shift the value left by R, save INSN as a defining instruction.
Shift logically the value right by R, save INSN as a defining instruction.
Shift arithmetically the value right by R, save INSN as a defining instruction.
Replace the top 16 bits with bottom 16 bits of R, leaving the bottom 16 bits untouched, save INSN as a defining instruction.
Negate the value, save INSN as a defining instruction.
Make bitwise inverse of the value, save INSN as a defining instruction.
Add R to the value, save INSN as a defining instruction.
Add R to the value, do not change the defining instructions.
Shift the value left by R, do not change the defining instructions.
Shift the value right by R, do not change the defining instructions.
Return the string representation.
DECLARE_REG_FINDER_HELPERS | ( | idaman | ) |
Find register value using the register tracker.
[out] | uval | the found value |
ea | the address to find a value at | |
reg | the register to find |
0 | no value (the value is varying or the find depth is not enough to find a value) |
1 | the found value is in VAL |
-1 | the processor module does not support a register tracker |
Find a value of the SP based register using the register tracker.
[out] | sval | the found value |
ea | the address to find a value at | |
reg | the register to find. by default the SP register is used. |
0 | no value (the value is varying or the find depth is not enough to find a value) |
1 | the found value is in VAL |
-1 | the processor module does not support a register tracker |
idaman bool ida_export find_reg_value_info | ( | reg_value_info_t * | rvi, |
ea_t | ea, | ||
int | reg, | ||
int | max_depth = 0 ) |
Find register value using the register tracker.
[out] | rvi | the found value with additional attributes |
ea | the address to find a value at | |
reg | the register to find | |
max_depth | the number of basic blocks to look before aborting the search and returning the unknown value. 0 means the value of REGTRACK_MAX_DEPTH from ida.cfg for ordinal registers or REGTRACK_FUNC_MAX_DEPTH for the function-wide registers, -1 means the value of REGTRACK_FUNC_MAX_DEPTH from ida.cfg. |
'false' | the processor module does not support a register tracker |
'true' | the found value is in RVI |
idaman int ida_export find_nearest_rvi | ( | reg_value_info_t * | rvi, |
ea_t | ea, | ||
const int | reg[2] ) |
Find the value of any of the two registers using the register tracker.
First, this function tries to find the registers in the basic block of EA, and if it could not do this, then it tries to find in the entire function.
[out] | rvi | the found value with additional attributes |
ea | the address to find a value at | |
reg | the registers to find |
idaman void ida_export invalidate_regfinder_cache | ( | ea_t | to = BADADDR, |
ea_t | from = BADADDR, | ||
cref_t | cref = fl_U ) |
The control flow from FROM to TO has removed (CREF==fl_U) or added (CREF!=fl_U).
Try to update the register tracker cache after this change. If TO == BADADDR then clear the entire cache.