Re: 2.1.111 simple enhancement/fix for safe debugging

Linus Torvalds (
Wed, 29 Jul 1998 12:32:34 -0700 (PDT)

On Wed, 29 Jul 1998, Eric Paire wrote:
> Yet another bug using GDB on i386 Linux systems (which should be the same
> for other processors managing the PTRACE_SINGLESTEP ptrace request):

The patch looks a bit strange - I'm sure you're fixing a bug, but it also
looks like a fairly unmaintainable way of doing so.

I'd much prefer an approach where you leave the TF bit completely alone,
and then when you get a debug trap you look at whether the process is
being debugged or not, and if not you just ignore the trap and clear TF on
return. What way it's much more obvious at least to me what's up (call it
"lazy TF clearing" ;)



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at