'Search for JMP/CALL instructions in memory
Usage:
MYNAME (search all JMP/CALL in current binary)
MYNAME reg [mapname]
MYNAME reg start end'

def jmpcall(self, *arg):

    (reg, start, end) = normalize_argv(arg, 3)
    result = []
    if (not self._is_running()):
        return
    mapname = None
    if (start is None):
        mapname = 'binary'
    elif (end is None):
        mapname = start
    if mapname:
        maps = peda.get_vmmap(mapname)
        for (start, end, _, _) in maps:
            if (not peda.is_executable(start, maps)):
                continue
            result += peda.search_jmpcall(start, end, reg)
    else:
        result = peda.search_jmpcall(start, end, reg)
    if (not result):
        msg('Not    found')
    else:
        text = ''
        for (a, v) in result:
            text += ('0x%x    :    %s\n' % (a, v))
        pager(text)
    return
