Python源码示例:idaapi.jumpto()

示例1
def goto(shift=False):
    print("GhIDA:: [DEBUG] goto called")

    symbol = None
    ret = ida_kernwin.get_highlight(ida_kernwin.get_current_viewer())
    if ret and ret[1]:
        symbol = ret[0]

    if not symbol:
        return False

    address = gl.get_address_for_symbol(symbol)
    if not address:
        return False

    print("OnDblClick, shift=%d, selection:%s, address:%s" %
          (shift, symbol, address))

    # Update IDA DISASM view
    idaapi.jumpto(address)

    # Update IDA DECOMP view
    ea = gl.convert_address(address)
    print("GhIDA:: [DEBUG] update view to %s" % ea)
    DECOMP_VIEW.switch_to_address(ea)

    return True


# ------------------------------------------------------------
#   SIMPLECUSTVIEWER FOR THE DECOMPILED RESULT
# ------------------------------------------------------------

# Check this example: https://github.com/nologic/idaref/blob/master/idaref.py 
示例2
def jumpto_expr(expr):
    ea = idaapi.str2ea(expr)
    if ea == BADADDR:
        return False
    return idaapi.jumpto(ea)

# -------------------------------------------------------------------------- 
示例3
def on_double_click(self, value, attrs):
        idaapi.jumpto(value)
        return False 
示例4
def OnDblClick(self, node_id):
        # On double-click, jump to the clicked address.
        idaapi.jumpto(self[node_id])

        return True 
示例5
def navigate(self, address):
        return idaapi.jumpto(address) 
示例6
def show_trace_point(self, p):
        idaapi.jumpto(p.addr) 
示例7
def _dblclick(self, item):
        '''
        Handles double click event.
        '''
        try:
            idaapi.jumpto(int(item.text(1), 16))
        except:
            pass 
示例8
def table_ops_doubleclicked(self, index):
        row = index.row()
        print("row = {}".format(row))
        addr = int(self.table_ops_found.item(row, 0).text(), 16)
        print("addr = {}".format(addr))
        idaapi.jumpto(addr) 
示例9
def say_address(buddy):
    address = get_random_address()
    address_text = Span('0x{address:X}'.format(address=address), color='black', text_decoration='underline')
    buddy.interact(
        ask_go_cancel(random_address_saying().format(address_text)),
        go=lambda *_: (idaapi.jumpto(address), buddy.exit()),
        cancel=lambda *_: buddy.exit()) 
示例10
def jumpto_in_view(self, view, ea):
        idaapi.activate_widget(view, True)
        return idaapi.jumpto(ea)

# ----------------------------------------------------------------------- 
示例11
def OnDblClick(self, shift):
        symbol = self.get_current_word()
        if symbol is not None:
            ea = self.resolve_expr(symbol)
            if ea and idaapi.is_loaded(ea):
                idaapi.jumpto(ea)
                return True
        return False 
示例12
def OnDblClick(self, shift):
        symbol = self.get_current_word()
        if symbol is not None:
            if symbol.isupper() and symbol.replace("*","") in dbg.registers:
                self.modify_value()
                return True
            else:
                ea = self.resolve_expr(symbol)
                if ea and idaapi.is_loaded(ea):
                    idaapi.jumpto(ea)
                    return True
        return False