Date: Wed, 24 Jul 2013 11:13:20 -0700 From: Yuri <yuri@rawbw.com> To: FreeBSD Hackers <hackers@freebsd.org> Subject: DTrace copyin with struct doesn't work? Message-ID: <51F01940.2020402@rawbw.com>
next in thread | raw e-mail | index | archive | help
This simple .d script fails: ---script begin--- #!/usr/sbin/dtrace -s struct my_args { int ii; }; fbt::sys_select:entry { printf("sys_select %i", ((struct my_args*)copyin(arg1, sizeof (struct my_args)))->ii); } ---script end--- dtrace: error on enabled probe ID 1 (ID 33598: fbt:kernel:sys_select:entry): invalid address (0xffffff82ff0799d8) in action #1 at DIF offset 40 dtrace: error on enabled probe ID 1 (ID 33598: fbt:kernel:sys_select:entry): invalid address (0xffffff82fefb19d8) in action #1 at DIF offset 40 Function sys_select is defined in kern/sys_generic.c: int sys_select(struct thread *td, struct select_args *uap) arg1 in DTrace script should correspond to uap argument of sys_select, and dereferencing should always produce an int. Yuri
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51F01940.2020402>