lkml.org 
[lkml]   [1997]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Parent process switching on debugger abort in 2.0.3x
Matthias Urlichs wrote:
> Suppose, for instance, you kill your debugger, but the beast has written a
> few breakpoints into the debuggee. What to do? Right -- either you kill the
> child along with the parent (any fatal signal) or it's the debugger's job
> to clean up after itself and properly detach the child (any other signal).
>
> I think that's safer than to let the debuggee continue (no matter which
> parent). It's better to kill the poor thing now, while it's suspended
> someplace safe (hopefully) than to let it continue until it runs into
> something it can't handle.

The actual case that I ran into was with 'strace' which doesn't write
any
breakpoints into the target. With the 2.0.4 version of glibc, there is a
bug in the ptrace call with errno handling -- the result being that the
error code is always 1. This confuses strace which ends up exiting
(normally)
without properly ptrace_detach'ing from the target.

The simple change that I made essentially forced the ptrace_detach to
be done properly.

Philip
--
Philip Gladstone +1 617 487 7700
Raptor Systems, Waltham, MA http://www.raptor.com/

\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.367 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site