X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/240c022643fcbac7a73b39f5cf007acf7e5f81f5..d89ca681772fdaafdd69049d4d66676a4e98de38:/src/mc/remote/RemoteProcess.cpp diff --git a/src/mc/remote/RemoteProcess.cpp b/src/mc/remote/RemoteProcess.cpp index 167a484355..fcde1d3f42 100644 --- a/src/mc/remote/RemoteProcess.cpp +++ b/src/mc/remote/RemoteProcess.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2021. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2014-2022. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -35,6 +35,7 @@ namespace mc { static const std::vector filtered_libraries = { #ifdef __linux__ "ld", + "ld-linux-x86", #elif defined __FreeBSD__ "ld-elf", "ld-elf32", @@ -100,8 +101,6 @@ static const std::vector filtered_libraries = { "liblber", "libldap", "libldap_r", - "liblua5.1", - "liblua5.3", "liblzma", "libm", "libmd", @@ -217,12 +216,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 = remote(mmalloc_default_mdp); - this->maxpid_addr_ = maxpid; - this->actors_addr_ = actors; - this->dead_actors_addr_ = dead_actors; + 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(); @@ -290,15 +290,13 @@ void RemoteProcess::init_memory_map_info() XBT_DEBUG("Get debug information ..."); this->maestro_stack_start_ = nullptr; this->maestro_stack_end_ = nullptr; - this->object_infos.resize(0); + this->object_infos.clear(); this->binary_info = nullptr; std::vector const& maps = this->memory_map_; const char* current_name = nullptr; - this->object_infos.clear(); - for (size_t i = 0; i < maps.size(); i++) { simgrid::xbt::VmMap const& reg = maps[i]; const char* pathname = maps[i].pathname.c_str(); @@ -558,7 +556,7 @@ void RemoteProcess::dump_stack() const if (unw_init_remote(&cursor, as, context) != 0) { _UPT_destroy(context); unw_destroy_addr_space(as); - XBT_ERROR("Could not initialiez ptrace cursor"); + XBT_ERROR("Could not initialize ptrace cursor"); return; } @@ -567,18 +565,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