#include "mc_ignore.h"
#include "mcer_ignore.h"
+using simgrid::mc::remote;
+
extern "C" {
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_server, mc, "MC server logic");
{
struct mc_symbol_pointer_callback* callback = (struct mc_symbol_pointer_callback*) p;
int value;
- MC_process_read(callback->process, simgrid::mc::AddressSpace::Normal,
- &value, callback->value, sizeof(value), simgrid::mc::ProcessIndexAny);
+ callback->process->read_bytes(&value, sizeof(value), remote(callback->value));
return value;
}
int status = process->status;
if (process->running) {
XBT_DEBUG("Killing process");
- kill(process->pid, SIGTERM);
- if (waitpid(process->pid, &status, 0) == -1)
+ kill(process->pid(), SIGTERM);
+ if (waitpid(process->pid(), &status, 0) == -1)
throw std::system_error(errno, std::system_category());
// TODO, handle the case when the process does not want to die with a timeout
process->status = status;
else if (WIFSIGNALED(status)) {
// Try to uplicate the signal of the model-checked process.
// This is a temporary hack so we don't try too hard.
- kill(mc_model_checker->process().pid, WTERMSIG(status));
+ kill(mc_model_checker->process().pid(), WTERMSIG(status));
abort();
} else {
xbt_die("Unexpected status from model-checked process");
if (size != sizeof(message))
xbt_die("Broken messsage");
memcpy(&message, buffer, sizeof(message));
- MC_process_ignore_memory(&mc_model_checker->process(),
- message.addr, message.size);
+ mc_model_checker->process().ignore_region(
+ (std::uint64_t)message.addr, message.size);
break;
}
}
}
- if (pid == mc_model_checker->process().pid) {
+ if (pid == mc_model_checker->process().pid()) {
if (WIFEXITED(status) || WIFSIGNALED(status)) {
XBT_DEBUG("Child process is over");
mc_model_checker->process().status = status;