From af872fe279a52fb19d5483db7d29cdaa1814ccdc Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 20 Mar 2010 20:20:39 +0100 Subject: [PATCH] Match syscall.pipe32 with regular syscall.pipe[2] output. * tapset/x86_64/syscalls.stp (syscall.pipe32[.return]): Define same variables and match argstr with regular syscall.pipe. --- tapset/x86_64/syscalls.stp | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/tapset/x86_64/syscalls.stp b/tapset/x86_64/syscalls.stp index bcb9523dd..c385f824e 100644 --- a/tapset/x86_64/syscalls.stp +++ b/tapset/x86_64/syscalls.stp @@ -149,10 +149,43 @@ probe syscall.vm86_warning.return = kernel.function("sys32_vm86_warning").return probe syscall.pipe32 = kernel.function("sys32_pipe")? { name = "pipe" - argstr = sprintf("%p", $fd) + flags = 0; + if (@defined($fd)) { + fildes_uaddr = $fd + if (fildes_uaddr == 0) { + pipe0 = 0; + pipe1 = 0; + argstr = "NULL" + } else { + pipe0 = user_int(&$fd[0]); + pipe1 = user_int(&$fd[1]); + argstr = sprintf("[%d, %d]", pipe0, pipe1); + } + } else { + fildes_uaddr = 0; + pipe0 = 0; + pipe1 = 0; + argstr = "[0, 0]"; + } + argstr = sprintf("[%d, %d]", pipe0, pipe1) } probe syscall.pipe32.return = kernel.function("sys32_pipe").return? { name = "pipe" + flags = 0; + if (@defined($fd)) { + fildes_uaddr = $fd + if (fildes_uaddr == 0) { + pipe0 = 0; + pipe1 = 0; + } else { + pipe0 = user_int(&$fd[0]); + pipe1 = user_int(&$fd[1]); + } + } else { + fildes_uaddr = 0; + pipe0 = 0; + pipe1 = 0; + } retstr = returnstr(1) } -- 2.43.5