'Search for all references to a value in memory ranges
Args:
- search: string or python regex pattern (String)
- mapname: name of target virtual memory range (String)
Returns:
- list of found result: (address(int), hex encoded value(String))'

@memoized
def search_reference(self, search, mapname=None):

    maps = self.get_vmmap()
    ranges = self.get_vmmap(mapname)
    result = []
    search_result = []
    for (start, end, perm, name) in maps:
        if ('r' in perm):
            search_result += self.searchmem(start, end, search)
    for (start, end, perm, name) in ranges:
        for (a, v) in search_result:
            result += self.searchmem(start, end, to_address(a))
    return result
