本文整理汇总了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 ()