-/* 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. */
static const std::vector<std::string> filtered_libraries = {
#ifdef __linux__
"ld",
+ "ld-linux-x86",
#elif defined __FreeBSD__
"ld-elf",
"ld-elf32",
"liblber",
"libldap",
"libldap_r",
- "liblua5.1",
- "liblua5.3",
"liblzma",
"libm",
"libmd",
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();
// Read/dereference/refresh the std_heap pointer:
if (not this->heap)
this->heap = std::make_unique<s_xbt_mheap_t>();
- 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;
}
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<simgrid::xbt::VmMap> 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();
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;
}
_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<s_xbt_dynar_t>& actors, RemotePtr<s_xbt_dynar_t>& dead_actors)
-{
- actors = remote(static_cast<s_xbt_dynar_t*>(actors_addr_));
- dead_actors = remote(static_cast<s_xbt_dynar_t*>(dead_actors_addr_));
-}
} // namespace mc
} // namespace simgrid