Date: Mon, 2 Mar 2020 21:37:34 +0530 From: Kamal Prasad <kamalpr@gmail.com> To: Ash Gokhale <ashfixit@gmail.com> Cc: kamalp@acm.org, freebsd-dtrace@freebsd.org Subject: Re: set argument Message-ID: <0852C183-1EC6-4B19-A947-65C8669708C5@gmail.com> In-Reply-To: <CAHpe%2B0ZxJiy3MXnRPQqDDv7=%2By0LPwoCnE6Tgg6bYVYwZs7MXQ@mail.gmail.com> References: <CAK=yUGL8Ls5V4E=ucPJ9Unvf_UhDDngU7ue%2BkeRL3Zx2khJw5Q@mail.gmail.com> <CAHpe%2B0ZxJiy3MXnRPQqDDv7=%2By0LPwoCnE6Tgg6bYVYwZs7MXQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Is it possible to include the header ind race so that I don=E2=80=99t = replicate structure definition? > On Mar 2, 2020, at 9:28 PM, Ash Gokhale <ashfixit@gmail.com> wrote: >=20 >>=20 >>=20 >> How does dtrace access the argument type declarations when we define = a new >> SDT? eg:- I define an SDT that has arg0 as (struct mystrust*) >>=20 >> I have defined in my proprietary header file >> --------------- >> ... >>=20 >> I want my probe to be able to access the typedeffor struct abc and = struct >>=20 >>=20 > To access yourSDT arg struct as a cooked object you may have to = include > fragments of your header including the srtuct in your dtrace script = and > perhaps a copyin() to get it into kernel memory: >=20 > #!/sbin/dtrace -s > struct { > int code; > void* location; > char* description > } err_desc_s; >=20 > pid$target:::myERRORprobe > { > this->f =3D(struct err_desc_s*) copyin( arg1, sizeof ( err_desc_s)); > print( this->f); > } > _______________________________________________ > freebsd-dtrace@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace > To unsubscribe, send any mail to = "freebsd-dtrace-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0852C183-1EC6-4B19-A947-65C8669708C5>