Date: Mon, 2 Mar 2020 10:58:16 -0500 From: Ash Gokhale <ashfixit@gmail.com> To: kamalp@acm.org Cc: freebsd-dtrace@freebsd.org Subject: Re: set argument Message-ID: <CAHpe%2B0ZxJiy3MXnRPQqDDv7=%2By0LPwoCnE6Tgg6bYVYwZs7MXQ@mail.gmail.com> In-Reply-To: <CAK=yUGL8Ls5V4E=ucPJ9Unvf_UhDDngU7ue%2BkeRL3Zx2khJw5Q@mail.gmail.com> References: <CAK=yUGL8Ls5V4E=ucPJ9Unvf_UhDDngU7ue%2BkeRL3Zx2khJw5Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>
>
> 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*)
>
> I have defined in my proprietary header file
> ---------------
> ...
>
> I want my probe to be able to access the typedeffor struct abc and struct
>
>
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:
#!/sbin/dtrace -s
struct {
int code;
void* location;
char* description
} err_desc_s;
pid$target:::myERRORprobe
{
this->f =(struct err_desc_s*) copyin( arg1, sizeof ( err_desc_s));
print( this->f);
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHpe%2B0ZxJiy3MXnRPQqDDv7=%2By0LPwoCnE6Tgg6bYVYwZs7MXQ>
