Read return struct of kernel trace

From: Farhan Khan <farhan_at_farhan.codes>
Date: Sun, 20 Feb 2022 06:21:38 UTC
Hi all,

I am trying to instrument the return value of usbd_get_endpoint(), which is a "struct usb_endpoint" defined in /usr/src/sys/dev/usb/usbdi.h. I would like to print out the contents of the struct in a human-readable way. To that end, I am trying to include the header file into my dtrace script but keep getting error messages from dtrace.
My script is as follows:
------------
#!/usr/sbin/dtrace -qvs

#include <dev/usb/usbdi.h>

fbt::usbd_get_endpoint:return
{
printf("Exit %d\n", arg0);
}
------------
[farhan@freebsddev ~]$ sudo dtrace -C ./usbd_get_endpoint.d 
dtrace: no probes specified
[farhan@freebsddev ~]$ sudo dtrace -sC ./usbd_get_endpoint.d 
dtrace: failed to open C: No such file or directory
[farhan@freebsddev ~]$ sudo dtrace ./usbd_get_endpoint.d 
dtrace: no probes specified

I am not certain how to resolve this issue. Also, if it is not necessary to include the header to print out the structure, please suggest an alternative method.
Thank you!
--
Farhan Khan