From 354f690e3ef067800603311bdd7ebe426748b59f Mon Sep 17 00:00:00 2001 From: criyle Date: Sun, 23 Jun 2019 22:49:40 -0700 Subject: [PATCH] fix process_vm_readv --- tracer/context_helper.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tracer/context_helper.go b/tracer/context_helper.go index ed620c7..296bab4 100644 --- a/tracer/context_helper.go +++ b/tracer/context_helper.go @@ -25,6 +25,9 @@ func vmRead(pid int, addr uintptr, buff []byte) (int, error) { localIov := getIovecs(&buff[0], l) remoteIov := getIovecs((*byte)(unsafe.Pointer(addr)), l) n, _, err := processVMReadv(pid, localIov, remoteIov, uintptr(0)) + if err == 0 { + return int(n), nil + } return int(n), err }