Re: Parent process switching on debugger abort in 2.0.3x

Philip Gladstone (philip@raptor.com)
Thu, 17 Jul 1997 10:00:36 -0400


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/