set argument
Kamal Prasad
kamalpr at gmail.com
Mon Mar 2 16:03:32 UTC 2020
Is it possible to include the header ind race so that I don’t replicate structure definition?
> On Mar 2, 2020, at 9:28 PM, Ash Gokhale <ashfixit at gmail.com> wrote:
>
>>
>>
>> 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);
> }
> _______________________________________________
> freebsd-dtrace at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace
> To unsubscribe, send any mail to "freebsd-dtrace-unsubscribe at freebsd.org"
More information about the freebsd-dtrace
mailing list