ntdll: Fix SIGTRAP handling
hat at tesarici.cz
Mon Mar 27 08:32:09 CST 2006
Dne 03/27/06 v 16:05:15 (+0200), Alexandre Julliard napsal(a):
> Petr Tesarik <hat at tesarici.cz> writes:
> > No, Windows need not do things like that, because the Windows kernel
> > knows very well, whether it got INT1 or INT3... Some UNIX kernels do
> > not give us that information reliably.
> I'm afraid it's not acceptable to do things differently, especially
> not things like the checking of the previous instruction that may
> cause extra exceptions. Also stuff like the clearing of DR6 needs a
> test case, that's something that's visible from the application.
I don't want to cause unnecessary conflicts, so I _have_ written a
test case, where Wine does a lot of application-visible things
differently. Anyway, I've provided an improvement which only needs to
do such things as a fallback on platforms, where the cause of the
SIGTRAP cannot be determined easily.
In my opinion, the solution is reasonable because if any application
is really interested in the DR6 register (i.e. it is a debugger), it
will clear the status register (DR6) anyway, since the processor never
clears the bits and unless you clear them manually, the register gets
I wonder why you haven't been bothered by the fact that the current
implementation silently drops the TF bit, which is even worse! :O
More information about the wine-devel