(self, old: SimMemoryObject, new_content: claripy.Bits, memory=None)
return new
Replaces the memory object `old` with a new memory object containing `new_content`.

        :param old:         A SimMemoryObject (i.e., one from :func:`memory_objects_for_hash()` or :func:`
                            memory_objects_for_name()`).
        :param new_content: The content (claripy expression) for the new memory object.
        :returns: the new memory object
Replaces the memory object `old` with a new memory object containing `new_content`.
Replaces the memory object old with a new memory object containing new_content .
def _replace_memory_object(self, old: SimMemoryObject, new_content: claripy.Bits, memory=None):
        """
        Replaces the memory object `old` with a new memory object containing `new_content`.

        :param old:         A SimMemoryObject (i.e., one from :func:`memory_objects_for_hash()` or :func:`
                            memory_objects_for_name()`).
        :param new_content: The content (claripy expression) for the new memory object.
        :returns: the new memory object
        """

        if ((old.object.size() if not old.is_bytes else len(old.object) * self.state.arch.byte_width) !=
                new_content.size()):
            raise SimMemoryError("memory objects can only be replaced by the same length content")

        new = SimMemoryObject(new_content, old.base, old.endness, byte_width=old._byte_width)
        for k in list(self.symbolic_data):
            if self.symbolic_data[k] is old:
                self.symbolic_data[k] = new

        if isinstance(new.object, claripy.ast.BV):  # pylint:disable=isinstance-second-argument-not-valid-type
            for b in range(old.base, old.base+old.length):
                self._update_mappings(b, old.object, new.object, memory=memory)

        return new
def _replace_memory_object ( self , old : SimMemoryObject , new_content : claripy . Bits , memory = None ) : if ( ( old . object . size ( ) if not old . is_bytes else len ( old . object ) * self . state . arch . byte_width ) != new_content . size ( ) ) : raise SimMemoryError ( "memory objects can only be replaced by the same length content" ) new = SimMemoryObject ( new_content , old . base , old . endness , byte_width = old . _byte_width ) for k in list ( self . symbolic_data ) : if self . symbolic_data [ k ] is old : self . symbolic_data [ k ] = new if isinstance ( new . object , claripy . ast . BV ) : # pylint:disable=isinstance-second-argument-not-valid-type for b in range ( old . base , old . base + old . length ) : self . _update_mappings ( b , old . object , new . object , memory = memory ) return new