IDAPython 9.0
Loading...
Searching...
No Matches
cinsn_t Class Reference
Inheritance diagram for cinsn_t:
citem_t ccase_t

Public Member Functions

 __init__ (self, *args)
 
None swap (self, 'cinsn_t' r)
 
'cinsn_t &' assign (self, 'cinsn_t' r)
 
bool __eq__ (self, 'cinsn_t' r)
 
bool __ne__ (self, 'cinsn_t' r)
 
bool __lt__ (self, 'cinsn_t' r)
 
bool __gt__ (self, 'cinsn_t' r)
 
bool __le__ (self, 'cinsn_t' r)
 
bool __ge__ (self, 'cinsn_t' r)
 
int compare (self, 'cinsn_t' r)
 
None cleanup (self)
 
None zero (self)
 
'cinsn_t &' new_insn (self, ida_idaapi.ea_t insn_ea)
 
'cif_t &' create_if (self, 'cexpr_t' cnd)
 
None print1 (self, 'cfunc_t' func)
 
bool is_ordinary_flow (self)
 
bool contains_insn (self, 'ctype_t' type, int times=1)
 
bool collect_free_breaks (self, 'cinsnptrvec_t' breaks)
 
bool collect_free_continues (self, 'cinsnptrvec_t' continues)
 
bool contains_free_break (self)
 
bool contains_free_continue (self)
 
str dstr (self)
 
 is_epilog (self)
 
- Public Member Functions inherited from citem_t
bool is_expr (self)
 
bool contains_expr (self, 'cexpr_t' e)
 
bool contains_label (self)
 
'citem_t *' find_parent_of (self, 'citem_t' item)
 
'citem_t *' find_closest_addr (self, ida_idaapi.ea_t _ea)
 
 replace_by (self, o)
 

Static Public Member Functions

bool insn_is_epilog ('cinsn_t' insn)
 

Static Public Attributes

str ctry
 
str cthrow
 
- Static Public Attributes inherited from citem_t
str ea
 
str label_num
 
str index
 
str cinsn = property(_ida_hexrays.citem_t_cinsn_get)
 
str cexpr = property(_ida_hexrays.citem_t_cexpr_get)
 

Protected Member Functions

None _replace_by (self, 'cinsn_t' r)
 
None _print (self, int indent, 'vc_printer_t' vp, 'use_curly_t' use_curly=CALC_CURLY_BRACES)
 
None _register (self)
 
None _deregister (self)
 
'cblock_t *' _get_cblock (self)
 
None _set_cblock (self, 'cblock_t' _v)
 
'cexpr_t *' _get_cexpr (self)
 
None _set_cexpr (self, 'cexpr_t' _v)
 
'cif_t *' _get_cif (self)
 
None _set_cif (self, 'cif_t' _v)
 
'cfor_t *' _get_cfor (self)
 
None _set_cfor (self, 'cfor_t' _v)
 
'cwhile_t *' _get_cwhile (self)
 
None _set_cwhile (self, 'cwhile_t' _v)
 
'cdo_t *' _get_cdo (self)
 
None _set_cdo (self, 'cdo_t' _v)
 
'cswitch_t *' _get_cswitch (self)
 
None _set_cswitch (self, 'cswitch_t' _v)
 
'creturn_t *' _get_creturn (self)
 
None _set_creturn (self, 'creturn_t' _v)
 
'cgoto_t *' _get_cgoto (self)
 
None _set_cgoto (self, 'cgoto_t' _v)
 
'casm_t *' _get_casm (self)
 
None _set_casm (self, 'casm_t' _v)
 
- Protected Member Functions inherited from citem_t
'ctype_t' _get_op (self)
 
None _set_op (self, 'ctype_t' v)
 
 _ensure_no_op (self)
 
'PyObject *' _obj_id (self)
 
 _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
 
 cblock
 
 cexpr
 
 cif
 
 cfor
 
 cwhile
 
 cdo
 
 cswitch
 
 creturn
 
 cgoto
 
 casm
 
- Properties inherited from citem_t
bool thisown
 
 op
 
 obj_id = property(_obj_id)
 
 meminfo = property(_meminfo)
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args )

Reimplemented from citem_t.

Reimplemented in ccase_t.

Member Function Documentation

◆ __eq__()

bool __eq__ ( self,
'cinsn_t' r )

Reimplemented in ccase_t.

◆ __ge__()

bool __ge__ ( self,
'cinsn_t' r )

Reimplemented in ccase_t.

◆ __gt__()

bool __gt__ ( self,
'cinsn_t' r )

Reimplemented in ccase_t.

◆ __le__()

bool __le__ ( self,
'cinsn_t' r )

Reimplemented in ccase_t.

◆ __lt__()

bool __lt__ ( self,
'cinsn_t' r )

Reimplemented in ccase_t.

◆ __ne__()

bool __ne__ ( self,
'cinsn_t' r )

Reimplemented in ccase_t.

◆ _deregister()

None _deregister ( self)
protected

◆ _get_casm()

'casm_t *' _get_casm ( self)
protected

◆ _get_cblock()

'cblock_t *' _get_cblock ( self)
protected

◆ _get_cdo()

'cdo_t *' _get_cdo ( self)
protected

◆ _get_cexpr()

'cexpr_t *' _get_cexpr ( self)
protected

◆ _get_cfor()

'cfor_t *' _get_cfor ( self)
protected

◆ _get_cgoto()

'cgoto_t *' _get_cgoto ( self)
protected

◆ _get_cif()

'cif_t *' _get_cif ( self)
protected

◆ _get_creturn()

'creturn_t *' _get_creturn ( self)
protected

◆ _get_cswitch()

'cswitch_t *' _get_cswitch ( self)
protected

◆ _get_cwhile()

'cwhile_t *' _get_cwhile ( self)
protected

◆ _print()

None _print ( self,
int indent,
'vc_printer_t' vp,
'use_curly_t' use_curly = CALC_CURLY_BRACES )
protected

◆ _register()

None _register ( self)
protected

◆ _replace_by()

None _replace_by ( self,
'cinsn_t' r )
protected

◆ _set_casm()

None _set_casm ( self,
'casm_t' _v )
protected

◆ _set_cblock()

None _set_cblock ( self,
'cblock_t' _v )
protected

◆ _set_cdo()

None _set_cdo ( self,
'cdo_t' _v )
protected

◆ _set_cexpr()

None _set_cexpr ( self,
'cexpr_t' _v )
protected

◆ _set_cfor()

None _set_cfor ( self,
'cfor_t' _v )
protected

◆ _set_cgoto()

None _set_cgoto ( self,
'cgoto_t' _v )
protected

◆ _set_cif()

None _set_cif ( self,
'cif_t' _v )
protected

◆ _set_creturn()

None _set_creturn ( self,
'creturn_t' _v )
protected

◆ _set_cswitch()

None _set_cswitch ( self,
'cswitch_t' _v )
protected

◆ _set_cwhile()

None _set_cwhile ( self,
'cwhile_t' _v )
protected

◆ assign()

'cinsn_t &' assign ( self,
'cinsn_t' r )

◆ cleanup()

None cleanup ( self)
Cleanup the statement. This function properly deletes all children and sets the item type to cit_empty. 

◆ collect_free_breaks()

bool collect_free_breaks ( self,
'cinsnptrvec_t' breaks )
Collect free `break` statements. 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. 

@param breaks: 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,
'cinsnptrvec_t' continues )
Collect free `continue` statements. 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. 

@param continues: 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,
'cinsn_t' r )

Reimplemented in ccase_t.

◆ contains_free_break()

bool contains_free_break ( self)
Check if the statement has free `break` statements.

◆ contains_free_continue()

bool contains_free_continue ( self)
Check if the statement has free `continue` statements.

◆ contains_insn()

bool contains_insn ( self,
'ctype_t' type,
int times = 1 )
Check if the statement contains a statement of the specified type. 

@param type: statement opcode to look for
@param times: 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,
'cexpr_t' cnd )
Create a new if-statement. The current statement must be a block. The new statement will be appended to it. 

@param cnd: if condition. It will be deleted after being copied.

◆ dstr()

str dstr ( self)

◆ insn_is_epilog()

bool insn_is_epilog ( 'cinsn_t' insn)
static

◆ is_epilog()

is_epilog ( self)

◆ is_ordinary_flow()

bool is_ordinary_flow ( self)
Check if the statement passes execution to the next statement. 

@returns false if the statement breaks the control flow (like goto, return, etc)

◆ new_insn()

'cinsn_t &' new_insn ( self,
ida_idaapi.ea_t insn_ea )
Create a new statement. The current statement must be a block. The new statement will be appended to it. 

@param insn_ea: statement address

◆ print1()

None print1 ( self,
'cfunc_t' func )
Print the statement into one line. Currently this function is not available. 

@param func: parent function. This argument is used to find out the referenced variable names.

Reimplemented from citem_t.

◆ swap()

None swap ( self,
'cinsn_t' r )
Swap two citem_t.

Reimplemented from citem_t.

◆ zero()

None zero ( self)
Overwrite with zeroes without cleaning memory or deleting children.

Member Data Documentation

◆ cthrow

str cthrow
static
Initial value:
= property(_ida_hexrays.cinsn_t_cthrow_get,
_ida_hexrays.cinsn_t_cthrow_set)

◆ ctry

str ctry
static
Initial value:
= property(_ida_hexrays.cinsn_t_ctry_get, _ida_hexrays
.cinsn_t_ctry_set)

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
static
Initial value:
= property(lambda x: x.this.own(), lambda x, v: x.this.own(v),
doc='The membership flag')

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