This is the mail archive of the 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]

ptrace() a stopped process?

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:

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

John Moser <>

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]