Debugging Linux Kernel using SystemTap Part6 - Writing Probes for SystemCall

Syntax for writing probes for System Call:

probe syscall.<nameofsystemcall> {

}

E.g. of open systemcall:

probe syscall.open
{
    printf("%s(%d) open (%s)\n", execname(), pid(), argstr)
}

execname() - prints the name of current process
pid() - prints the process id of the current process
argstr - pretty-printed form of the entire argument list, without parenthesis

O/P:



Comments

Popular posts from this blog

bb.utils.contains yocto

Difference between RDEPENDS and DEPENDS in Yocto

PR, PN and PV Variable in Yocto