Rui Paulo
2010-Jun-09 16:19 UTC
[dtrace-discuss] How does DTrace find the proc_t definition?
Hi, While working on FreeBSD DTrace I came across this problem: dtrace: failed to compile script callout.d: "/usr/lib/dtrace/psinfo.d", line 53: operator -> cannot be applied to a forward declaration: no struct proc definition is available psinfo.d is FreeBSD specific (we don''t rely on procfs). Line 53 is: translator psinfo_t < struct proc *T > { .. The error message is clear, but the way to fix it isn''t clear to me right now. How does Solaris DTrace find the ''proc_t'' struct in /usr/lib/dtrace/procfs.d ? Thanks, -- Rui Paulo
James Carlson
2010-Jun-09 16:40 UTC
[dtrace-discuss] How does DTrace find the proc_t definition?
Rui Paulo wrote:> Hi, > While working on FreeBSD DTrace I came across this problem: > > dtrace: failed to compile script callout.d: "/usr/lib/dtrace/psinfo.d", line 53: operator -> cannot be applied to a forward declaration: no struct proc definition is available > > psinfo.d is FreeBSD specific (we don''t rely on procfs). Line 53 is: > > translator psinfo_t < struct proc *T > { > .. > > The error message is clear, but the way to fix it isn''t clear to me right now. > > How does Solaris DTrace find the ''proc_t'' struct in /usr/lib/dtrace/procfs.d ?It gets it from the kernel''s symbol table using CTF. -- James Carlson 42.703N 71.076W <carlsonj at workingcode.com>
Rui Paulo
2010-Jun-09 17:11 UTC
[dtrace-discuss] How does DTrace find the proc_t definition?
On 9 Jun 2010, at 17:40, James Carlson wrote:> Rui Paulo wrote: >> Hi, >> While working on FreeBSD DTrace I came across this problem: >> >> dtrace: failed to compile script callout.d: "/usr/lib/dtrace/psinfo.d", line 53: operator -> cannot be applied to a forward declaration: no struct proc definition is available >> >> psinfo.d is FreeBSD specific (we don''t rely on procfs). Line 53 is: >> >> translator psinfo_t < struct proc *T > { >> .. >> >> The error message is clear, but the way to fix it isn''t clear to me right now. >> >> How does Solaris DTrace find the ''proc_t'' struct in /usr/lib/dtrace/procfs.d ? > > It gets it from the kernel''s symbol table using CTF.Ok, thanks. Regards, -- Rui Paulo