if (_sg_mc_max_visited_states > 0 || not _sg_mc_property_file.get().empty()) {
snapshot_stacks(process);
- if (_sg_mc_hash)
- hash_ = simgrid::mc::hash(*this);
+ hash_ = simgrid::mc::hash(*this);
}
snapshot_ignore_restore(this);
snapshot_regions_.push_back(std::unique_ptr<simgrid::mc::Region>(std::move(region)));
}
-const void* Snapshot::read_bytes(void* buffer, std::size_t size, RemotePtr<void> address, ReadOptions options) const
+void* Snapshot::read_bytes(void* buffer, std::size_t size, RemotePtr<void> address, ReadOptions options) const
{
Region* region = this->get_region((void*)address.address());
if (region) {
- const void* res = region->read(buffer, (void*)address.address(), size);
+ void* res = region->read(buffer, (void*)address.address(), size);
if (buffer == res || options & ReadOptions::lazy())
return res;
else {
} else
return this->process()->read_bytes(buffer, size, address, options);
}
-/** @brief Find the snapshoted region from a pointer
+/** @brief Find the snapshotted region from a pointer
*
* @param addr Pointer
* */
return nullptr;
}
-/** @brief Find the snapshoted region from a pointer, with a hinted_region */
+/** @brief Find the snapshotted region from a pointer, with a hinted_region */
Region* Snapshot::get_region(const void* addr, Region* hinted_region) const
{
if (hinted_region->contain(simgrid::mc::remote(addr)))
// Restore regions
for (std::unique_ptr<simgrid::mc::Region> const& region : snapshot_regions_) {
- if (region) // privatized variables are not snapshoted
+ if (region) // privatized variables are not snapshotted
region.get()->restore();
}