(self, addr: int, size: Optional[int]=None, byte_string: Optional[bytes]=None)
return block
Getting a block out of the current function.

        :param int addr:    The address of the block.
        :param int size:    The size of the block. This is optional. If not provided, angr will load
        :param byte_string:
        :return:
Getting a block out of the current function.
Getting a block out of the current function .
def get_block(self, addr: int, size: Optional[int]=None, byte_string: Optional[bytes]=None):
        """
        Getting a block out of the current function.

        :param int addr:    The address of the block.
        :param int size:    The size of the block. This is optional. If not provided, angr will load
        :param byte_string:
        :return:
        """
        if addr in self._block_cache:
            b = self._block_cache[addr]
            if size is None or b.size == size:
                return b
            else:
                # size seems to be updated. remove this cached entry from the block cache
                del self._block_cache[addr]

        if size is None and addr in self.block_addrs:
            # we know the size
            size = self._block_sizes[addr]

        block = self._project.factory.block(addr, size=size, byte_string=byte_string)
        if size is None:
            # update block_size dict
            self._block_sizes[addr] = block.size
        self._block_cache[addr] = block
        return block
def get_block ( self , addr : int , size : Optional [ int ] = None , byte_string : Optional [ bytes ] = None ) : if addr in self . _block_cache : b = self . _block_cache [ addr ] if size is None or b . size == size : return b else : # size seems to be updated. remove this cached entry from the block cache del self . _block_cache [ addr ] if size is None and addr in self . block_addrs : # we know the size size = self . _block_sizes [ addr ] block = self . _project . factory . block ( addr , size = size , byte_string = byte_string ) if size is None : # update block_size dict self . _block_sizes [ addr ] = block . size self . _block_cache [ addr ] = block return block