delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/01/02/05:04:43

Date: Sun, 2 Jan 2000 11:03:57 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
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: <Pine.SUN.3.91.1000102110330.1710R-100000@is>
MIME-Version: 1.0
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

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019