#define _FILE_OFFSET_BITS 64 /* needed for pread_whole to work as expected on 32bits */
-#include <assert.h>
-#include <errno.h>
-#include <stddef.h>
-#include <stdint.h>
+#include <cassert>
+#include <cerrno>
+#include <cstddef>
+#include <cstdint>
#include <sys/ptrace.h>
simgrid::mc::Variable* var = this->find_variable(name);
xbt_assert(var->address, "No simple location for this variable");
xbt_assert(var->type->full_type, "Partial type for %s, cannot check size", name);
- xbt_assert((size_t)var->type->full_type->byte_size == size, "Unexpected size for %s (expected %zi, was %zi)", name,
+ xbt_assert((size_t)var->type->full_type->byte_size == size, "Unexpected size for %s (expected %zu, was %zu)", name,
size, (size_t)var->type->full_type->byte_size);
this->read_bytes(target, size, remote(var->address));
}
unw_destroy_addr_space(as);
return;
}
+
+bool RemoteClient::actor_is_enabled(aid_t pid)
+{
+ s_mc_message_actor_enabled msg{MC_MESSAGE_ACTOR_ENABLED, pid};
+ process()->getChannel().send(msg);
+ char buff[MC_MESSAGE_LENGTH];
+ ssize_t received = process()->getChannel().receive(buff, MC_MESSAGE_LENGTH, true);
+ xbt_assert(received == sizeof(s_mc_message_int), "Unexpected size in answer to ACTOR_ENABLED");
+ return ((mc_message_int_t*)buff)->value;
+}
}
}