本文整理匯總了Python中idaapi.o_void方法的典型用法代碼示例。如果您正苦於以下問題:Python idaapi.o_void方法的具體用法?Python idaapi.o_void怎麽用?Python idaapi.o_void使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類idaapi
的用法示例。
在下文中一共展示了idaapi.o_void方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _make_operands
# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import o_void [as 別名]
def _make_operands(self):
operands = []
for index, opnd in enumerate(self._insn.Operands):
if opnd.type == idaapi.o_void:
break
operands.append(Operand(opnd,
self._ea,
insn=self._insn,
write=self._is_operand_write_to(index),
read=self._is_operand_read_from(index)))
return operands
示例2: _make_operands
# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import o_void [as 別名]
def _make_operands(self):
operands = []
for index, opnd in enumerate(self._insn.ops):
if opnd.type == idaapi.o_void:
break
operands.append(Operand(opnd,
self._ea,
insn=self._insn,
write=self._is_operand_write_to(index),
read=self._is_operand_read_from(index)))
return operands
示例3: _make_operands
# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import o_void [as 別名]
def _make_operands(self):
operands = []
for index, operand in enumerate(self._insn.ops):
if operand.type == idaapi.o_void:
break # No more operands.
operands.append(Operand(operand,
self._ea,
insn=self._insn,
write=self.is_operand_written_to(index),
read=self.is_operand_read_from(index)))
return operands
示例4: operands
# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import o_void [as 別名]
def operands(ea):
'''Returns all of the ``idaapi.op_t`` instances for the instruction at the address `ea`.'''
insn = at(ea)
# if we're in compatibility mode, then old-fashioned IDA requires us to copy
# our operands into our new types.
if hasattr(idaapi, 'cmd'):
# take operands until we encounter an idaapi.o_void
iterable = itertools.takewhile(utils.fcompose(operator.attrgetter('type'), functools.partial(operator.ne, idaapi.o_void)), insn.Operands)
# if we're using IDA < 7.0, then make copies of each instruction and return it
if idaapi.__version__ < 7.0:
return tuple(op.copy() for op in iterable)
# otherwise, we need to make an instance of it and then assign to make a copy
iterable = ((idaapi.op_t(), op) for op in iterable)
return tuple([n.assign(op), n][1] for n, op in iterable)
# apparently idaapi is not increasing a reference count for our operands, so we
# need to make a copy of them quickly before we access them.
operands = [idaapi.op_t() for index in six.moves.range(idaapi.UA_MAXOP)]
[ op.assign(insn.ops[index]) for index, op in enumerate(operands)]
# now we can just fetch them until idaapi.o_void
iterable = itertools.takewhile(utils.fcompose(operator.attrgetter('type'), functools.partial(operator.ne, idaapi.o_void)), operands)
# and return it as a tuple
return tuple(iterable)
示例5: op_size
# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import o_void [as 別名]
def op_size(ea, opnum):
'''Returns the size for the operand `opnum` belonging to the instruction at the address `ea`.'''
get_dtype_attribute = operator.attrgetter('dtyp' if idaapi.__version__ < 7.0 else 'dtype')
get_dtype_size = idaapi.get_dtyp_size if idaapi.__version__ < 7.0 else idaapi.get_dtype_size
res = operand(ea, opnum)
return 0 if res.type == idaapi.o_void else get_dtype_size(get_dtype_attribute(res))
示例6: void
# 需要導入模塊: import idaapi [as 別名]
# 或者: from idaapi import o_void [as 別名]
def void(ea, op):
'''Operand type decoder for ``idaapi.o_void``.'''
return ()