From 7189a12dcef9b1c515e052f9d8a53e53a8d58b73 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 19 Mar 2010 11:32:22 +0100 Subject: Use @defined() in syscall.pipe to select whether fildes_uaddr is available. * tapset/aux_syscalls.stp (syscall.pipe): Remove architecture dependent probe definitions. Newer gcc make $fildes available on more arches. Use @defined($fildes) to select on which ones. --- tapset/syscalls2.stp | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/tapset/syscalls2.stp b/tapset/syscalls2.stp index 2cae133c..aba4be51 100644 --- a/tapset/syscalls2.stp +++ b/tapset/syscalls2.stp @@ -291,32 +291,22 @@ probe syscall.personality.return = kernel.function("SyS_personality").return !, # asmlinkage int # sys_pipe(unsigned long __user * fildes) # -%(arch == "x86_64" %? -# x86_64 gcc 4.1 problem probe syscall.pipe = kernel.function("SyS_pipe").call !, - kernel.function("sys_pipe").call -{ - name = "pipe" - argstr = "" -} -%: -probe syscall.pipe = kernel.function("SyS_pipe").call !, -%( arch == "ia64" %? kernel.function("sys_ia64_pipe").call ?, -%) kernel.function("sys_pipe").call { name = "pipe" -%( arch == "ia64" %? -# ia64 just returns value directly, so fake the arguments - fildes_uaddr = 0 - argstr = "[0, 0]" -%: - fildes_uaddr = $fildes - argstr = _fildes_u($fildes) -%) + if (@defined($fildes)) + { + fildes_uaddr = $fildes + argstr = _fildes_u(fildes_uaddr) + } + else + { + fildes_uaddr = 0; + argstr = "" + } } -%) probe syscall.pipe.return = kernel.function("SyS_pipe").return !, %( arch == "ia64" %? kernel.function("sys_ia64_pipe").return ?, -- cgit