The nd_syscalls tapset is meant to run with no debuginfo, so using a
@cast into a module type defeats the purpose. We should use a @cast
with a header name instead, so debuginfo is generated.
* tapset/i386/nd_syscalls.stp (nd_syscall.sigaltstack): Get the pt_regs
type definition from "kernel<asm/ptrace.h>".
name = "sigaltstack"
// ussp = %( kernel_vr < "2.6.25" %? $ebx %: %( kernel_vr < "2.6.30" %? $bx %: $regs->bx %) %)
// NB: no asmlinkage()
- ussp = %( kernel_vr < "2.6.30" %? ulong_arg(1) %: @cast(ulong_arg(1), "pt_regs")->bx %)
+ ussp = %( kernel_vr < "2.6.30" %? ulong_arg(1) %:
+ @cast(ulong_arg(1), "pt_regs", "kernel<asm/ptrace.h>")->bx %)
argstr = sprintf("%p", ussp)
}
probe nd_syscall.sigaltstack.return = kprobe.function("sys_sigaltstack").return