Subject: Re: ptrace(2) + nathanw_sa LWPs
To: Giles Lean <email@example.com>
From: Andrew Cagney <firstname.lastname@example.org>
Date: 12/07/2001 22:39:22
> Is it interesting to compare what other operating systems have done?
> HP-UX introduced ttrace(2) to overcome the limitations of ptrace(2)
> with multithreaded processes, and HP contributed changes to gdb to
> enable it to use ttrace(2).
> I don't know how Solaris supports debugging multithreaded processes
> as its ptrace(2) manual page doesn't refer to threads at all.
The other source of info is current GDB sources. Look at the
src/gdb/*th*.c files. They tend to include good commentry on what went
wrong with the various thread models.
I would advice against making ptrace() state full - it will make
debugging the debugger a right pain.
You should also review signal() and wait() as they, and ptrace() can end
up with some pretty hairy interactions.
Finally, can I suggest the mailing list email@example.com - I know
people there will be willing to tell you their war stories.
PS: Having all threads stop is a very good first move.
PPS: I know zilch about debugging threads so please don't ask me :-)
PPPS: Sun has ``libthread_db''.