#include "src/mc/mc_private.h"
#include <mc/mc.h>
-#include "src/mc/mc_snapshot.h"
+#include "src/mc/mc_hash.hpp"
#include "src/mc/mc_mmu.h"
-#include "src/mc/mc_unw.h"
-#include "src/mc/mc_protocol.h"
#include "src/mc/mc_smx.h"
-#include "mc_hash.hpp"
+#include "src/mc/mc_snapshot.h"
+#include "src/mc/mc_unw.h"
+#include "src/mc/remote/mc_protocol.h"
#include "src/mc/RegionSnapshot.hpp"
#include "src/mc/ObjectInformation.hpp"
/** @brief Restore a region from a snapshot
*
- * @param reg Target region
+ * @param region Target region
*/
static void restore(mc_mem_region_t region)
{
* A variable may be defined only from a given value of IP.
*
* \param var Variable description
- * \param frame Scope description
+ * \param scope Scope description
* \param ip Instruction pointer
* \return true if the variable is valid
* */
{
simgrid::mc::Process* process = &mc_model_checker->process();
- if (!scope->range.contain(stack_frame->ip))
+ if (!scope || !scope->range.contain(stack_frame->ip))
return;
for(simgrid::mc::Variable& current_variable :
// We don't handle them.
// It does not mean we should silently ignore them however.
- if (strncmp(link, "pipe:", 5) == 0 || strncmp(link, "socket:", 7) == 0)
+ if (strncmp(link, "pipe:", std::strlen("pipe:")) == 0 || strncmp(link, "socket:", std::strlen("socket:")) == 0)
continue;
// If dot_output enabled, do not handle the corresponding file
}
// This is probably a shared memory used by lttng-ust:
- if(strncmp("/dev/shm/ust-shm-tmp-", link, 21)==0)
+ if(strncmp("/dev/shm/ust-shm-tmp-", link, std::strlen("/dev/shm/ust-shm-tmp-"))==0)
continue;
// Add an entry for this FD in the snapshot:
simgrid::mc::Process* mc_process = &mc_model_checker->process();
- std::shared_ptr<simgrid::mc::Snapshot> snapshot =
- std::make_shared<simgrid::mc::Snapshot>(mc_process);
-
- snapshot->num_state = num_state;
+ std::shared_ptr<simgrid::mc::Snapshot> snapshot = std::make_shared<simgrid::mc::Snapshot>(mc_process, num_state);
- for (auto& p : mc_model_checker->process().simix_processes())
- snapshot->enabled_processes.insert(p.copy.pid);
+ for (auto& p : mc_model_checker->process().actors())
+ snapshot->enabled_processes.insert(p.copy.getBuffer()->pid);
snapshot_handle_ignore(snapshot.get());
snapshot->to_ignore = mc_model_checker->process().ignored_heap();
- if (_sg_mc_visited > 0 || strcmp(_sg_mc_property_file, "")) {
+ if (_sg_mc_max_visited_states > 0 || strcmp(_sg_mc_property_file, "")) {
snapshot->stacks = take_snapshot_stacks(snapshot.get());
if (_sg_mc_hash)
snapshot->hash = simgrid::mc::hash(*snapshot);