X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5196739a91ffe3433363024f8f0694c9a943da61..c01192e46cde5284797237ea9018333f4f97a742:/src/mc/remote/RemoteProcess.cpp diff --git a/src/mc/remote/RemoteProcess.cpp b/src/mc/remote/RemoteProcess.cpp index 491efb7985..eb8275f763 100644 --- a/src/mc/remote/RemoteProcess.cpp +++ b/src/mc/remote/RemoteProcess.cpp @@ -217,12 +217,13 @@ int open_vm(pid_t pid, int flags) RemoteProcess::RemoteProcess(pid_t pid) : AddressSpace(this), pid_(pid), running_(true) {} -void RemoteProcess::init(xbt_mheap_t mmalloc_default_mdp, void* maxpid, void* actors, void* dead_actors) +void RemoteProcess::init(xbt_mheap_t mmalloc_default_mdp, unsigned long* maxpid, xbt_dynar_t actors, + xbt_dynar_t dead_actors) { - this->heap_address = mmalloc_default_mdp; - this->maxpid_addr_ = maxpid; - this->actors_addr_ = actors; - this->dead_actors_addr_ = dead_actors; + this->heap_address = remote(mmalloc_default_mdp); + this->maxpid_addr_ = remote(maxpid); + this->actors_addr_ = remote(actors); + this->dead_actors_addr_ = remote(dead_actors); this->memory_map_ = simgrid::xbt::get_memory_map(this->pid_); this->init_memory_map_info(); @@ -263,7 +264,7 @@ void RemoteProcess::refresh_heap() // Read/dereference/refresh the std_heap pointer: if (not this->heap) this->heap = std::make_unique(); - this->read_bytes(this->heap.get(), sizeof(mdesc), remote(this->heap_address)); + this->read(this->heap.get(), this->heap_address); this->cache_flags_ |= RemoteProcess::cache_heap; } @@ -567,18 +568,5 @@ void RemoteProcess::dump_stack() const _UPT_destroy(context); unw_destroy_addr_space(as); } - -unsigned long RemoteProcess::get_maxpid() const -{ - unsigned long maxpid; - this->read_bytes(&maxpid, sizeof(unsigned long), remote(maxpid_addr_)); - return maxpid; -} - -void RemoteProcess::get_actor_vectors(RemotePtr& actors, RemotePtr& dead_actors) -{ - actors = remote(static_cast(actors_addr_)); - dead_actors = remote(static_cast(dead_actors_addr_)); -} } // namespace mc } // namespace simgrid