Skip to main content

instr_compute_address

Function instr_compute_address 

Source
pub unsafe extern "C" fn instr_compute_address(
    instr: *mut instr_t,
    mc: *mut dr_mcontext_t,
) -> app_pc
Expand description

Returns NULL if none of \p instr’s operands is a memory reference. Otherwise, returns the effective address of the first memory operand when the operands are considered in this order: destinations and then sources. The address is computed using the passed-in registers. \p mc->flags must include DR_MC_CONTROL and DR_MC_INTEGER. For instructions that use vector addressing (VSIB, introduced in AVX2), mc->flags must additionally include DR_MC_MULTIMEDIA.

Like instr_reads_memory(), this routine does not consider multi-byte nops that use addressing operands, or the #OP_lea instruction’s source operand, to be memory references.