On Tue, Jul 12, 2011 at 05:52:09PM +0200, Otto Moerbeek wrote:
> The diff below implements utrace(2), a syscall to introduce data into
> a ktrace stream from a userland program.
>
> The interface is taken from netbsd, freebsd also has a utrace(2)
> syscall, but lacks the label argument.
>
> You could uise this as a debugging aid, to get tarce information
> intermixed with sysclal info, or set more specific tracepoint and only
> see the utrace records.
>
> Do we want this? If so, this should be reviewed and tested. And a man
> page for utrace(2) should be written.
>
> Output of utrace("It is I", "some data", 10) looks like:
>
> 24413 a.out CALL utrace(0x500a09,0x5009ff,0xa)
> 24413 a.out USER It is I: 10 bytes
> "some data\0"
> 24413 a.out RET utrace 0
I like the functionality. Can we have a printf-like frontend for the
call as well?
--
Ariane