X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c6bbeb1829c36ff45b43ab25f9d8d3f53f554d98..ac9197eec3a25524040ce2f55021ba590788c3a3:/src/mc/sosp/Snapshot.cpp diff --git a/src/mc/sosp/Snapshot.cpp b/src/mc/sosp/Snapshot.cpp index de20ddddde..db553bc47e 100644 --- a/src/mc/sosp/Snapshot.cpp +++ b/src/mc/sosp/Snapshot.cpp @@ -23,7 +23,7 @@ void Snapshot::snapshot_regions(RemoteClient* process) for (auto const& object_info : process->object_infos) add_region(RegionType::Data, object_info.get(), object_info->start_rw, object_info->end_rw - object_info->start_rw); - xbt_mheap_t heap = process->get_heap(); + const s_xbt_mheap_t* heap = process->get_heap(); void* start_heap = heap->base; void* end_heap = heap->breakval; @@ -40,7 +40,7 @@ void Snapshot::snapshot_regions(RemoteClient* process) * @param ip Instruction pointer * @return true if the variable is valid * */ -static bool valid_variable(simgrid::mc::Variable* var, simgrid::mc::Frame* scope, const void* ip) +static bool valid_variable(const simgrid::mc::Variable* var, simgrid::mc::Frame* scope, const void* ip) { // The variable is not yet valid: if (scope->range.begin() + var->start_scope > (std::uint64_t)ip) @@ -55,7 +55,7 @@ static void fill_local_variables_values(mc_stack_frame_t stack_frame, Frame* sco if (not scope || not scope->range.contain(stack_frame->ip)) return; - for (Variable& current_variable : scope->variables) { + for (const Variable& current_variable : scope->variables) { if (not valid_variable(¤t_variable, scope, (void*)stack_frame->ip)) continue; @@ -97,7 +97,7 @@ static std::vector get_local_variables_values(std::vector unwind_stack_frames(UnwindContext* stack_context) { - RemoteClient* process = &mc_model_checker->process(); + const RemoteClient* process = &mc_model_checker->process(); std::vector result; unw_cursor_t c = stack_context->cursor(); @@ -191,7 +191,7 @@ static void snapshot_handle_ignore(Snapshot* snapshot) snapshot->process()->clear_bytes(remote(region.addr), region.size); } -static void snapshot_ignore_restore(simgrid::mc::Snapshot* snapshot) +static void snapshot_ignore_restore(const simgrid::mc::Snapshot* snapshot) { for (auto const& ignored_data : snapshot->ignored_data_) snapshot->process()->write_bytes(ignored_data.data.data(), ignored_data.data.size(), remote(ignored_data.start)); @@ -233,7 +233,7 @@ void Snapshot::add_region(RegionType type, ObjectInformation* object_info, void* void* Snapshot::read_bytes(void* buffer, std::size_t size, RemotePtr address, ReadOptions options) const { - Region* region = this->get_region((void*)address.address()); + const Region* region = this->get_region((void*)address.address()); if (region) { void* res = region->read(buffer, (void*)address.address(), size); if (buffer == res || options & ReadOptions::lazy())