-#define _GNU_SOURCE
-
#include <sys/types.h>
#include <sys/uio.h>
#include "mc_unw.h"
+extern "C" {
+
/** \file
* Libunwind namespace implementation using process_vm_readv.
*.
static inline
pid_t _UPT_getpid(void* arg)
{
- struct _UPT_info* info = arg;
+ struct _UPT_info* info = (_UPT_info*) arg;
return info->pid;
}
struct iovec remote = { (void*) addr, size };
s = process_vm_readv(pid, &local, 1, &remote, 1, 0);
if (s >= 0) {
- if (s != size)
+ if ((size_t) s != size)
return - UNW_EINVAL;
else
return 0;
.resume = &_UPT_resume,
.get_proc_name = &_UPT_get_proc_name
};
+
+}