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

Proxy of C++ insn_t class.

Inheritance diagram for insn_t:

Public Member Functions

 __init__ (self, *args)
 init(self) -> insn_t
 
"bool" is_macro (self, *args)
 is_macro(self) -> bool Is a macro instruction?
 
"bool" is_64bit (self, *args)
 is_64bit(self) -> bool Belongs to a 64bit segment?
 
"uint8" get_next_byte (self, *args)
 get_next_byte(self) -> uint8
 
"uint16" get_next_word (self, *args)
 get_next_word(self) -> uint16
 
"uint32" get_next_dword (self, *args)
 get_next_dword(self) -> uint32
 
"uint64" get_next_qword (self, *args)
 get_next_qword(self) -> uint64
 
"bool" create_op_data (self, *args)
 create_op_data(self, ea_, opoff, dtype) -> bool Convenient alias.
 
"bool" create_stkvar (self, *args)
 create_stkvar(self, x, v, flags_) -> bool Create or modify a stack variable in the function frame.
 
"void" add_cref (self, *args)
 add_cref(self, to, opoff, type) Add a code cross-reference from the instruction.
 
"void" add_dref (self, *args)
 add_dref(self, to, opoff, type) Add a data cross-reference from the instruction.
 
"ea_t" add_off_drefs (self, *args)
 add_off_drefs(self, x, type, outf) -> ea_t Add xrefs for an operand of the instruction.
 
"wrapped_array_t< op_t,8 >" __get_ops__ (self, *args)
 get_ops(self) -> operands_array
 
"op_t *" __get_operand__ (self, *args)
 get_operand(self, n) -> op_t
 
"uint32" __get_auxpref__ (self, *args)
 get_auxpref(self) -> uint32
 
"void" __set_auxpref__ (self, *args)
 set_auxpref(self, v)
 
"void" assign (self, *args)
 assign(self, other)
 
"bool" is_canon_insn (self, *args)
 is_canon_insn(self, ph) -> bool see processor_t::is_canon_insn()
 
"uint32" get_canon_feature (self, *args)
 get_canon_feature(self, ph) -> uint32 see instruc_t::feature
 
"char const *" get_canon_mnem (self, *args)
 get_canon_mnem(self, ph) -> char const see instruc_t::name
 
 __iter__ (self)
 
 __getitem__ (self, idx)
 Operands can be accessed directly as indexes.
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
 cs = property(_ida_ua.insn_t_cs_get, _ida_ua.insn_t_cs_set, doc=)
 
 ip = property(_ida_ua.insn_t_ip_get, _ida_ua.insn_t_ip_set, doc=)
 
 ea = property(_ida_ua.insn_t_ea_get, _ida_ua.insn_t_ea_set, doc=)
 
 itype = property(_ida_ua.insn_t_itype_get, _ida_ua.insn_t_itype_set, doc=)
 
 size = property(_ida_ua.insn_t_size_get, _ida_ua.insn_t_size_set, doc=)
 
 auxpref = property(_ida_ua.insn_t_auxpref_get, _ida_ua.insn_t_auxpref_set, doc=)
 
 auxpref_u16 = property(_ida_ua.insn_t_auxpref_u16_get, _ida_ua.insn_t_auxpref_u16_set, doc=)
 
 auxpref_u8 = property(_ida_ua.insn_t_auxpref_u8_get, _ida_ua.insn_t_auxpref_u8_set, doc=)
 
 segpref = property(_ida_ua.insn_t_segpref_get, _ida_ua.insn_t_segpref_set, doc=)
 
 insnpref = property(_ida_ua.insn_t_insnpref_get, _ida_ua.insn_t_insnpref_set, doc=)
 
 flags = property(_ida_ua.insn_t_flags_get, _ida_ua.insn_t_flags_set, doc=)
 
 ops = property(_ida_ua.insn_t_ops_get, _ida_ua.insn_t_ops_set, doc=)
 
 Op1 = property(lambda self: self.__get_operand__(0))
 
 Op2 = property(lambda self: self.__get_operand__(1))
 
 Op3 = property(lambda self: self.__get_operand__(2))
 
 Op4 = property(lambda self: self.__get_operand__(3))
 
 Op5 = property(lambda self: self.__get_operand__(4))
 
 Op6 = property(lambda self: self.__get_operand__(5))
 
 Op7 = property(lambda self: self.__get_operand__(6))
 
 Op8 = property(lambda self: self.__get_operand__(7))
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args )

Member Function Documentation

◆ __get_auxpref__()

"uint32" __get_auxpref__ ( self,
* args )

◆ __get_operand__()

"op_t *" __get_operand__ ( self,
* args )
Parameters
nint

◆ __get_ops__()

"wrapped_array_t< op_t,8 >" __get_ops__ ( self,
* args )

◆ __getitem__()

__getitem__ ( self,
idx )
Returns
: op_t: Returns an operand of type op_t

◆ __iter__()

__iter__ ( self)

◆ __set_auxpref__()

"void" __set_auxpref__ ( self,
* args )
Parameters
vuint32

◆ add_cref()

"void" add_cref ( self,
* args )
Parameters
to(C++: ea_t) target linear address
opoff(C++: int) offset of the operand from the start of instruction. if the offset is unknown, then 0.
type(C++: cref_t) type of xref

◆ add_dref()

"void" add_dref ( self,
* args )

See add_off_drefs() - usually it can be used in most cases.

Parameters
to(C++: ea_t) target linear address
opoff(C++: int) offset of the operand from the start of instruction if the offset is unknown, then 0
type(C++: dref_t) type of xref

◆ add_off_drefs()

"ea_t" add_off_drefs ( self,
* args )

This function creates all cross references for 'enum', 'offset' and 'structure offset' operands. Use add_off_drefs() in the presence of negative offsets.

Parameters
x(C++: const op_t &) reference to operand
type(C++: dref_t) type of xref
outf(C++: int) out_value() flags. These flags should match the flags used to output the operand
Returns
: if is_off(): the reference target address (the same as calc_reference_data). if is_stroff(): BADADDR because for stroffs the target address is unknown else: BADADDR because enums do not represent addresses

◆ assign()

"void" assign ( self,
* args )
Parameters
otheran ida_ua.insn_t, or an address (C++: const insn_t &)

◆ create_op_data()

"bool" create_op_data ( self,
* args )
Parameters
ea_(C++: ea_t)
opoffint
dtypeop_dtype_t

create_op_data(self, ea_, op) -> bool

Parameters
ea_ea_t
opop_t const &

◆ create_stkvar()

"bool" create_stkvar ( self,
* args )

The emulator could use this function to create stack variables in the function frame before converting the operand to a stack variable. Please check with may_create_stkvars() before calling this function.

Parameters
x(C++: const op_t &) operand (used to determine the addressing type)
v(C++: adiff_t) a displacement in the operand
flags_(C++: int) Stack variable flags
Return values
1ok, a stack variable exists now
0no, couldn't create stack variable

◆ get_canon_feature()

"uint32" get_canon_feature ( self,
* args )
Parameters
ph(C++: const processor_t &) processor_t const &

get_canon_feature(self) -> uint32

◆ get_canon_mnem()

"char const *" get_canon_mnem ( self,
* args )
Parameters
ph(C++: const processor_t &) processor_t const &

get_canon_mnem(self) -> char const *

◆ get_next_byte()

"uint8" get_next_byte ( self,
* args )

◆ get_next_dword()

"uint32" get_next_dword ( self,
* args )

◆ get_next_qword()

"uint64" get_next_qword ( self,
* args )

◆ get_next_word()

"uint16" get_next_word ( self,
* args )

◆ is_64bit()

"bool" is_64bit ( self,
* args )

◆ is_canon_insn()

"bool" is_canon_insn ( self,
* args )
Parameters
ph(C++: const processor_t &) processor_t const &

is_canon_insn(self) -> bool

◆ is_macro()

"bool" is_macro ( self,
* args )

Property Documentation

◆ auxpref

auxpref = property(_ida_ua.insn_t_auxpref_get, _ida_ua.insn_t_auxpref_set, doc=)
static

◆ auxpref_u16

auxpref_u16 = property(_ida_ua.insn_t_auxpref_u16_get, _ida_ua.insn_t_auxpref_u16_set, doc=)
static

◆ auxpref_u8

auxpref_u8 = property(_ida_ua.insn_t_auxpref_u8_get, _ida_ua.insn_t_auxpref_u8_set, doc=)
static

◆ cs

cs = property(_ida_ua.insn_t_cs_get, _ida_ua.insn_t_cs_set, doc=)
static

◆ ea

ea = property(_ida_ua.insn_t_ea_get, _ida_ua.insn_t_ea_set, doc=)
static

◆ flags

flags = property(_ida_ua.insn_t_flags_get, _ida_ua.insn_t_flags_set, doc=)
static

◆ insnpref

insnpref = property(_ida_ua.insn_t_insnpref_get, _ida_ua.insn_t_insnpref_set, doc=)
static

◆ ip

ip = property(_ida_ua.insn_t_ip_get, _ida_ua.insn_t_ip_set, doc=)
static

◆ itype

itype = property(_ida_ua.insn_t_itype_get, _ida_ua.insn_t_itype_set, doc=)
static

◆ Op1

Op1 = property(lambda self: self.__get_operand__(0))
static

◆ Op2

Op2 = property(lambda self: self.__get_operand__(1))
static

◆ Op3

Op3 = property(lambda self: self.__get_operand__(2))
static

◆ Op4

Op4 = property(lambda self: self.__get_operand__(3))
static

◆ Op5

Op5 = property(lambda self: self.__get_operand__(4))
static

◆ Op6

Op6 = property(lambda self: self.__get_operand__(5))
static

◆ Op7

Op7 = property(lambda self: self.__get_operand__(6))
static

◆ Op8

Op8 = property(lambda self: self.__get_operand__(7))
static

◆ ops

ops = property(_ida_ua.insn_t_ops_get, _ida_ua.insn_t_ops_set, doc=)
static

◆ segpref

segpref = property(_ida_ua.insn_t_segpref_get, _ida_ua.insn_t_segpref_set, doc=)
static

◆ size

size = property(_ida_ua.insn_t_size_get, _ida_ua.insn_t_size_set, doc=)
static

◆ 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: