From: Jeff D. <jd...@ka...> - 2000-08-05 17:25:21
|
I've integrated Lars Brinkhoff's ptrace proxy into uml and checked it in to cvs. This is a clever bit of code that gets around the problem of gdb not being able to attach to threads which are under syscall trace by putting gdb under syscall trace and faking it into believing that it is really attached to a thread when it's really not. The way this works in uml is that when you want to start up gdb, send a SIGUSR1 to the tracing thread. It will fire up an xterm with a gdb running in it. Attach to whatever thread is currently running. If the idle thread is 'running' ps will show it as 'S', otherwise (as with a panic), the running thread will show up as 'R' like you'd expect. Limitations: You can't follow the kernel from one thread to another. Breakpoints set in one thread disappear in another. I'm working on these. Jeff |