'Search for all references to a value in memory ranges
Usage:
MYNAME value mapname
MYNAME value (search in all memory ranges)'

def refsearch(self, *arg):

    (search, mapname) = normalize_argv(arg, 2)
    if (search is None):
        self._missing_argument()
    search = arg[0]
    if (mapname is None):
        mapname = 'all'
    msg(('Searching    for    reference    to:    %s    in:    %s    ranges' % (repr(search), mapname)))
    result = peda.search_reference(search, mapname)
    text = peda.format_search_result(result)
    pager(text)
    return
