'Search for all call/data access references to a function/variable
Usage:
MYNAME pattern
MYNAME pattern file/mapname'

def xrefs(self, *arg):

    (search, filename) = normalize_argv(arg, 2)
    if (search is None):
        search = ''
    else:
        search = arg[0]
    if (filename is not None):
        vmap = peda.get_vmmap(filename)
        if vmap:
            filename = vmap[0][3]
    result = peda.xrefs(search, filename)
    if result:
        if (search != ''):
            msg(("All    references    to    '%s':" % search))
        else:
            msg('All    call    references')
        for (addr, code) in result:
            msg(('%s' % code))
    else:
        msg('Not    found')
    return
