Messages in this thread | | | Date | Wed, 27 Jan 1999 11:03:02 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: [PATCH] for 2 kernel bugs due to ptrace_attach() side effects |
| |
On Wed, 27 Jan 1999, Eric PAIRE wrote: > > Now that the 2.2.0 is output, perhaps you will have some time to have a look > at the fixes for the 2 bugs I found last summer when I finalized the gdb > fixes to debug Linux multithreaded applications.
I didn't like the approach then, and I don't like it now. I don't believe that adding another child list and a "nchildren" counter is the right solution. The solution makes the _common_ case of not having a debugger the more complex one, as far as I can see.
If anything, I think that the solution would be to not do the silly re-parenting for debugging at all, so that the child list is always the original one - and that _debugging_ would then use a separate list. That, I feel, puts the onus where it belongs: in the debugging code rather than on the normal parenting code. It would also get rid of p_opptr, because it would no longer be needed (you'd instead have a "p_debugptr" pointing to the debugging process, along with a "debuglist" that contains the list of processes debugged by that debugger).
Think of debugging as a "secondary parent" thing, which it really is, and if you think the current re-parenting is buggy (it certainly has some nasty side effects, I'll agree), then you should just get rid of it rather than add workaround code.
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |