This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I tried to ptrace() a stopped process and send it SIGCONT; but gdb seems to die a horrible death of failed assertion at this. Is it fundamentally possible in Linux 2.6.17 to ptrace() a stopped process? This is rather important if, say, the process in question SIGSTOP'd itself as a knee-jerk to detected memory corruption and waited for a debugger. SIGSTOP will stop all threads in the thread group and can't be blocked, trapped, or ignored, so it's perfect for this. Drow pointed out to me that redhat does have a patch for this that never went in: http://www.redhat.com/archives/fedora-cvs-commits/2005-October/msg00448.html I was thinking of using this for spawning a child to spawn gdb and pausing the parent process when it catches a stack smash (__stack_chk_fail()) or a heap corruption (glibc double-free() and malloc() checks), but there are apparently other mechanisms. Still, gdb dies a horrible death when you try, and if it can get along fine it should. -- John Moser <john.r.moser@gmail.com>
Attachment:
signature.asc
Description: This is a digitally signed message part
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |