- if (!info->hostname) {
-
- // Read the hostname from the MCed process:
- MC_process_read_simple(process, &host_copy, p->smx_host, sizeof(host_copy));
- int len = host_copy.key_len + 1;
- char hostname[len];
- MC_process_read_simple(process, hostname, host_copy.key, len);
- info->hostname = mc_model_checker->get_host_name(hostname);
- }
+ simgrid::xbt::string_data remote_string;
+ auto remote_string_address = remote(
+ (simgrid::xbt::string_data*) ((char*) p->host + offset));
+ process->read_bytes(&remote_string, sizeof(remote_string), remote_string_address);
+ char hostname[remote_string.len];
+ process->read_bytes(hostname, remote_string.len + 1, remote(remote_string.data));
+ info->hostname = mc_model_checker->get_host_name(hostname);