#include "src/mc/sosp/RemoteProcessMemory.hpp"
+#include "src/mc/explo/Exploration.hpp"
+#include "src/mc/explo/LivenessChecker.hpp"
#include "src/mc/sosp/Snapshot.hpp"
#include "xbt/file.hpp"
#include "xbt/log.h"
+#include "xbt/system_error.hpp"
#include <fcntl.h>
#include <libunwind-ptrace.h>
// ***** RemoteProcessMemory
-RemoteProcessMemory::RemoteProcessMemory(pid_t pid) : AddressSpace(this), pid_(pid), running_(true) {}
-
-void RemoteProcessMemory::init(xbt_mheap_t mmalloc_default_mdp)
+RemoteProcessMemory::RemoteProcessMemory(pid_t pid, xbt_mheap_t mmalloc_default_mdp) : AddressSpace(this), pid_(pid)
{
this->heap_address = remote(mmalloc_default_mdp);
ignored_regions_.insert(pos, region);
}
+void RemoteProcessMemory::unignore_region(std::uint64_t addr, std::size_t size)
+{
+ IgnoredRegion region;
+ region.addr = addr;
+ region.size = size;
+
+ auto pos = std::lower_bound(ignored_regions_.begin(), ignored_regions_.end(), region,
+ [](auto const& reg1, auto const& reg2) {
+ return reg1.addr < reg2.addr || (reg1.addr == reg2.addr && reg1.size < reg2.size);
+ });
+ if (pos != ignored_regions_.end())
+ ignored_regions_.erase(pos);
+}
+
void RemoteProcessMemory::ignore_heap(IgnoredHeapRegion const& region)
{
// Binary search the position of insertion:
_UPT_destroy(context);
unw_destroy_addr_space(as);
}
+
} // namespace simgrid::mc