On Wed, Jun 25, 2008 at 12:30:03PM -0400, Chris Moller wrote: >> Extending ptrace seems like a sad idea. If Linux is going to grow a >> new userspace-accessible debug interface, can't it go in /proc or >> something? >> > > Actually, that's exactly what utracer does. It's a module that creates > an entries under /proc (/proc/utracer/*) that client apps can > read()/write()/ioctl() to access utracer capabilities. Maybe the coolest > thing about utracer is that it gave every app its own /proc entry that > blocked on read() until an app-defined "interesting" thing happened: > specified signals, task state changes, specified syscall entry/exit, all > the stuff accessible through utrace report_* callbacks.
So, how'd it demise in a way that a syscall interface would be any better? This sounds like the right way to do it (barring scaling details; maintining one fd per thread becomes impractical). Side note: every time someone talks about a ptrace replacement I suggest stealing one from Solaris :-) It seems one of the areas that Sun thought out properly, although in my limited brushes with it in the last year I'm becoming less convinced of that. -- Daniel Jacobowitz CodeSourcery