Date: Sun, 2 Jan 2000 11:03:57 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Charles Sandmann cc: salvador AT inti DOT gov DOT ar, djgpp-workers AT delorie DOT com Subject: Re: GDB, DOS 6.22, CWSDPMI and Interrupts In-Reply-To: <9912302004.AA15575@clio.rice.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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 int main (void) { int rv; __asm__ __volatile__ ("pushf; popl %0" : "=g" (rv)); rv = (rv >> 9) & 1; printf ("%d\n", rv); return 0; }