Mail Archives: djgpp-workers/2000/01/02/05:04:43
On Thu, 30 Dec 1999, Charles Sandmann wrote:
> Since CWSDPMI should be able to restore the
> flag since it's at IOPL=3, maybe it's a CWSDPMI bug, maybe a logic bug in
> dbgcom.c.
It could be a CWSDPMI bug, since it doesn't happen with QDPMI. The
simple test program posted by Salvador (reproduced below) prints 1
when run under QDPMI inside a debugger, but 0 when CWSDPMI is the
host.
What I cannot figure out is the difference(s) between what CWSDPMI
does when a program runs under a debugger and outside a debugger.
dbgcom.c hooks Int 31h, so there's a user handler involved as far as
CWSDPMI is concerned, but how should that matter? Charles, any
guidance where to look?
Also, can someone please test the program below with different DPMI
hosts, like 386Max or the one in DR-DOS? (I know that the problem
doesn't happen on Windows, but Windows is too special to be
conclusive.)
#include <stdio.h>
int main (void)
{
int rv;
__asm__ __volatile__ ("pushf; popl %0" : "=g" (rv));
rv = (rv >> 9) & 1;
printf ("%d\n", rv);
return 0;
}
- Raw text -