#include "src/mc/mc_unw.h"
#include "src/mc/mc_snapshot.h"
#include "src/mc/mc_ignore.h"
#include "src/mc/mc_unw.h"
#include "src/mc/mc_snapshot.h"
#include "src/mc/mc_ignore.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_process, mc,
"MC process information");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_process, mc,
"MC process information");
int open_vm(pid_t pid, int flags)
{
const size_t buffer_size = 30;
int open_vm(pid_t pid, int flags)
{
const size_t buffer_size = 30;
Process::Process(pid_t pid, int sockfd) :
AddressSpace(this),pid_(pid), socket_(sockfd), running_(true)
{}
Process::Process(pid_t pid, int sockfd) :
AddressSpace(this),pid_(pid), socket_(sockfd), running_(true)
{}
remote(std_heap_var->address),
simgrid::mc::ProcessIndexDisabled);
remote(std_heap_var->address),
simgrid::mc::ProcessIndexDisabled);
this->unw_addr_space = unw_create_addr_space(&mc_unw_accessors , __BYTE_ORDER);
this->unw_underlying_addr_space = unw_create_addr_space(&mc_unw_vmread_accessors, __BYTE_ORDER);
this->unw_underlying_context = _UPT_create(this->pid_);
this->unw_addr_space = unw_create_addr_space(&mc_unw_accessors , __BYTE_ORDER);
this->unw_underlying_addr_space = unw_create_addr_space(&mc_unw_vmread_accessors, __BYTE_ORDER);
this->unw_underlying_context = _UPT_create(this->pid_);
if (this->unw_underlying_addr_space != unw_local_addr_space) {
unw_destroy_addr_space(this->unw_underlying_addr_space);
if (this->unw_underlying_addr_space != unw_local_addr_space) {
unw_destroy_addr_space(this->unw_underlying_addr_space);
// Resolve time (including accross differents objects):
for (auto const& object_info : this->object_infos)
// Resolve time (including accross differents objects):
for (auto const& object_info : this->object_infos)
xbt_assert(this->maestro_stack_start_, "Did not find maestro_stack_start");
xbt_assert(this->maestro_stack_end_, "Did not find maestro_stack_end");
xbt_assert(this->maestro_stack_start_, "Did not find maestro_stack_start");
xbt_assert(this->maestro_stack_end_, "Did not find maestro_stack_end");
{
std::shared_ptr<simgrid::mc::ObjectInformation> info = this->find_object_info_exec(ip);
return info ? info->find_function((void*) ip.address()) : nullptr;
{
std::shared_ptr<simgrid::mc::ObjectInformation> info = this->find_object_info_exec(ip);
return info ? info->find_function((void*) ip.address()) : nullptr;
ReadOptions options) const
{
if (process_index != simgrid::mc::ProcessIndexDisabled) {
std::shared_ptr<simgrid::mc::ObjectInformation> const& info =
this->find_object_info_rw((void*)address.address());
// Segment overlap is not handled.
ReadOptions options) const
{
if (process_index != simgrid::mc::ProcessIndexDisabled) {
std::shared_ptr<simgrid::mc::ObjectInformation> const& info =
this->find_object_info_rw((void*)address.address());
// Segment overlap is not handled.
{
if (pwrite_whole(this->memory_file, buffer, len, address.address()) < 0)
xbt_die("Write to process %lli failed", (long long) this->pid_);
}
{
if (pwrite_whole(this->memory_file, buffer, len, address.address()) < 0)
xbt_die("Write to process %lli failed", (long long) this->pid_);
}
while (len) {
size_t s = len > zero_buffer_size ? zero_buffer_size : len;
this->write_bytes(zero_buffer, s, address);
while (len) {
size_t s = len > zero_buffer_size ? zero_buffer_size : len;
this->write_bytes(zero_buffer, s, address);
+std::vector<simgrid::mc::SimixProcessInformation>& Process::simix_processes()
+{
+ xbt_assert(mc_mode != MC_MODE_CLIENT);
+ MC_process_smx_refresh(&mc_model_checker->process());
+ return smx_process_infos;
+}
+