(self, function, frame_pointer)
return references
scan the given instruction for LOAD or STOREs to the function frame.

        args:
          function (Dict[str, any]): function instance.
          frame_pointer (int): local variable index of the frame pointer.

        returns:
          Dict[int, Set[Dict[str, any]]]: mapping from frame_offset to set of frame references with fields:
            - frame_offset (int): offset into frame of access.
            - element_size (str): size of element being accessed.
            - access_type (str): type of reference, either "load" or "store".
            - offset (int): offset into the bitcode of the reference instruction.
            - parameter (int, optional): the parameter index being loaded.
scan the given instruction for LOAD or STOREs to the function frame.
scan the given instruction for LOAD or STOREs to the function frame .
def find_function_frame_references(self, function, frame_pointer):
        '''
        scan the given instruction for LOAD or STOREs to the function frame.

        args:
          function (Dict[str, any]): function instance.
          frame_pointer (int): local variable index of the frame pointer.

        returns:
          Dict[int, Set[Dict[str, any]]]: mapping from frame_offset to set of frame references with fields:
            - frame_offset (int): offset into frame of access.
            - element_size (str): size of element being accessed.
            - access_type (str): type of reference, either "load" or "store".
            - offset (int): offset into the bitcode of the reference instruction.
            - parameter (int, optional): the parameter index being loaded.
        '''
        buf = ida_bytes.get_many_bytes(function['offset'], function['size'])
        bc = list(wasm.decode.decode_bytecode(buf))

        offset = function['offset']
        SLICE_SIZE = 3
        references = collections.defaultdict(lambda: list())
        for i in range(len(bc) - SLICE_SIZE - 1):
            insns = bc[i:i+SLICE_SIZE]

            try:
                load = self.get_frame_load(function, frame_pointer, insns)
            except ValueError:
                pass
            else:
                load['offset'] += offset
                logger.debug('found function frame load at 0x%X', load['offset'])
                references[load['frame_offset']].append(load)

            try:
                store = self.get_frame_store(function, frame_pointer, insns)
            except ValueError:
                pass
            else:
                store['offset'] += offset
                logger.debug('found function frame store at 0x%X', store['offset'])
                references[store['frame_offset']].append(store)

            offset += bc[i].len

        return references
def find_function_frame_references ( self , function , frame_pointer ) : buf = ida_bytes . get_many_bytes ( function [ 'offset' ] , function [ 'size' ] ) bc = list ( wasm . decode . decode_bytecode ( buf ) ) offset = function [ 'offset' ] SLICE_SIZE = 3 references = collections . defaultdict ( lambda : list ( ) ) for i in range ( len ( bc ) - SLICE_SIZE - 1 ) : insns = bc [ i : i + SLICE_SIZE ] try : load = self . get_frame_load ( function , frame_pointer , insns ) except ValueError : pass else : load [ 'offset' ] += offset logger . debug ( 'found function frame load at 0x%X' , load [ 'offset' ] ) references [ load [ 'frame_offset' ] ] . append ( load ) try : store = self . get_frame_store ( function , frame_pointer , insns ) except ValueError : pass else : store [ 'offset' ] += offset logger . debug ( 'found function frame store at 0x%X' , store [ 'offset' ] ) references [ store [ 'frame_offset' ] ] . append ( store ) offset += bc [ i ] . len return references