I have a dumb question, I wanted to understand the source code flow with the help of system tap, for this i was trying to access a local variable using kernel.statement probe function, it displays all the other variable except pointers.
probe module("Module_Path/proc_rw.ko").statement("my_write@Module Src Path/proc_rw.c+9")
{
printf("local = %s\n", $$locals)
}
Module Code :
static ssize_t my_write(struct file *f, const char __user *buf, size_t len, loff_t *off)
{
pid_t pid;
int ret;
struct task_struct *task_local;
int *i;
ret=copy_from_user(c, buf, len);
i=&ret;
pid=simple_strtol(buf, NULL, 10);
task_local=pid_task(find_vpid(pid), PIDTYPE_PID);
return len;
}
When i execute above stap code, it returns,
local = pid=0xf98 ret=0x0 task_local=? i=?
Any help to understand why task_local and i values are not printed would be helpful.
Regards, Yash.