(self, varnode: Varnode)
Get a value for a given varnode.

        This method loads from the appropriate const, register, unique, or RAM
        space, depending on the space indicated by the varnode.

        :param varnode: Varnode to load from.
        :return:        Value loaded.
Get a value for a given varnode.
Get a value for a given varnode .
def _get_value(self, varnode: Varnode) -> BV:
        """
        Get a value for a given varnode.

        This method loads from the appropriate const, register, unique, or RAM
        space, depending on the space indicated by the varnode.

        :param varnode: Varnode to load from.
        :return:        Value loaded.
        """
        space_name = varnode.space.name
        size = varnode.size
        l.debug("Loading %s - %x x %d", space_name, varnode.offset, size)
        if space_name == "const":
            return claripy.BVV(varnode.offset, size*8)
        elif space_name == "register":
            return self.state.registers.load(self._map_register_name(varnode), size=size)
        elif space_name == "unique":
            # FIXME: Support loading data of different sizes. For now, assume
            # size of values read are same as size written.
            assert self._pcode_tmps[varnode.offset].size() == size*8
            return self._pcode_tmps[varnode.offset]
        elif space_name in ("ram", "mem"):
            val = self.state.memory.load(varnode.offset, endness=self.project.arch.memory_endness, size=size)
            l.debug("Loaded %s from offset %s", val, varnode.offset)
            return val
        else:
            raise NotImplementedError()
def _get_value ( self , varnode : Varnode ) -> BV : space_name = varnode . space . name size = varnode . size l . debug ( "Loading %s - %x x %d" , space_name , varnode . offset , size ) if space_name == "const" : return claripy . BVV ( varnode . offset , size * 8 ) elif space_name == "register" : return self . state . registers . load ( self . _map_register_name ( varnode ) , size = size ) elif space_name == "unique" : # FIXME: Support loading data of different sizes. For now, assume # size of values read are same as size written. assert self . _pcode_tmps [ varnode . offset ] . size ( ) == size * 8 return self . _pcode_tmps [ varnode . offset ] elif space_name in ( "ram" , "mem" ) : val = self . state . memory . load ( varnode . offset , endness = self . project . arch . memory_endness , size = size ) l . debug ( "Loaded %s from offset %s" , val , varnode . offset ) return val else : raise NotImplementedError ( )