+/* Copyright (c) 2015. The SimGrid Team.
+ * All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
#include <sys/types.h>
#include <sys/uio.h>
{
if (write)
return - UNW_EINVAL;
- ssize_t s;
pid_t pid = _UPT_getpid(arg);
size_t size = sizeof(unw_word_t);
struct iovec local = { valp, size };
struct iovec remote = { (void*) addr, size };
- s = process_vm_readv(pid, &local, 1, &remote, 1, 0);
+ ssize_t s = process_vm_readv(pid, &local, 1, &remote, 1, 0);
if (s >= 0) {
if ((size_t) s != size)
return - UNW_EINVAL;
size_t count = size;
off_t off = (off_t) addr;
char* buf = (char*) valp;
- int fd = MC_process_vm_open(pid, O_RDONLY);
+ int fd = simgrid::mc::open_vm(pid, O_RDONLY);
if (fd < 0)
return - UNW_EINVAL;
while (1) {
unw_accessors_t mc_unw_vmread_accessors =
{
- .find_proc_info = &_UPT_find_proc_info,
- .put_unwind_info = &_UPT_put_unwind_info,
- .get_dyn_info_list_addr = &_UPT_get_dyn_info_list_addr,
- .access_mem = &access_mem,
- .access_reg = &_UPT_access_reg,
- .access_fpreg = &_UPT_access_fpreg,
- .resume = &_UPT_resume,
- .get_proc_name = &_UPT_get_proc_name
+ &_UPT_find_proc_info,
+ &_UPT_put_unwind_info,
+ &_UPT_get_dyn_info_list_addr,
+ &access_mem,
+ &_UPT_access_reg,
+ &_UPT_access_fpreg,
+ &_UPT_resume,
+ &_UPT_get_proc_name
};
}