From: Gabriel Corona Date: Mon, 12 Oct 2015 21:02:52 +0000 (+0200) Subject: [mc] Fix Snapshot::read_bytes X-Git-Tag: v3_13~1644^2~61 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/50d1b7d92ae3aa2679bc86780cf3c0ea12455365?hp=1b8f849b45ded567cf10c7da022447a775270a0e;ds=sidebyside [mc] Fix Snapshot::read_bytes Was calling itself instead of delegating to the process. --- diff --git a/src/mc/AddressSpace.hpp b/src/mc/AddressSpace.hpp index e23e9ac2e3..6aed5ea8a2 100644 --- a/src/mc/AddressSpace.hpp +++ b/src/mc/AddressSpace.hpp @@ -140,7 +140,7 @@ public: AddressSpace(Process* process) : process_(process) {} virtual ~AddressSpace(); - simgrid::mc::Process* process() { return process_; } + simgrid::mc::Process* process() const { return process_; } virtual const void* read_bytes(void* buffer, std::size_t size, remote_ptr address, int process_index = ProcessIndexAny, ReadMode mode = Normal) const = 0; diff --git a/src/mc/mc_snapshot.cpp b/src/mc/mc_snapshot.cpp index 324c6eae15..5892e0d240 100644 --- a/src/mc/mc_snapshot.cpp +++ b/src/mc/mc_snapshot.cpp @@ -184,7 +184,8 @@ const void* Snapshot::read_bytes(void* buffer, std::size_t size, } } else - return this->read_bytes(buffer, size, address, process_index, mode); + return this->process()->read_bytes( + buffer, size, address, process_index, mode); } }