X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c4400ef05aabcb5b201814e60e44c3c4697af70d..1679193978528bbb628e0f3a7853cddf4f3cfe0d:/src/mc/Process.hpp diff --git a/src/mc/Process.hpp b/src/mc/Process.hpp index 8b96b0cbbc..d5ff78233f 100644 --- a/src/mc/Process.hpp +++ b/src/mc/Process.hpp @@ -45,11 +45,9 @@ namespace mc { class SimixProcessInformation { public: /** MCed address of the process */ - RemotePtr address = nullptr; - union { - /** (Flat) Copy of the process data structure */ - struct s_smx_process copy; - }; + RemotePtr address = nullptr; + Remote copy; + /** Hostname (owned by `mc_modelchecker->hostnames`) */ const char* hostname = nullptr; std::string name; @@ -120,7 +118,11 @@ public: read_variable(name, &res, sizeof(T)); return res; } - std::string read_string(RemotePtr address) const; + std::string read_string(RemotePtr address) const; + std::string read_string(RemotePtr address, std::size_t len) const + { + return AddressSpace::read_string(address, len); + } // Write memory: void write_bytes(const void* buffer, size_t len, RemotePtr address); @@ -217,7 +219,7 @@ public: /** Get a local description of a remote SIMIX process */ simgrid::mc::SimixProcessInformation* resolveProcessInfo( - simgrid::mc::RemotePtr process) + simgrid::mc::RemotePtr process) { xbt_assert(mc_model_checker != nullptr); if (!process) @@ -233,12 +235,12 @@ public: } /** Get a local copy of the SIMIX process structure */ - smx_process_t resolveProcess(simgrid::mc::RemotePtr process) + simgrid::simix::Process* resolveProcess(simgrid::mc::RemotePtr process) { simgrid::mc::SimixProcessInformation* process_info = this->resolveProcessInfo(process); if (process_info) - return &process_info->copy; + return process_info->copy.getBuffer(); else return nullptr; }