www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/28/20:14:38

Sender: root AT delorie DOT com
Message-ID: <3869222A.2E0F8669@inti.gov.ar>
Date: Tue, 28 Dec 1999 17:48:42 -0300
From: salvador <salvador AT inti DOT gov DOT ar>
Organization: INTI
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.38 i686)
X-Accept-Language: es-AR, en, es
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: GDB, DOS 6.22, CWSDPMI and Interrupts
Reply-To: djgpp AT delorie DOT com

Hi All:

  I have a big problem using gdb (4.16 or RHIDE with gdb 4.17 or 4.18 inside)
under DOS 6.22 (and CWSDPMI as DPMI host).
  The program I'm trying to debug runs ok if I run it outside the debugger. But
if I run the program inside the debugger it just freeze.
  After some hard research I found the reason: interrupts are disabled!
  Does anybody know why?
  I don't think the problem is inside the program because the program runs ok if
I don't use the debugger.
  One strange detail is that all works OK when using WinCrap95.
  Another interesting thing: if my program calls periodically to any real mode
service all works OK. I think that's because interrupts aren't disabled when we
are in real mode.
  Interrupts are disabled in the first line of main().
  Here is the smallest code needed to show the problem:

#include <stdio.h>
int main(int argc, char *argv[])
{
 int rv;
   __asm__ __volatile__("pushf; popl %0" : "=g" (rv));
 rv = (rv>>9) & 1;
 printf("%d\n",rv);
 return 0;
}

  Running it from the prompt prints 1 but running from gdb prints 0.

SET

--
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Visit my home page: http://welcome.to/SetSoft or
http://www.geocities.com/SiliconValley/Vista/6552/
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
                    set AT ieee DOT org set-soft AT bigfoot DOT com
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013



- Raw text -


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