当前位置: 首页>>代码示例>>Python>>正文


Python idaapi.o_void方法代码示例

本文整理汇总了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 
开发者ID:lifting-bits,项目名称:mcsema,代码行数:14,代码来源:collect_variable.py

示例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 
开发者ID:lifting-bits,项目名称:mcsema,代码行数:14,代码来源:collect_variable.py

示例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 
开发者ID:tmr232,项目名称:Sark,代码行数:13,代码来源:instruction.py

示例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) 
开发者ID:arizvisa,项目名称:ida-minsc,代码行数:31,代码来源:instruction.py

示例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)) 
开发者ID:arizvisa,项目名称:ida-minsc,代码行数:9,代码来源:instruction.py

示例6: void

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import o_void [as 别名]
def void(ea, op):
        '''Operand type decoder for ``idaapi.o_void``.'''
        return () 
开发者ID:arizvisa,项目名称:ida-minsc,代码行数:5,代码来源:instruction.py


注:本文中的idaapi.o_void方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。