*/
class AddressSpace {
private:
- RemoteClient* process_;
+ RemoteClientMemory* process_;
public:
- explicit AddressSpace(RemoteClient* process) : process_(process) {}
+ explicit AddressSpace(RemoteClientMemory* process) : process_(process) {}
virtual ~AddressSpace() = default;
/** The process of this address space
*
* This is where we can get debug informations, memory layout, etc.
*/
- simgrid::mc::RemoteClient* process() const { return process_; }
+ simgrid::mc::RemoteClientMemory* process() const { return process_; }
/** Read data from the address space
*
#include "src/mc/mc_config.hpp"
#include "src/mc/mc_exit.hpp"
#include "src/mc/mc_private.hpp"
-#include "src/mc/remote/RemoteClient.hpp"
+#include "src/mc/remote/RemoteClientMemory.hpp"
#include "xbt/automaton.hpp"
#include "xbt/system_error.hpp"
namespace simgrid {
namespace mc {
-ModelChecker::ModelChecker(std::unique_ptr<RemoteClient> process) : process_(std::move(process)) {}
+ModelChecker::ModelChecker(std::unique_ptr<RemoteClientMemory> process) : process_(std::move(process)) {}
void ModelChecker::start()
{
void ModelChecker::setup_ignore()
{
- RemoteClient& process = this->process();
+ RemoteClientMemory& process = this->process();
for (std::pair<const char*, const char*> const& var :
ignored_local_variables)
process.ignore_local_variable(var.first, var.second);
{
XBT_DEBUG("Shuting down model-checker");
- RemoteClient* process = &this->process();
+ RemoteClientMemory* process = &this->process();
if (process->running()) {
XBT_DEBUG("Killing process");
kill(process->pid(), SIGKILL);
}
}
-void ModelChecker::resume(RemoteClient& process)
+void ModelChecker::resume(RemoteClientMemory& process)
{
int res = process.get_channel().send(MC_MESSAGE_CONTINUE);
if (res)
if (property_automaton == nullptr)
property_automaton = xbt_automaton_new();
- RemoteClient* process = &this->process();
+ RemoteClientMemory* process = &this->process();
RemotePtr<int> address = remote((int*)message.data);
xbt::add_proposition(property_automaton, message.name, [process, address]() { return process->read(address); });
std::set<std::string> hostnames_;
// This is the parent snapshot of the current state:
PageStore page_store_{500};
- std::unique_ptr<RemoteClient> process_;
+ std::unique_ptr<RemoteClientMemory> process_;
Checker* checker_ = nullptr;
public:
ModelChecker(ModelChecker const&) = delete;
ModelChecker& operator=(ModelChecker const&) = delete;
- explicit ModelChecker(std::unique_ptr<RemoteClient> process);
+ explicit ModelChecker(std::unique_ptr<RemoteClientMemory> process);
- RemoteClient& process() { return *process_; }
+ RemoteClientMemory& process() { return *process_; }
PageStore& page_store()
{
return page_store_;
void start();
void shutdown();
- void resume(simgrid::mc::RemoteClient& process);
+ void resume(simgrid::mc::RemoteClientMemory& process);
void handle_events(int fd, short events);
void wait_for_requests();
void handle_simcall(Transition const& transition);
xbt_assert(mc_model_checker == nullptr, "Did you manage to start the MC twice in this process?");
- auto process = std::unique_ptr<simgrid::mc::RemoteClient>(new simgrid::mc::RemoteClient(pid, sockets[1]));
+ auto process = std::unique_ptr<simgrid::mc::RemoteClientMemory>(new simgrid::mc::RemoteClientMemory(pid, sockets[1]));
model_checker_.reset(new simgrid::mc::ModelChecker(std::move(process)));
mc_model_checker = model_checker_.get();
/** @brief Save the current state */
VisitedState::VisitedState(unsigned long state_number) : num(state_number)
{
- simgrid::mc::RemoteClient* process = &(mc_model_checker->process());
+ simgrid::mc::RemoteClientMemory* process = &(mc_model_checker->process());
this->heap_bytes_used = mmalloc_get_bytes_used_remote(
process->get_heap()->heaplimit,
process->get_malloc_info());
std::shared_ptr<State> graph_state)
: num(pair_num), automaton_state(automaton_state)
{
- RemoteClient* process = &(mc_model_checker->process());
+ RemoteClientMemory* process = &(mc_model_checker->process());
this->graph_state = std::move(graph_state);
if (this->graph_state->system_state_ == nullptr)
static bool mmalloc_heap_differ(StateComparator& state, const Snapshot& snapshot1, const Snapshot& snapshot2)
{
- const RemoteClient& process = mc_model_checker->process();
+ const RemoteClientMemory& process = mc_model_checker->process();
/* Check busy blocks */
size_t i1 = 1;
const Snapshot& snapshot1, const Snapshot& snapshot2,
HeapLocationPairs* previous, int size, int check_ignore)
{
- const RemoteClient& process = mc_model_checker->process();
+ const RemoteClientMemory& process = mc_model_checker->process();
const Region* heap_region1 = MC_get_heap_region(snapshot1);
const Region* heap_region2 = MC_get_heap_region(snapshot2);
static bool heap_area_differ(StateComparator& state, const void* area1, const void* area2, const Snapshot& snapshot1,
const Snapshot& snapshot2, HeapLocationPairs* previous, Type* type, int pointer_level)
{
- const simgrid::mc::RemoteClient& process = mc_model_checker->process();
+ const simgrid::mc::RemoteClientMemory& process = mc_model_checker->process();
ssize_t block1;
ssize_t block2;
// TODO, make this a field of ModelChecker or something similar
static StateComparator state_comparator;
- const RemoteClient& process = mc_model_checker->process();
+ const RemoteClientMemory& process = mc_model_checker->process();
if (s1->hash_ != s2->hash_) {
XBT_VERB("(%d - %d) Different hash: 0x%" PRIx64 "--0x%" PRIx64, s1->num_state_, s2->num_state_, s1->hash_,
const char* name);
/** Augment the current module with informations about the other ones */
-XBT_PRIVATE void postProcessObjectInformation(const simgrid::mc::RemoteClient* process,
+XBT_PRIVATE void postProcessObjectInformation(const simgrid::mc::RemoteClientMemory* process,
simgrid::mc::ObjectInformation* info);
} // namespace mc
} // namespace simgrid
#include "src/mc/inspect/Variable.hpp"
#include "src/mc/inspect/mc_dwarf.hpp"
#include "src/mc/mc_private.hpp"
-#include "src/mc/remote/RemoteClient.hpp"
+#include "src/mc/remote/RemoteClientMemory.hpp"
#include <cinttypes>
#include <cstdint>
/*************************************************************************/
-void postProcessObjectInformation(const RemoteClient* process, ObjectInformation* info)
+void postProcessObjectInformation(const RemoteClientMemory* process, ObjectInformation* info)
{
for (auto& t : info->types) {
Type* type = &(t.second);
#include "src/mc/inspect/mc_unw.hpp"
#include "src/mc/inspect/Frame.hpp"
-#include "src/mc/remote/RemoteClient.hpp"
+#include "src/mc/remote/RemoteClientMemory.hpp"
#include <cstring>
return unw_create_addr_space(&UnwindContext::accessors, BYTE_ORDER);
}
-void UnwindContext::initialize(simgrid::mc::RemoteClient* process, unw_context_t* c)
+void UnwindContext::initialize(simgrid::mc::RemoteClientMemory* process, unw_context_t* c)
{
this->address_space_ = process;
this->process_ = process;
class UnwindContext {
simgrid::mc::AddressSpace* address_space_ = nullptr;
- simgrid::mc::RemoteClient* process_ = nullptr;
+ simgrid::mc::RemoteClientMemory* process_ = nullptr;
unw_context_t unwind_context_;
public:
- void initialize(simgrid::mc::RemoteClient* process, unw_context_t* c);
+ void initialize(simgrid::mc::RemoteClientMemory* process, unw_context_t* c);
unw_cursor_t cursor();
private: // Methods and virtual table for libunwind
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/mc/inspect/mc_unw.hpp"
-#include "src/mc/remote/RemoteClient.hpp"
+#include "src/mc/remote/RemoteClientMemory.hpp"
#include <sys/types.h>
#include <sys/uio.h>
#if SIMGRID_HAVE_MC
#include "src/mc/ModelChecker.hpp"
#include "src/mc/Session.hpp"
-#include "src/mc/remote/RemoteClient.hpp"
+#include "src/mc/remote/RemoteClientMemory.hpp"
using simgrid::mc::remote;
#endif
class ChunkedData;
class ModelChecker;
class AddressSpace;
-class RemoteClient;
+class RemoteClientMemory;
class Snapshot;
class ObjectInformation;
class Member;
* @param target Local vector (to be filled with copies of `s_smx_actor_t`)
* @param remote_dynar Address of the process dynar in the remote list
*/
-static void MC_process_refresh_simix_actor_dynar(const simgrid::mc::RemoteClient* process,
+static void MC_process_refresh_simix_actor_dynar(const simgrid::mc::RemoteClientMemory* process,
std::vector<simgrid::mc::ActorInformation>& target,
simgrid::mc::RemotePtr<s_xbt_dynar_t> remote_dynar)
{
namespace simgrid {
namespace mc {
-void RemoteClient::refresh_simix()
+void RemoteClientMemory::refresh_simix()
{
- if (this->cache_flags_ & RemoteClient::cache_simix_processes)
+ if (this->cache_flags_ & RemoteClientMemory::cache_simix_processes)
return;
// TODO, avoid to reload `&simix_global`, `simix_global`, `*simix_global`
MC_process_refresh_simix_actor_dynar(this, this->smx_dead_actors_infos,
remote(simix_global.get_buffer()->dead_actors_vector));
- this->cache_flags_ |= RemoteClient::cache_simix_processes;
+ this->cache_flags_ |= RemoteClientMemory::cache_simix_processes;
}
}
if (mc_model_checker == nullptr)
return actor->get_host()->get_cname();
- const simgrid::mc::RemoteClient* process = &mc_model_checker->process();
+ const simgrid::mc::RemoteClientMemory* process = &mc_model_checker->process();
// Read the simgrid::xbt::string in the MCed process:
simgrid::mc::ActorInformation* info = actor_info_cast(actor);
const char* MC_smx_actor_get_name(smx_actor_t actor)
{
- const simgrid::mc::RemoteClient* process = &mc_model_checker->process();
+ const simgrid::mc::RemoteClientMemory* process = &mc_model_checker->process();
if (mc_model_checker == nullptr)
return actor->get_cname();
#ifndef SIMGRID_MC_SMX_HPP
#define SIMGRID_MC_SMX_HPP
-#include "src/mc/remote/RemoteClient.hpp"
+#include "src/mc/remote/RemoteClientMemory.hpp"
/** @file
* @brief (Cross-process, MCer/MCed) Access to SMX structures
#define _FILE_OFFSET_BITS 64 /* needed for pread_whole to work as expected on 32bits */
-#include "src/mc/remote/RemoteClient.hpp"
+#include "src/mc/remote/RemoteClientMemory.hpp"
#include "src/mc/mc_smx.hpp"
#include "src/mc/sosp/Snapshot.hpp"
"libsasl2",
"libresolv",
"libcrypt",
- "libselinux"
-};
+ "libselinux"};
static bool is_simgrid_lib(const std::string& libname)
{
// ***** Process
-RemoteClient::RemoteClient(pid_t pid, int sockfd) : AddressSpace(this), pid_(pid), channel_(sockfd), running_(true)
+RemoteClientMemory::RemoteClientMemory(pid_t pid, int sockfd)
+ : AddressSpace(this), pid_(pid), channel_(sockfd), running_(true)
{
}
-void RemoteClient::init()
+void RemoteClientMemory::init()
{
this->memory_map_ = simgrid::xbt::get_memory_map(this->pid_);
this->init_memory_map_info();
this->unw_underlying_context = simgrid::unw::create_context(this->unw_underlying_addr_space, this->pid_);
}
-RemoteClient::~RemoteClient()
+RemoteClientMemory::~RemoteClientMemory()
{
if (this->memory_file >= 0)
close(this->memory_file);
* Do not use directly, this is used by the getters when appropriate
* in order to have fresh data.
*/
-void RemoteClient::refresh_heap()
+void RemoteClientMemory::refresh_heap()
{
// Read/dereference/refresh the std_heap pointer:
if (not this->heap)
this->heap.reset(new s_xbt_mheap_t());
this->read_bytes(this->heap.get(), sizeof(mdesc), remote(this->heap_address));
- this->cache_flags_ |= RemoteClient::cache_heap;
+ this->cache_flags_ |= RemoteClientMemory::cache_heap;
}
/** Refresh the information about the process
* Do not use directly, this is used by the getters when appropriate
* in order to have fresh data.
* */
-void RemoteClient::refresh_malloc_info()
+void RemoteClientMemory::refresh_malloc_info()
{
// Refresh process->heapinfo:
- if (this->cache_flags_ & RemoteClient::cache_malloc)
+ if (this->cache_flags_ & RemoteClientMemory::cache_malloc)
return;
size_t count = this->heap->heaplimit + 1;
if (this->heap_info.size() < count)
this->heap_info.resize(count);
this->read_bytes(this->heap_info.data(), count * sizeof(malloc_info), remote(this->heap->heapinfo));
- this->cache_flags_ |= RemoteClient::cache_malloc;
+ this->cache_flags_ |= RemoteClientMemory::cache_malloc;
}
/** @brief Finds the range of the different memory segments and binary paths */
-void RemoteClient::init_memory_map_info()
+void RemoteClientMemory::init_memory_map_info()
{
XBT_DEBUG("Get debug information ...");
this->maestro_stack_start_ = nullptr;
XBT_DEBUG("Get debug information done !");
}
-std::shared_ptr<simgrid::mc::ObjectInformation> RemoteClient::find_object_info(RemotePtr<void> addr) const
+std::shared_ptr<simgrid::mc::ObjectInformation> RemoteClientMemory::find_object_info(RemotePtr<void> addr) const
{
for (auto const& object_info : this->object_infos)
if (addr.address() >= (std::uint64_t)object_info->start && addr.address() <= (std::uint64_t)object_info->end)
return nullptr;
}
-std::shared_ptr<ObjectInformation> RemoteClient::find_object_info_exec(RemotePtr<void> addr) const
+std::shared_ptr<ObjectInformation> RemoteClientMemory::find_object_info_exec(RemotePtr<void> addr) const
{
for (std::shared_ptr<ObjectInformation> const& info : this->object_infos)
if (addr.address() >= (std::uint64_t)info->start_exec && addr.address() <= (std::uint64_t)info->end_exec)
return nullptr;
}
-std::shared_ptr<ObjectInformation> RemoteClient::find_object_info_rw(RemotePtr<void> addr) const
+std::shared_ptr<ObjectInformation> RemoteClientMemory::find_object_info_rw(RemotePtr<void> addr) const
{
for (std::shared_ptr<ObjectInformation> const& info : this->object_infos)
if (addr.address() >= (std::uint64_t)info->start_rw && addr.address() <= (std::uint64_t)info->end_rw)
return nullptr;
}
-simgrid::mc::Frame* RemoteClient::find_function(RemotePtr<void> ip) const
+simgrid::mc::Frame* RemoteClientMemory::find_function(RemotePtr<void> ip) const
{
std::shared_ptr<simgrid::mc::ObjectInformation> info = this->find_object_info_exec(ip);
return info ? info->find_function((void*)ip.address()) : nullptr;
/** Find (one occurrence of) the named variable definition
*/
-const simgrid::mc::Variable* RemoteClient::find_variable(const char* name) const
+const simgrid::mc::Variable* RemoteClientMemory::find_variable(const char* name) const
{
// First lookup the variable in the executable shared object.
// A global variable used directly by the executable code from a library
return nullptr;
}
-void RemoteClient::read_variable(const char* name, void* target, size_t size) const
+void RemoteClientMemory::read_variable(const char* name, void* target, size_t size) const
{
const simgrid::mc::Variable* var = this->find_variable(name);
xbt_assert(var, "Variable %s not found", name);
this->read_bytes(target, size, remote(var->address));
}
-std::string RemoteClient::read_string(RemotePtr<char> address) const
+std::string RemoteClientMemory::read_string(RemotePtr<char> address) const
{
if (not address)
return {};
}
}
-void* RemoteClient::read_bytes(void* buffer, std::size_t size, RemotePtr<void> address, ReadOptions /*options*/) const
+void* RemoteClientMemory::read_bytes(void* buffer, std::size_t size, RemotePtr<void> address,
+ ReadOptions /*options*/) const
{
if (pread_whole(this->memory_file, buffer, size, (size_t)address.address()) < 0)
xbt_die("Read at %p from process %lli failed", (void*)address.address(), (long long)this->pid_);
* @param len data size
* @param address target process memory address (target)
*/
-void RemoteClient::write_bytes(const void* buffer, size_t len, RemotePtr<void> address)
+void RemoteClientMemory::write_bytes(const void* buffer, size_t len, RemotePtr<void> address)
{
if (pwrite_whole(this->memory_file, buffer, len, (size_t)address.address()) < 0)
xbt_die("Write to process %lli failed", (long long)this->pid_);
}
-void RemoteClient::clear_bytes(RemotePtr<void> address, size_t len)
+void RemoteClientMemory::clear_bytes(RemotePtr<void> address, size_t len)
{
pthread_once(&zero_buffer_flag, zero_buffer_init);
while (len) {
}
}
-void RemoteClient::ignore_region(std::uint64_t addr, std::size_t size)
+void RemoteClientMemory::ignore_region(std::uint64_t addr, std::size_t size)
{
IgnoredRegion region;
region.addr = addr;
return;
}
- unsigned int cursor = 0;
+ unsigned int cursor = 0;
const IgnoredRegion* current_region = nullptr;
int start = 0;
ignored_regions_.insert(ignored_regions_.begin() + position, region);
}
-void RemoteClient::ignore_heap(IgnoredHeapRegion const& region)
+void RemoteClientMemory::ignore_heap(IgnoredHeapRegion const& region)
{
if (ignored_heap_.empty()) {
ignored_heap_.push_back(std::move(region));
// Binary search the position of insertion:
size_type cursor;
while (start <= end) {
- cursor = start + (end - start) / 2;
+ cursor = start + (end - start) / 2;
auto const& current_region = ignored_heap_[cursor];
if (current_region.address == region.address)
return;
ignored_heap_.insert(ignored_heap_.begin() + cursor, region);
}
-void RemoteClient::unignore_heap(void* address, size_t size)
+void RemoteClientMemory::unignore_heap(void* address, size_t size)
{
typedef std::vector<IgnoredHeapRegion>::size_type size_type;
// Binary search:
size_type cursor;
while (start <= end) {
- cursor = (start + end) / 2;
+ cursor = (start + end) / 2;
auto const& region = ignored_heap_[cursor];
if (region.address < address)
start = cursor + 1;
}
}
-void RemoteClient::ignore_local_variable(const char* var_name, const char* frame_name)
+void RemoteClientMemory::ignore_local_variable(const char* var_name, const char* frame_name)
{
if (frame_name != nullptr && strcmp(frame_name, "*") == 0)
frame_name = nullptr;
info->remove_local_variable(var_name, frame_name);
}
-std::vector<simgrid::mc::ActorInformation>& RemoteClient::actors()
+std::vector<simgrid::mc::ActorInformation>& RemoteClientMemory::actors()
{
this->refresh_simix();
return smx_actors_infos;
}
-std::vector<simgrid::mc::ActorInformation>& RemoteClient::dead_actors()
+std::vector<simgrid::mc::ActorInformation>& RemoteClientMemory::dead_actors()
{
this->refresh_simix();
return smx_dead_actors_infos;
}
-void RemoteClient::dump_stack()
+void RemoteClientMemory::dump_stack()
{
unw_addr_space_t as = unw_create_addr_space(&_UPT_accessors, BYTE_ORDER);
if (as == nullptr) {
_UPT_destroy(context);
unw_destroy_addr_space(as);
}
-}
-}
+} // namespace mc
+} // namespace simgrid
std::size_t size;
};
-/** The Model-Checked process, seen from the MCer perspective
+/** The Application's process memory, seen from the MCer perspective
*
* This class is mixing a lot of different responsibilities and is tied
* to SIMIX. It should probably be split into different classes.
* - accessing the system state of the process (heap, …);
* - storing the SIMIX state of the process;
* - privatization;
- * - communication with the model-checked process;
* - stack unwinding;
* - etc.
*/
-class RemoteClient final : public AddressSpace {
+class RemoteClientMemory final : public AddressSpace {
private:
// Those flags are used to track down which cached information
// is still up to date and which information needs to be updated.
static constexpr int cache_simix_processes = 4;
public:
- RemoteClient(pid_t pid, int sockfd);
- ~RemoteClient();
+ RemoteClientMemory(pid_t pid, int sockfd);
+ ~RemoteClientMemory();
void init();
- RemoteClient(RemoteClient const&) = delete;
- RemoteClient(RemoteClient&&) = delete;
- RemoteClient& operator=(RemoteClient const&) = delete;
- RemoteClient& operator=(RemoteClient&&) = delete;
+ RemoteClientMemory(RemoteClientMemory const&) = delete;
+ RemoteClientMemory(RemoteClientMemory&&) = delete;
+ RemoteClientMemory& operator=(RemoteClientMemory const&) = delete;
+ RemoteClientMemory& operator=(RemoteClientMemory&&) = delete;
// Read memory:
void* read_bytes(void* buffer, std::size_t size, RemotePtr<void> address,
// Heap access:
xbt_mheap_t get_heap()
{
- if (not(this->cache_flags_ & RemoteClient::cache_heap))
+ if (not(this->cache_flags_ & RemoteClientMemory::cache_heap))
this->refresh_heap();
return this->heap.get();
}
const malloc_info* get_malloc_info()
{
- if (not(this->cache_flags_ & RemoteClient::cache_malloc))
+ if (not(this->cache_flags_ & RemoteClientMemory::cache_malloc))
this->refresh_malloc_info();
return this->heap_info.data();
}
- void clear_cache() { this->cache_flags_ = RemoteClient::cache_none; }
+ void clear_cache() { this->cache_flags_ = RemoteClientMemory::cache_none; }
Channel const& get_channel() const { return channel_; }
Channel& get_channel() { return channel_; }
private:
/** State of the cache (which variables are up to date) */
- int cache_flags_ = RemoteClient::cache_none;
+ int cache_flags_ = RemoteClientMemory::cache_none;
public:
/** Address of the heap structure in the MCed process. */
void* unw_underlying_context;
};
-/** Open a FD to a remote process memory (`/dev/$pid/mem`)
- */
+/** Open a FD to a remote process memory (`/dev/$pid/mem`) */
XBT_PRIVATE int open_vm(pid_t pid, int flags);
} // namespace mc
} // namespace simgrid
/************************************* Take Snapshot ************************************/
/****************************************************************************************/
-void Snapshot::snapshot_regions(RemoteClient* process)
+void Snapshot::snapshot_regions(RemoteClientMemory* process)
{
snapshot_regions_.clear();
static std::vector<s_mc_stack_frame_t> unwind_stack_frames(UnwindContext* stack_context)
{
- const RemoteClient* process = &mc_model_checker->process();
+ const RemoteClientMemory* process = &mc_model_checker->process();
std::vector<s_mc_stack_frame_t> result;
unw_cursor_t c = stack_context->cursor();
return result;
}
-void Snapshot::snapshot_stacks(RemoteClient* process)
+void Snapshot::snapshot_stacks(RemoteClientMemory* process)
{
for (auto const& stack : process->stack_areas()) {
s_mc_snapshot_stack_t st;
snapshot->process()->write_bytes(ignored_data.data.data(), ignored_data.data.size(), remote(ignored_data.start));
}
-Snapshot::Snapshot(int num_state, RemoteClient* process) : AddressSpace(process), num_state_(num_state)
+Snapshot::Snapshot(int num_state, RemoteClientMemory* process) : AddressSpace(process), num_state_(num_state)
{
XBT_DEBUG("Taking snapshot %i", num_state);
return get_region(addr);
}
-void Snapshot::restore(RemoteClient* process)
+void Snapshot::restore(RemoteClientMemory* process)
{
XBT_DEBUG("Restore snapshot %i", num_state_);
#include "src/mc/ModelChecker.hpp"
#include "src/mc/inspect/mc_unw.hpp"
-#include "src/mc/remote/RemoteClient.hpp"
+#include "src/mc/remote/RemoteClientMemory.hpp"
#include "src/mc/sosp/Region.hpp"
// ***** MC Snapshot
class XBT_PRIVATE Snapshot final : public AddressSpace {
public:
/* Initialization */
- Snapshot(int num_state, RemoteClient* process = &mc_model_checker->process());
+ Snapshot(int num_state, RemoteClientMemory* process = &mc_model_checker->process());
~Snapshot() = default;
/* Regular use */
ReadOptions options = ReadOptions::none()) const override;
Region* get_region(const void* addr) const;
Region* get_region(const void* addr, Region* hinted_region) const;
- void restore(RemoteClient* process);
+ void restore(RemoteClientMemory* process);
// To be private
int num_state_;
private:
void add_region(RegionType type, ObjectInformation* object_info, void* start_addr, std::size_t size);
- void snapshot_regions(RemoteClient* process);
- void snapshot_stacks(RemoteClient* process);
+ void snapshot_regions(RemoteClientMemory* process);
+ void snapshot_stacks(RemoteClientMemory* process);
};
} // namespace mc
} // namespace simgrid
mc_model_checker = nullptr;
}
- static std::unique_ptr<simgrid::mc::RemoteClient> process;
+ static std::unique_ptr<simgrid::mc::RemoteClientMemory> process;
};
// static member variables init.
-std::unique_ptr<simgrid::mc::RemoteClient> snap_test_helper::process = nullptr;
+std::unique_ptr<simgrid::mc::RemoteClientMemory> snap_test_helper::process = nullptr;
void snap_test_helper::init_memory(void* mem, size_t size)
{
REQUIRE(xbt_pagesize == getpagesize());
REQUIRE(1 << xbt_pagebits == xbt_pagesize);
- process.reset(new simgrid::mc::RemoteClient(getpid(), -1));
+ process.reset(new simgrid::mc::RemoteClientMemory(getpid(), -1));
process->init();
mc_model_checker = new ::simgrid::mc::ModelChecker(std::move(process));
}
#include "src/mc/inspect/ObjectInformation.hpp"
#include "src/mc/inspect/Type.hpp"
#include "src/mc/inspect/Variable.hpp"
-#include "src/mc/remote/RemoteClient.hpp"
+#include "src/mc/remote/RemoteClientMemory.hpp"
#include <cassert>
#include <cstdlib>
static std::default_random_engine rnd_engine;
-static simgrid::mc::RemoteClient* process;
+static simgrid::mc::RemoteClientMemory* process;
static uintptr_t eval_binary_operation(simgrid::dwarf::ExpressionContext const& state, int op, uintptr_t a, uintptr_t b)
{
int main()
{
- process = new simgrid::mc::RemoteClient(getpid(), -1);
+ process = new simgrid::mc::RemoteClientMemory(getpid(), -1);
process->init();
simgrid::dwarf::ExpressionContext state;
#include "src/mc/inspect/ObjectInformation.hpp"
#include "src/mc/inspect/Type.hpp"
#include "src/mc/inspect/Variable.hpp"
-#include "src/mc/remote/RemoteClient.hpp"
+#include "src/mc/remote/RemoteClientMemory.hpp"
#include <cassert>
#include <cstring>
xbt_assert(location.address() == address, "Bad resolution of local variable %s of %s", variable, function);
}
-static const simgrid::mc::Variable* test_global_variable(const simgrid::mc::RemoteClient& process,
+static const simgrid::mc::Variable* test_global_variable(const simgrid::mc::RemoteClientMemory& process,
const simgrid::mc::ObjectInformation* info, const char* name,
void* address, long byte_size)
{
int i;
};
-static void test_type_by_name(const simgrid::mc::RemoteClient& process, s_foo /*my_foo*/)
+static void test_type_by_name(const simgrid::mc::RemoteClientMemory& process, s_foo /*my_foo*/)
{
assert(process.binary_info->full_types_by_name.find("struct s_foo") != process.binary_info->full_types_by_name.end());
}
const simgrid::mc::Variable* var;
simgrid::mc::Type* type;
- simgrid::mc::RemoteClient process(getpid(), -1);
+ simgrid::mc::RemoteClientMemory process(getpid(), -1);
process.init();
test_global_variable(process, process.binary_info.get(), "some_local_variable", &some_local_variable, sizeof(int));
src/mc/remote/Channel.hpp
src/mc/remote/CheckerSide.cpp
src/mc/remote/CheckerSide.hpp
- src/mc/remote/RemoteClient.hpp
- src/mc/remote/RemoteClient.cpp
+ src/mc/remote/RemoteClientMemory.hpp
+ src/mc/remote/RemoteClientMemory.cpp
src/mc/remote/RemotePtr.hpp
src/mc/remote/mc_protocol.h
src/mc/remote/mc_protocol.cpp