X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-Id: <5.0.2.1.2.20020207111510.009e0400@pop.gmx.net> X-Sender: martinSteuer AT gmx DOT de@pop.gmx.net X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Date: Thu, 07 Feb 2002 11:37:06 +0100 To: djgpp AT delorie DOT com From: Martin Steuer Subject: Strange gdb behaviour Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Reply-To: djgpp AT delorie DOT com Hello everybody! When I was debugging a program with a loop I set a breakpoint in it and found that the interrupts where erroneously disabled (the loop could only be left by pressing a specific key). I could verify that only the interrupts where disabled, the main program execution was going on. At first I thought it would be a problem in my program, but at the end I could reduce it to a really simple loop, here it is: #include #include int main() { char key = 0; while (key != 27) { // __asm__ __volatile__ ("sti"); if (kbhit()) key = getch(); } return 0; } The interrupts get disabled whenever I set a breakpoint somewhere, it can be on EVERY line. If I uncomment the sti instruction it works. The problem only occurs under pure dos, so I can imagine that it might be the result of a problem in cwsdpmi too. I'm using gcc v 2.952, gdb v 5.0 and cwsdpmi reports v0.9+ (r5). Any help would be nice, also if one could check this under different versions it would be good. Thanks alot!