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

Proxy of C++ cinsn_t class.

Inheritance diagram for cinsn_t:
citem_t ccase_t

Public Member Functions

 __init__ (self, *args)
 init(self) -> cinsn_t init(self, r) -> cinsn_t
 
"void" swap (self, *args)
 swap(self, r)
 
"cinsn_t &" assign (self, *args)
 assign(self, r) -> cinsn_t
 
"bool" __eq__ (self, *args)
 eq(self, r) -> bool
 
"bool" __ne__ (self, *args)
 ne(self, r) -> bool
 
"bool" __lt__ (self, *args)
 lt(self, r) -> bool
 
"bool" __gt__ (self, *args)
 gt(self, r) -> bool
 
"bool" __le__ (self, *args)
 le(self, r) -> bool
 
"bool" __ge__ (self, *args)
 ge(self, r) -> bool
 
"int" compare (self, *args)
 compare(self, r) -> int
 
"void" cleanup (self, *args)
 cleanup(self) Cleanup the statement.
 
"void" zero (self, *args)
 zero(self) Overwrite with zeroes without cleaning memory or deleting children.
 
"cinsn_t &" new_insn (self, *args)
 new_insn(self, insn_ea) -> cinsn_t Create a new statement.
 
"cif_t &" create_if (self, *args)
 create_if(self, cnd) -> cif_t Create a new if-statement.
 
"void" print1 (self, *args)
 print1(self, func) Print the statement into one line.
 
"bool" is_ordinary_flow (self, *args)
 is_ordinary_flow(self) -> bool Check if the statement passes execution to the next statement.
 
"bool" contains_insn (self, *args)
 contains_insn(self, type, times=1) -> bool Check if the statement contains a statement of the specified type.
 
"bool" collect_free_breaks (self, *args)
 collect_free_breaks(self, breaks) -> bool Collect free break statements.
 
"bool" collect_free_continues (self, *args)
 collect_free_continues(self, continues) -> bool Collect free continue statements.
 
"bool" contains_free_break (self, *args)
 contains_free_break(self) -> bool Check if the statement has free break statements.
 
"bool" contains_free_continue (self, *args)
 contains_free_continue(self) -> bool Check if the statement has free continue statements.
 
"char const *" dstr (self, *args)
 dstr(self) -> char const *
 
 is_epilog (self)
 
- Public Member Functions inherited from citem_t
"bool" is_expr (self, *args)
 is_expr(self) -> bool Is an expression?
 
"bool" contains_expr (self, *args)
 contains_expr(self, e) -> bool Does the item contain an expression?
 
"bool" contains_label (self, *args)
 contains_label(self) -> bool Does the item contain a label?
 
"citem_t *" find_parent_of (self, *args)
 find_parent_of(self, sitem) -> citem_t
 
"citem_t *" find_closest_addr (self, *args)
 find_closest_addr(self, _ea) -> citem_t
 
 replace_by (self, o)
 

Static Public Member Functions

"bool" insn_is_epilog (*args)
 insn_is_epilog(insn) -> bool
 

Protected Member Functions

"void" _replace_by (self, *args)
 _replace_by(self, r)
 
"void" _print (self, *args)
 _print(self, indent, vp, use_curly=CALC_CURLY_BRACES)
 
"void" _register (self, *args)
 _register(self)
 
"void" _deregister (self, *args)
 _deregister(self)
 
"cblock_t *" _get_cblock (self, *args)
 _get_cblock(self) -> cblock_t
 
"void" _set_cblock (self, *args)
 _set_cblock(self, _v)
 
"cexpr_t *" _get_cexpr (self, *args)
 _get_cexpr(self) -> cexpr_t
 
"void" _set_cexpr (self, *args)
 _set_cexpr(self, _v)
 
"cif_t *" _get_cif (self, *args)
 _get_cif(self) -> cif_t
 
"void" _set_cif (self, *args)
 _set_cif(self, _v)
 
"cfor_t *" _get_cfor (self, *args)
 _get_cfor(self) -> cfor_t
 
"void" _set_cfor (self, *args)
 _set_cfor(self, _v)
 
"cwhile_t *" _get_cwhile (self, *args)
 _get_cwhile(self) -> cwhile_t
 
"void" _set_cwhile (self, *args)
 _set_cwhile(self, _v)
 
"cdo_t *" _get_cdo (self, *args)
 _get_cdo(self) -> cdo_t
 
"void" _set_cdo (self, *args)
 _set_cdo(self, _v)
 
"cswitch_t *" _get_cswitch (self, *args)
 _get_cswitch(self) -> cswitch_t
 
"void" _set_cswitch (self, *args)
 _set_cswitch(self, _v)
 
"creturn_t *" _get_creturn (self, *args)
 _get_creturn(self) -> creturn_t
 
"void" _set_creturn (self, *args)
 _set_creturn(self, _v)
 
"cgoto_t *" _get_cgoto (self, *args)
 _get_cgoto(self) -> cgoto_t
 
"void" _set_cgoto (self, *args)
 _set_cgoto(self, _v)
 
"casm_t *" _get_casm (self, *args)
 _get_casm(self) -> casm_t
 
"void" _set_casm (self, *args)
 _set_casm(self, _v)
 
- Protected Member Functions inherited from citem_t
"ctype_t" _get_op (self, *args)
 _get_op(self) -> ctype_t
 
"void" _set_op (self, *args)
 _set_op(self, v)
 
 _ensure_no_op (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

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
 cblock
 
 cexpr
 
 cif
 
 cfor
 
 cwhile
 
 cdo
 
 cswitch
 
 creturn
 
 cgoto
 
 casm
 
- Properties inherited from citem_t
bool thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
 ea = property(_ida_hexrays.citem_t_ea_get, _ida_hexrays.citem_t_ea_set, doc=)
 
 label_num = property(_ida_hexrays.citem_t_label_num_get, _ida_hexrays.citem_t_label_num_set, doc=)
 
 index = property(_ida_hexrays.citem_t_index_get, _ida_hexrays.citem_t_index_set, doc=)
 
 cinsn = property(_ida_hexrays.citem_t_cinsn_get, doc=)
 
 cexpr = property(_ida_hexrays.citem_t_cexpr_get, doc=!)
 
 op
 
 obj_id = property(_obj_id)
 
 meminfo = property(_meminfo)
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args )
Parameters
rcinsn_t const &

Reimplemented from citem_t.

Reimplemented in ccase_t.

Member Function Documentation

◆ __eq__()

"bool" __eq__ ( self,
* args )
Parameters
rcinsn_t const &

Reimplemented in ccase_t.

◆ __ge__()

"bool" __ge__ ( self,
* args )
Parameters
rcinsn_t const &

Reimplemented in ccase_t.

◆ __gt__()

"bool" __gt__ ( self,
* args )
Parameters
rcinsn_t const &

Reimplemented in ccase_t.

◆ __le__()

"bool" __le__ ( self,
* args )
Parameters
rcinsn_t const &

Reimplemented in ccase_t.

◆ __lt__()

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

Reimplemented in ccase_t.

◆ __ne__()

"bool" __ne__ ( self,
* args )
Parameters
rcinsn_t const &

Reimplemented in ccase_t.

◆ _deregister()

"void" _deregister ( self,
* args )
protected

◆ _get_casm()

"casm_t *" _get_casm ( self,
* args )
protected

◆ _get_cblock()

"cblock_t *" _get_cblock ( self,
* args )
protected

◆ _get_cdo()

"cdo_t *" _get_cdo ( self,
* args )
protected

◆ _get_cexpr()

"cexpr_t *" _get_cexpr ( self,
* args )
protected

◆ _get_cfor()

"cfor_t *" _get_cfor ( self,
* args )
protected

◆ _get_cgoto()

"cgoto_t *" _get_cgoto ( self,
* args )
protected

◆ _get_cif()

"cif_t *" _get_cif ( self,
* args )
protected

◆ _get_creturn()

"creturn_t *" _get_creturn ( self,
* args )
protected

◆ _get_cswitch()

"cswitch_t *" _get_cswitch ( self,
* args )
protected

◆ _get_cwhile()

"cwhile_t *" _get_cwhile ( self,
* args )
protected

◆ _print()

"void" _print ( self,
* args )
protected

Parameters

indent: int vp: vc_printer_t & use_curly: enum use_curly_t

◆ _register()

"void" _register ( self,
* args )
protected

◆ _replace_by()

"void" _replace_by ( self,
* args )
protected

Parameters

r: cinsn_t *

◆ _set_casm()

"void" _set_casm ( self,
* args )
protected

Parameters

_v: casm_t *

◆ _set_cblock()

"void" _set_cblock ( self,
* args )
protected

Parameters

_v: cblock_t *

◆ _set_cdo()

"void" _set_cdo ( self,
* args )
protected

Parameters

_v: cdo_t *

◆ _set_cexpr()

"void" _set_cexpr ( self,
* args )
protected

Parameters

_v: cexpr_t *

◆ _set_cfor()

"void" _set_cfor ( self,
* args )
protected

Parameters

_v: cfor_t *

◆ _set_cgoto()

"void" _set_cgoto ( self,
* args )
protected

Parameters

_v: cgoto_t *

◆ _set_cif()

"void" _set_cif ( self,
* args )
protected

Parameters

_v: cif_t *

◆ _set_creturn()

"void" _set_creturn ( self,
* args )
protected

Parameters

_v: creturn_t *

◆ _set_cswitch()

"void" _set_cswitch ( self,
* args )
protected

Parameters

_v: cswitch_t *

◆ _set_cwhile()

"void" _set_cwhile ( self,
* args )
protected

Parameters

_v: cwhile_t *

◆ assign()

"cinsn_t &" assign ( self,
* args )
Parameters
rcinsn_t const &

◆ cleanup()

"void" cleanup ( self,
* args )

This function properly deletes all children and sets the item type to cit_empty.

◆ collect_free_breaks()

"bool" collect_free_breaks ( self,
* args )

This function finds all free break statements within the current statement. A break statement is free if it does not have a loop or switch parent that that is also within the current statement.

Parameters
breaks(C++: cinsnptrvec_t *) pointer to the variable where the vector of all found free break statements is returned. This argument can be nullptr.
Returns
: true if some free break statements have been found

◆ collect_free_continues()

"bool" collect_free_continues ( self,
* args )

This function finds all free continue statements within the current statement. A continue statement is free if it does not have a loop parent that that is also within the current statement.

Parameters
continues(C++: cinsnptrvec_t *) pointer to the variable where the vector of all found free continue statements is returned. This argument can be nullptr.
Returns
: true if some free continue statements have been found

◆ compare()

"int" compare ( self,
* args )
Parameters
rcinsn_t const &

Reimplemented in ccase_t.

◆ contains_free_break()

"bool" contains_free_break ( self,
* args )

◆ contains_free_continue()

"bool" contains_free_continue ( self,
* args )

◆ contains_insn()

"bool" contains_insn ( self,
* args )
Parameters
type(C++: ctype_t) statement opcode to look for
times(C++: int) how many times TYPE should be present
Returns
: true if the statement has at least TIMES children with opcode == TYPE

◆ create_if()

"cif_t &" create_if ( self,
* args )

The current statement must be a block. The new statement will be appended to it.

Parameters
cnd(C++: cexpr_t *) if condition. It will be deleted after being copied.

◆ dstr()

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

◆ insn_is_epilog()

"bool" insn_is_epilog ( * args)
static
Parameters
insncinsn_t const *

◆ is_epilog()

is_epilog ( self)

◆ is_ordinary_flow()

"bool" is_ordinary_flow ( self,
* args )
Returns
: false if the statement breaks the control flow (like goto, return, etc)

◆ new_insn()

"cinsn_t &" new_insn ( self,
* args )

The current statement must be a block. The new statement will be appended to it.

Parameters
insn_ea(C++: ea_t) statement address

◆ print1()

"void" print1 ( self,
* args )

Currently this function is not available.

Parameters
func(C++: const cfunc_t *) parent function. This argument is used to find out the referenced variable names.

Reimplemented from citem_t.

◆ swap()

"void" swap ( self,
* args )
Parameters
rcinsn_t &

Reimplemented from citem_t.

◆ zero()

"void" zero ( self,
* args )

Property Documentation

◆ casm

casm
static
Initial value:
= property(
lambda self: self._get_casm() if self.op == cit_asm else None,
lambda self, v: self._ensure_cond(self.op == cit_asm,"self.op == cit_asm") \
and self._ensure_no_obj(self._get_casm(),"casm", True) \
and self._acquire_ownership(v, True) \
and self._set_casm(v))

◆ cblock

cblock
static
Initial value:
= property(
lambda self: self._get_cblock() if self.op == cit_block else None,
lambda self, v: self._ensure_cond(self.op == cit_block,"self.op == cit_block") \
and self._ensure_no_obj(self._get_cblock(),"cblock", True) \
and self._acquire_ownership(v, True) \
and self._set_cblock(v))

◆ cdo

cdo
static
Initial value:
= property(
lambda self: self._get_cdo() if self.op == cit_do else None,
lambda self, v: self._ensure_cond(self.op == cit_do,"self.op == cit_do") \
and self._ensure_no_obj(self._get_cdo(),"cdo", True) \
and self._acquire_ownership(v, True) \
and self._set_cdo(v))

◆ cexpr

cexpr
static
Initial value:
= property(
lambda self: self._get_cexpr() if self.op == cit_expr else None,
lambda self, v: self._ensure_cond(self.op == cit_expr,"self.op == cit_expr") \
and self._ensure_no_obj(self._get_cexpr(),"cexpr", True) \
and self._acquire_ownership(v, True) \
and self._set_cexpr(v))

◆ cfor

cfor
static
Initial value:
= property(
lambda self: self._get_cfor() if self.op == cit_for else None,
lambda self, v: self._ensure_cond(self.op == cit_for,"self.op == cit_for") \
and self._ensure_no_obj(self._get_cfor(),"cfor", True) \
and self._acquire_ownership(v, True) \
and self._set_cfor(v))

◆ cgoto

cgoto
static
Initial value:
= property(
lambda self: self._get_cgoto() if self.op == cit_goto else None,
lambda self, v: self._ensure_cond(self.op == cit_goto,"self.op == cit_goto") \
and self._ensure_no_obj(self._get_cgoto(),"cgoto", True) \
and self._acquire_ownership(v, True) \
and self._set_cgoto(v))

◆ cif

cif
static
Initial value:
= property(
lambda self: self._get_cif() if self.op == cit_if else None,
lambda self, v: self._ensure_cond(self.op == cit_if,"self.op == cit_if") \
and self._ensure_no_obj(self._get_cif(),"cif", True) \
and self._acquire_ownership(v, True) \
and self._set_cif(v))

◆ creturn

creturn
static
Initial value:
= property(
lambda self: self._get_creturn() if self.op == cit_return else None,
lambda self, v: self._ensure_cond(self.op == cit_return,"self.op == cit_return") \
and self._ensure_no_obj(self._get_creturn(),"creturn", True) \
and self._acquire_ownership(v, True) \
and self._set_creturn(v))

◆ cswitch

cswitch
static
Initial value:
= property(
lambda self: self._get_cswitch() if self.op == cit_switch else None,
lambda self, v: self._ensure_cond(self.op == cit_switch,"self.op == cit_switch") \
and self._ensure_no_obj(self._get_cswitch(),"cswitch", True) \
and self._acquire_ownership(v, True) \
and self._set_cswitch(v))

◆ cwhile

cwhile
static
Initial value:
= property(
lambda self: self._get_cwhile() if self.op == cit_while else None,
lambda self, v: self._ensure_cond(self.op == cit_while,"self.op == cit_while") \
and self._ensure_no_obj(self._get_cwhile(),"cwhile", True) \
and self._acquire_ownership(v, True) \
and self._set_cwhile(v))

◆ thisown

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: