X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ea9cce21b6d3f37823143217f1ca183bb2f0c9ac..814f0122ea0074dfb67398a79067c01267bc0b40:/src/mc/mc_unw_vmread.cpp diff --git a/src/mc/mc_unw_vmread.cpp b/src/mc/mc_unw_vmread.cpp index 3893ec9a1c..a4e567771c 100644 --- a/src/mc/mc_unw_vmread.cpp +++ b/src/mc/mc_unw_vmread.cpp @@ -1,3 +1,9 @@ +/* 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 #include @@ -42,7 +48,6 @@ static int access_mem(const unw_addr_space_t as, { if (write) return - UNW_EINVAL; - ssize_t s; pid_t pid = _UPT_getpid(arg); size_t size = sizeof(unw_word_t); @@ -52,7 +57,7 @@ static int access_mem(const unw_addr_space_t as, 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;