buf_uaddr = $buf
count = $count
offset = $pos
- argstr = sprintf("%d, %p, %p, %p", $fd, $buf, $count, $pos)
+ argstr = sprintf("%d, %p, %d, %d", $fd, $buf, $count, $pos)
}
probe syscall.pread.return = kernel.function("sys_pread64").return {
name = "pread"
buf_uaddr = $buf
count = $count
offset = ($poshi << 32) + $poslo
- argstr = sprintf("%d, %p, %p, %p", $fd, $buf, $count, ($poshi << 32) + $poslo)
+%( arch == "s390x" %?
+ buf_uaddr = $ubuf
+ argstr = sprintf("%d, %p, %d, %d", $fd, $ubuf, $count, ($poshi << 32) + $poslo)
+%:
+ buf_uaddr = $buf
+ argstr = sprintf("%d, %p, %d, %d", $fd, $buf, $count, ($poshi << 32) + $poslo)
+%)
}
probe syscall.pread32.return = kernel.function("sys32_pread64").return ? {
name = "pread"
buf_uaddr = $buf
count = $count
offset = ($poshi << 32) + $poslo
+%( arch == "s390x" %?
+ buf_uaddr = $ubuf
+ argstr = sprintf("%d, %s, %d, %d", $fd,
+ text_strn(user_string($ubuf),syscall_string_trunc,1),
+ $count, ($poshi << 32) + $poslo)
+%:
+ buf_uaddr = $buf
argstr = sprintf("%d, %s, %d, %d", $fd,
text_strn(user_string($buf),syscall_string_trunc,1),
$count, ($poshi << 32) + $poslo)
+%)
}
probe syscall.pwrite32.return = kernel.function("sys32_pwrite64").return ? {
name = "pwrite"
write(fd,"Hello world abcdefghijklmnopqrstuvwxyz 01234567890123456789", 59);
// write (NNNN, "Hello world abcdefghijklmnopqrstuvwxyz 012345"..., 59) = 59
+ pwrite(fd,"Hello Again",11,12);
+ // pwrite (NNNN, "Hello Again", 11, 12) = 11
+
writev(fd, v, 3);
// writev (NNNN, XXXX, 3) = 15
read(fd, buf, 50);
// read (NNNN, XXXX, 50) = 50
+ pread(fd, buf, 11, 10);
+ // pread (NNNN, XXXX, 11, 10) = 11
+
x[0].iov_base = buf1;
x[0].iov_len = sizeof(STRING1);
x[1].iov_base = buf2;