'Returns a copy of the state.'

def copy(self):

    if (self._global_condition is not None):
        raise SimStateError('global    condition    was    not    cleared    before    state.copy().')
    c_plugins = self._copy_plugins()
    state = SimState(project=self.project, arch=self.arch, plugins=c_plugins, options=self.options, mode=self.mode, os_name=self.os_name)
    state.uninitialized_access_handler = self.uninitialized_access_handler
    state._special_memory_filler = self._special_memory_filler
    state.ip_constraints = self.ip_constraints
    return state
