* ptrace() a stopped process?
@ 2006-07-17 19:37 John Moser
2006-07-17 21:11 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: John Moser @ 2006-07-17 19:37 UTC (permalink / raw)
To: gdb
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ptrace() a stopped process?
2006-07-17 19:37 ptrace() a stopped process? John Moser
@ 2006-07-17 21:11 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2006-07-17 21:11 UTC (permalink / raw)
To: John Moser; +Cc: gdb
On Mon, Jul 17, 2006 at 03:19:58PM -0400, John Moser wrote:
> 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
They are invited to submit it :-) Jeff, are you out there?
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-07-17 19:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-17 19:37 ptrace() a stopped process? John Moser
2006-07-17 21:11 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox