On Fri, Jun 5, 2009 at 9:48 AM, Danny Webster<dannywebs...@gmail.com> wrote: > Hi, > > This may be more suited to a general D mailing list, but - i'm trying to > analyse LWP activity on a system, and faltering at the first hurdle. The > lwp_create() call is prototyped as: > > klwp_t * lwp_create(void (*proc)(), caddr_t arg, size_t len, proc_t *p, int > state, int pri, const k_sigset_t *smask, int cid, id_t lwpid) > > This is currently the only call i'm probing, but I am having trouble > accessing the proc_t structure; specifically it's members, such as p_ppid for > instance. > > The error I am getting is: > > "operator -> cannot be applied to a forward declaration: no struct proc_t > definition is available" > > .. and the code I have so far is: > > fbt:genunix:lwp_create:entry > { > self->ppid = ((struct proc_t *)arg3)->p_ppid; > } > > Can anyone kindly shed some light on the errors with the cast please?
It looks like the type of the argument is "proc_t *" and not "struct proc_t *". You might also try "args[3]", which gives you the typed argument. Chad _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org