Google luky.org euqset.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


$B$3$N>pJs$,$"$J$?$NC5$7$F$$?$b$N$+$I$&$+A*Br$7$F$/$@$5$!#(B
yes/$B$^$5$K$3$l$@!*(B   no/$B0c$&$J$!(B   part/$B0lIt8+$D$+$C$?(B   try/$B$3$l$G;n$7$F$_$k(B

$B$"$J$?$,C5$7$F$$?>pJs$O$I$N$h$&$J$3$H$+!"$4<+M3$K5-F~2<$5$!#FC$K!V$^$5$K$3$l$@!*!W$H8@$&>l9g$O5-F~$r$*4j$$7$^$9!#(B
$BNc(B:$B!VJ#?t$N%^%7%s$+$i(BCATV$B7PM3$G(Bipmasquerade$B$rMxMQ$7$F(BWeb$B$r;2>H$7$?$>l9g$N@_Dj$K$D$$F!W(B
Follow-Ups: References: