On Tue, Sep 30, 2008 at 08:46:23PM -0700, Adam Leventhal wrote:
> There's an existing RFE for an equivalent to mdb's ::print functionality
> that would pretty-print a datum according to its time. This would
> perhaps
> be a step towards what you're suggesting.
I could see something like:
pid$1:libsomelibrary:some_function:entry
{
self->some_item = copyin_expr("arg[0]->field1->field2->field3");
...
}
and the D *compiler* looking up the CTF for this and figuring out what
sequence of copyins to translace that into, including, possibly,
defining a useful struct type for self->some_item.
The bitness of the target would have to be known at compile-time, else
the compiler would have to generate DOF code for both, 32- and 64-bit
targets and branch at run-time according to which the running target is.
In fact, this wouldn't be very hard to do as a script layered atop
DTrace. One could start with John Levon's wonderful ctftoh program and
go from there.
Oh, BTW, it'd be nice if we built executables with CTF too...
(ctftoh was useful to me recently in manually writing some tricky
copyins with pointer dereferences.)
Nico
--
_______________________________________________
dtrace-discuss mailing list
[email protected]