Messages in this thread | | | Date | Fri, 31 Dec 2004 09:30:04 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: ptrace single-stepping change breaks Wine |
| |
On Fri, 31 Dec 2004, Davide Libenzi wrote: > > I don't think that the Wine problem resolution is due to the POPF > instruction handling. Basically Linus patch does a nice cleanup plus POPF > handling, so maybe the patch can be split.
The popf part is very nice in that it allows you to single-step and debug this thing.
The fact is, I can't debug Wine. The code-base is just too alien for me, so to debug this thing I needed to come up with a silly example of TF usage, and try to debug _that_ instead as if it were something unknown (ie debugging by knowing what the program does is a no-no, since that would have defeated the whole exercise).
And handlign "popf" correctly really was the only sane way to debug it, anything else would never have worked in a real-life debugging situation. It's easy enough to say "well, just do it by hand", but that's not practical when you debug with "si 1000" to try to pinpoint the behaviour a bit.
And clearly my debuggability exercise seem to have worked, since the end result apparently ended up doing the right thing for Wine.
This is why debuggability is important. I realize that people may think I'm inconsistent (since I abhor kernel debuggers), but while _I_ abhor debuggers, I also think that the primary objective of an operating system is to make easy things easy, and hard things possible, so while I don't much like debuggers, I consider it a fundamental failure if the kernel doesn't have proper support for them.
So I think it's worth splitting out the "popf" part of the patch, but even if that one doesn't actually matter for Warcraft, I'd put it in just so that we have a state where we're _supposed_ to be able to debug things with TF in them. Just having the mental expectation that things like that should work is important - otherwise we'll eventually end up having some other subtle problem with TF handling.
Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |