On Wed, Oct 12, 2005 at 07:49:01PM +0100, Frank Hofmann - Solaris Sustaining wrote: > Btw, is there an existing RFE against mdb asking to be able to > use "::offsetof" and "::sizeof" in arithmetic expressions, to > get better array handling support ? > > I.e. I'd like to look at specific elements of arrays, something > like: > > *devnamesp+(20*::sizeof(struct devnames))::print struct devnames > > Or better: "*devnamesp[20]::print struct devnames", with typegraph > help :)
You can just do: > devnamesp::print [20] { [20].dn_name = 0xffffffff82a46ba0 "hci1394" ... } The main thing that has been talked about is '::deval', '::dmap', or '::dprint', which would let you use D (as in Dtrace) expressions. It might look something like: > ::dprint '`devnamesp[20]->dn_flags & 0x100' 0x100 > Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development