IDAPython 8.4
Loading...
Searching...
No Matches
minsn_t Class Reference

Proxy of C++ minsn_t class.

Inheritance diagram for minsn_t:

Public Member Functions

"bool" is_optional (self, *args)
 is_optional(self) -> bool
 
"bool" is_combined (self, *args)
 is_combined(self) -> bool
 
"bool" is_farcall (self, *args)
 is_farcall(self) -> bool
 
"bool" is_cleaning_pop (self, *args)
 is_cleaning_pop(self) -> bool
 
"bool" is_extstx (self, *args)
 is_extstx(self) -> bool
 
"bool" is_tailcall (self, *args)
 is_tailcall(self) -> bool
 
"bool" is_fpinsn (self, *args)
 is_fpinsn(self) -> bool
 
"bool" is_assert (self, *args)
 is_assert(self) -> bool
 
"bool" is_persistent (self, *args)
 is_persistent(self) -> bool
 
"bool" is_wild_match (self, *args)
 is_wild_match(self) -> bool
 
"bool" is_propagatable (self, *args)
 is_propagatable(self) -> bool
 
"bool" is_ignlowsrc (self, *args)
 is_ignlowsrc(self) -> bool
 
"bool" is_inverted_jx (self, *args)
 is_inverted_jx(self) -> bool
 
"bool" was_noret_icall (self, *args)
 was_noret_icall(self) -> bool
 
"bool" is_multimov (self, *args)
 is_multimov(self) -> bool
 
"bool" is_combinable (self, *args)
 is_combinable(self) -> bool
 
"bool" was_split (self, *args)
 was_split(self) -> bool
 
"bool" is_mbarrier (self, *args)
 is_mbarrier(self) -> bool
 
"bool" was_unmerged (self, *args)
 was_unmerged(self) -> bool
 
"void" set_optional (self, *args)
 set_optional(self)
 
"void" clr_combined (self, *args)
 clr_combined(self)
 
"void" set_farcall (self, *args)
 set_farcall(self)
 
"void" set_cleaning_pop (self, *args)
 set_cleaning_pop(self)
 
"void" set_extstx (self, *args)
 set_extstx(self)
 
"void" set_tailcall (self, *args)
 set_tailcall(self)
 
"void" clr_tailcall (self, *args)
 clr_tailcall(self)
 
"void" set_fpinsn (self, *args)
 set_fpinsn(self)
 
"void" clr_fpinsn (self, *args)
 clr_fpinsn(self)
 
"void" set_assert (self, *args)
 set_assert(self)
 
"void" clr_assert (self, *args)
 clr_assert(self)
 
"void" set_persistent (self, *args)
 set_persistent(self)
 
"void" set_wild_match (self, *args)
 set_wild_match(self)
 
"void" clr_propagatable (self, *args)
 clr_propagatable(self)
 
"void" set_ignlowsrc (self, *args)
 set_ignlowsrc(self)
 
"void" clr_ignlowsrc (self, *args)
 clr_ignlowsrc(self)
 
"void" set_inverted_jx (self, *args)
 set_inverted_jx(self)
 
"void" set_noret_icall (self, *args)
 set_noret_icall(self)
 
"void" clr_noret_icall (self, *args)
 clr_noret_icall(self)
 
"void" set_multimov (self, *args)
 set_multimov(self)
 
"void" clr_multimov (self, *args)
 clr_multimov(self)
 
"void" set_combinable (self, *args)
 set_combinable(self)
 
"void" clr_combinable (self, *args)
 clr_combinable(self)
 
"void" set_mbarrier (self, *args)
 set_mbarrier(self)
 
"void" set_unmerged (self, *args)
 set_unmerged(self)
 
"void" set_split_size (self, *args)
 set_split_size(self, s)
 
"int" get_split_size (self, *args)
 get_split_size(self) -> int
 
 __init__ (self, *args)
 init(self, _ea) -> minsn_t
 
"void" swap (self, *args)
 swap(self, m) Swap two instructions.
 
"char const *" dstr (self, *args)
 dstr(self) -> char const * Get displayable text without tags in a static buffer.
 
"void" setaddr (self, *args)
 setaddr(self, new_ea) Change the instruction address.
 
"int" optimize_solo (self, *args)
 optimize_solo(self, optflags=0) -> int Optimize one instruction without context.
 
"int" optimize_subtree (self, *args)
 optimize_subtree(self, blk, top, parent, converted_call, optflags=0x0002) -> int Optimize instruction in its context.
 
"int" for_all_ops (self, *args)
 for_all_ops(self, mv) -> int Visit all instruction operands.
 
"int" for_all_insns (self, *args)
 for_all_insns(self, mv) -> int Visit all instructions.
 
"bool" equal_insns (self, *args)
 equal_insns(self, m, eqflags) -> bool Compare instructions.
 
"bool" __lt__ (self, *args)
 lt(self, ri) -> bool
 
"int" lexcompare (self, *args)
 lexcompare(self, ri) -> int
 
"bool" is_noret_call (self, *args)
 is_noret_call(self, flags=0) -> bool Is a non-returing call?
 
"bool" is_unknown_call (self, *args)
 is_unknown_call(self) -> bool Is an unknown call? Unknown calls are calls without the argument list (mcallinfo_t).
 
"bool" is_helper (self, *args)
 is_helper(self, name) -> bool Is a helper call with the specified name? Helper calls usually have well-known function names (see Well known function names) but they may have any other name.
 
"minsn_t *" find_call (self, *args)
 find_call(self, with_helpers=False) -> minsn_t Find a call instruction.
 
"bool" contains_call (self, *args)
 contains_call(self, with_helpers=False) -> bool Does the instruction contain a call?
 
"bool" has_side_effects (self, *args)
 has_side_effects(self, include_ldx_and_divs=False) -> bool Does the instruction have a side effect?
 
"funcrole_t" get_role (self, *args)
 get_role(self) -> funcrole_t Get the function role of a call.
 
"bool" is_memcpy (self, *args)
 is_memcpy(self) -> bool
 
"bool" is_memset (self, *args)
 is_memset(self) -> bool
 
"bool" is_alloca (self, *args)
 is_alloca(self) -> bool
 
"bool" is_bswap (self, *args)
 is_bswap(self) -> bool
 
"bool" is_readflags (self, *args)
 is_readflags(self) -> bool
 
"bool" contains_opcode (self, *args)
 contains_opcode(self, mcode) -> bool Does the instruction have the specified opcode? This function searches subinstructions as well.
 
"minsn_t *" find_opcode (self, *args)
 find_opcode(self, mcode) -> minsn_t
 
"minsn_t *" find_ins_op (self, *args)
 find_ins_op(self, op=m_nop) -> minsn_t
 
"mop_t *" find_num_op (self, *args)
 find_num_op(self) -> mop_t
 
"bool" is_mov (self, *args)
 is_mov(self) -> bool
 
"bool" is_like_move (self, *args)
 is_like_move(self) -> bool
 
"bool" modifies_d (self, *args)
 modifies_d(self) -> bool Does the instruction modify its 'd' operand? Some instructions (e.g.
 
"bool" modifies_pair_mop (self, *args)
 modifies_pair_mop(self) -> bool
 
"bool" is_between (self, *args)
 is_between(self, m1, m2) -> bool Is the instruction in the specified range of instructions?
 
"bool" is_after (self, *args)
 is_after(self, m) -> bool Is the instruction after the specified one?
 
"bool" may_use_aliased_memory (self, *args)
 may_use_aliased_memory(self) -> bool Is it possible for the instruction to use aliased memory?
 
"int" serialize (self, *args)
 serialize(self, b) -> int Serialize an instruction
 
"bool" deserialize (self, *args)
 deserialize(self, bytes, format_version) -> bool Deserialize an instruction
 
 replace_by (self, o)
 

Protected Member Functions

"void" _print (self, *args)
 _print(self, shins_flags=0x04|0x02)
 
"void" _make_nop (self, *args)
 _make_nop(self)
 
"void" _register (self, *args)
 _register(self)
 
"void" _deregister (self, *args)
 _deregister(self)
 
"PyObject *" _obj_id (self, *args)
 _obj_id(self) -> PyObject *
 
 _ensure_cond (self, ok, cond_str)
 
 _ensure_no_obj (self, o, attr, attr_is_acquired)
 
 _ensure_ownership_transferrable (self, v)
 
 _acquire_ownership (self, v, acquire)
 
 _maybe_disown_and_deregister (self)
 
 _own_and_register (self)
 
 _meminfo (self)
 

Properties

bool thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
 opcode = property(_ida_hexrays.minsn_t_opcode_get, _ida_hexrays.minsn_t_opcode_set, doc=)
 
 iprops = property(_ida_hexrays.minsn_t_iprops_get, _ida_hexrays.minsn_t_iprops_set, doc=)
 
 next = property(_ida_hexrays.minsn_t_next_get, _ida_hexrays.minsn_t_next_set, doc=)
 
 prev = property(_ida_hexrays.minsn_t_prev_get, _ida_hexrays.minsn_t_prev_set, doc=)
 
 ea = property(_ida_hexrays.minsn_t_ea_get, _ida_hexrays.minsn_t_ea_set, doc=)
 
 l = property(_ida_hexrays.minsn_t_l_get, _ida_hexrays.minsn_t_l_set, doc=)
 
 r = property(_ida_hexrays.minsn_t_r_get, _ida_hexrays.minsn_t_r_set, doc=!)
 
 d = property(_ida_hexrays.minsn_t_d_get, _ida_hexrays.minsn_t_d_set, doc=)
 
 obj_id = property(_obj_id)
 
 meminfo = property(_meminfo)
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args )
Parameters
_eaea_t

init(self, m) -> minsn_t

Parameters
mminsn_t const &

Member Function Documentation

◆ __lt__()

"bool" __lt__ ( self,
* args )
Parameters
riminsn_t const &

◆ _acquire_ownership()

_acquire_ownership ( self,
v,
acquire )
protected

◆ _deregister()

"void" _deregister ( self,
* args )
protected

◆ _ensure_cond()

_ensure_cond ( self,
ok,
cond_str )
protected

◆ _ensure_no_obj()

_ensure_no_obj ( self,
o,
attr,
attr_is_acquired )
protected

◆ _ensure_ownership_transferrable()

_ensure_ownership_transferrable ( self,
v )
protected

◆ _make_nop()

"void" _make_nop ( self,
* args )
protected

◆ _maybe_disown_and_deregister()

_maybe_disown_and_deregister ( self)
protected

◆ _meminfo()

_meminfo ( self)
protected

◆ _obj_id()

"PyObject *" _obj_id ( self,
* args )
protected

◆ _own_and_register()

_own_and_register ( self)
protected

◆ _print()

"void" _print ( self,
* args )
protected

Parameters

shins_flags: int

◆ _register()

"void" _register ( self,
* args )
protected

◆ clr_assert()

"void" clr_assert ( self,
* args )

◆ clr_combinable()

"void" clr_combinable ( self,
* args )

◆ clr_combined()

"void" clr_combined ( self,
* args )

◆ clr_fpinsn()

"void" clr_fpinsn ( self,
* args )

◆ clr_ignlowsrc()

"void" clr_ignlowsrc ( self,
* args )

◆ clr_multimov()

"void" clr_multimov ( self,
* args )

◆ clr_noret_icall()

"void" clr_noret_icall ( self,
* args )

◆ clr_propagatable()

"void" clr_propagatable ( self,
* args )

◆ clr_tailcall()

"void" clr_tailcall ( self,
* args )

◆ contains_call()

"bool" contains_call ( self,
* args )
Parameters
with_helpers(C++: bool)

◆ contains_opcode()

"bool" contains_opcode ( self,
* args )
Parameters
mcode(C++: mcode_t) opcode to search for.

◆ deserialize()

"bool" deserialize ( self,
* args )
Parameters
bytes(C++: const uchar *) pointer to serialized data
format_version(C++: int) serialization format version. this value is returned by minsn_t.serialize()
Returns
: success

◆ dstr()

"char const *" dstr ( self,
* args )

◆ equal_insns()

"bool" equal_insns ( self,
* args )

This is the main comparison function for instructions.

Parameters
m(C++: const minsn_t &) instruction to compare with
eqflags(C++: int) combination of comparison bits bits

◆ find_call()

"minsn_t *" find_call ( self,
* args )

Check for the current instruction and its subinstructions.

Parameters
with_helpers(C++: bool) consider helper calls as well?

◆ find_ins_op()

"minsn_t *" find_ins_op ( self,
* args )
Parameters
openum mcode_t

◆ find_num_op()

"mop_t *" find_num_op ( self,
* args )

◆ find_opcode()

"minsn_t *" find_opcode ( self,
* args )
Parameters
mcodeenum mcode_t

◆ for_all_insns()

"int" for_all_insns ( self,
* args )

This function visits the instruction itself and all its subinstructions.

Parameters
mv(C++: minsn_visitor_t &) instruction visitor
Returns
: non-zero value returned by mv.visit_mop() or zero

◆ for_all_ops()

"int" for_all_ops ( self,
* args )

This function visits subinstruction operands as well.

Parameters
mv(C++: mop_visitor_t &) operand visitor
Returns
: non-zero value returned by mv.visit_mop() or zero

◆ get_role()

"funcrole_t" get_role ( self,
* args )

◆ get_split_size()

"int" get_split_size ( self,
* args )

◆ has_side_effects()

"bool" has_side_effects ( self,
* args )
Parameters
include_ldx_and_divs(C++: bool) consider ldx/div/mod as having side effects? stx is always considered as having side effects. Apart from ldx/std only call may have side effects.

◆ is_after()

"bool" is_after ( self,
* args )
Parameters
m(C++: const minsn_t *) the instruction to compare against in the list

◆ is_alloca()

"bool" is_alloca ( self,
* args )

◆ is_assert()

"bool" is_assert ( self,
* args )

◆ is_between()

"bool" is_between ( self,
* args )
Parameters
m1(C++: const minsn_t *) beginning of the range in the doubly linked list
m2(C++: const minsn_t *) end of the range in the doubly linked list (excluded, may be nullptr) This function assumes that m1 and m2 belong to the same basic block and they are top level instructions.

◆ is_bswap()

"bool" is_bswap ( self,
* args )

◆ is_cleaning_pop()

"bool" is_cleaning_pop ( self,
* args )

◆ is_combinable()

"bool" is_combinable ( self,
* args )

◆ is_combined()

"bool" is_combined ( self,
* args )

◆ is_extstx()

"bool" is_extstx ( self,
* args )

◆ is_farcall()

"bool" is_farcall ( self,
* args )

◆ is_fpinsn()

"bool" is_fpinsn ( self,
* args )

◆ is_helper()

"bool" is_helper ( self,
* args )

The decompiler does not assume any special meaning for non-well-known names.

Parameters
name(C++: const char *) char const *

◆ is_ignlowsrc()

"bool" is_ignlowsrc ( self,
* args )

◆ is_inverted_jx()

"bool" is_inverted_jx ( self,
* args )

◆ is_like_move()

"bool" is_like_move ( self,
* args )

◆ is_mbarrier()

"bool" is_mbarrier ( self,
* args )

◆ is_memcpy()

"bool" is_memcpy ( self,
* args )

◆ is_memset()

"bool" is_memset ( self,
* args )

◆ is_mov()

"bool" is_mov ( self,
* args )

◆ is_multimov()

"bool" is_multimov ( self,
* args )

◆ is_noret_call()

"bool" is_noret_call ( self,
* args )
Parameters
flags(C++: int) combination of NORET_... bits

◆ is_optional()

"bool" is_optional ( self,
* args )

◆ is_persistent()

"bool" is_persistent ( self,
* args )

◆ is_propagatable()

"bool" is_propagatable ( self,
* args )

◆ is_readflags()

"bool" is_readflags ( self,
* args )

◆ is_tailcall()

"bool" is_tailcall ( self,
* args )

◆ is_unknown_call()

"bool" is_unknown_call ( self,
* args )

Usually the argument lists are determined by mba_t.analyze_calls(). Unknown calls exist until the MMAT_CALLS maturity level. See also mblock_t.is_call_block

◆ is_wild_match()

"bool" is_wild_match ( self,
* args )

◆ lexcompare()

"int" lexcompare ( self,
* args )
Parameters
riminsn_t const &

◆ may_use_aliased_memory()

"bool" may_use_aliased_memory ( self,
* args )

◆ modifies_d()

"bool" modifies_d ( self,
* args )

m_stx) do not modify the 'd' operand.

◆ modifies_pair_mop()

"bool" modifies_pair_mop ( self,
* args )

◆ optimize_solo()

"int" optimize_solo ( self,
* args )

This function does not have access to the instruction context (the previous and next instructions in the list, the block number, etc). It performs only basic optimizations that are available without this info.

Parameters
optflags(C++: int) combination of optimization flags bits
Returns
: number of changes, 0-unchanged See also mblock_t.optimize_insn()

◆ optimize_subtree()

"int" optimize_subtree ( self,
* args )

Do not use this function, use mblock_t::optimize()

Parameters
blk(C++: mblock_t *)
top(C++: minsn_t *)
parent(C++: minsn_t *)
converted_call(C++: ea_t *)
optflags(C++: int)

◆ replace_by()

replace_by ( self,
o )

◆ serialize()

"int" serialize ( self,
* args )
Parameters
b(C++: bytevec_t *) the output buffer
Returns
: the serialization format that was used to store info

◆ set_assert()

"void" set_assert ( self,
* args )

◆ set_cleaning_pop()

"void" set_cleaning_pop ( self,
* args )

◆ set_combinable()

"void" set_combinable ( self,
* args )

◆ set_extstx()

"void" set_extstx ( self,
* args )

◆ set_farcall()

"void" set_farcall ( self,
* args )

◆ set_fpinsn()

"void" set_fpinsn ( self,
* args )

◆ set_ignlowsrc()

"void" set_ignlowsrc ( self,
* args )

◆ set_inverted_jx()

"void" set_inverted_jx ( self,
* args )

◆ set_mbarrier()

"void" set_mbarrier ( self,
* args )

◆ set_multimov()

"void" set_multimov ( self,
* args )

◆ set_noret_icall()

"void" set_noret_icall ( self,
* args )

◆ set_optional()

"void" set_optional ( self,
* args )

◆ set_persistent()

"void" set_persistent ( self,
* args )

◆ set_split_size()

"void" set_split_size ( self,
* args )
Parameters
sint

◆ set_tailcall()

"void" set_tailcall ( self,
* args )

◆ set_unmerged()

"void" set_unmerged ( self,
* args )

◆ set_wild_match()

"void" set_wild_match ( self,
* args )

◆ setaddr()

"void" setaddr ( self,
* args )

This function modifies subinstructions as well.

Parameters
new_ea(C++: ea_t)

◆ swap()

"void" swap ( self,
* args )

The prev/next fields are not modified by this function because it would corrupt the doubly linked list.

Parameters
m(C++: minsn_t &)

◆ was_noret_icall()

"bool" was_noret_icall ( self,
* args )

◆ was_split()

"bool" was_split ( self,
* args )

◆ was_unmerged()

"bool" was_unmerged ( self,
* args )

Property Documentation

◆ d

d = property(_ida_hexrays.minsn_t_d_get, _ida_hexrays.minsn_t_d_set, doc=)
static

◆ ea

ea = property(_ida_hexrays.minsn_t_ea_get, _ida_hexrays.minsn_t_ea_set, doc=)
static

◆ iprops

iprops = property(_ida_hexrays.minsn_t_iprops_get, _ida_hexrays.minsn_t_iprops_set, doc=)
static

◆ l

l = property(_ida_hexrays.minsn_t_l_get, _ida_hexrays.minsn_t_l_set, doc=)
static

◆ meminfo

meminfo = property(_meminfo)
static

◆ next

next = property(_ida_hexrays.minsn_t_next_get, _ida_hexrays.minsn_t_next_set, doc=)
static

◆ obj_id

obj_id = property(_obj_id)
static

◆ opcode

opcode = property(_ida_hexrays.minsn_t_opcode_get, _ida_hexrays.minsn_t_opcode_set, doc=)
static

◆ prev

prev = property(_ida_hexrays.minsn_t_prev_get, _ida_hexrays.minsn_t_prev_set, doc=)
static

◆ r

r = property(_ida_hexrays.minsn_t_r_get, _ida_hexrays.minsn_t_r_set, doc=!)
static

◆ thisown

bool thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

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