wkz / ply

Light-weight Dynamic Tracer for Linux
https://wkz.github.io/ply
GNU General Public License v2.0
402 stars 156 forks source link

What's the reason about this error: syntax error, unexpected IDENT, expecting ')' ? #30

Closed zhaoyuxing18 closed 3 years ago

zhaoyuxing18 commented 3 years ago

I want to trace kernel struct and derenference some elements and I've tried the following: cat test.ply

!/sbin/ply

include <net/sock.h>

kprobe:tcp_set_state { printf("%v %v %v %v\n", pid, comm, str(((struct sock *)arg0)->sk_state), arg1); }

but there's an error: image

wkz commented 3 years ago

It would be great if your example worked, alas you are trying to do multiple things that are currently not supported by ply: