]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
STOP tracing update.
authorToni Wilen <twilen@winuae.net>
Sat, 14 Jul 2018 18:48:58 +0000 (21:48 +0300)
committerToni Wilen <twilen@winuae.net>
Sat, 14 Jul 2018 18:48:58 +0000 (21:48 +0300)
newcpu.cpp

index 018ad399db1e7e3bc684cb845000ea6957dda05c..6176bf7363bdc3b70b7219ad7afe72f6ed8e8798 100644 (file)
@@ -4690,6 +4690,8 @@ void doint (void)
 
 static int do_specialties (int cycles)
 {
+       bool stopped_debug = false;
+
        if (regs.spcflags & SPCFLAG_MODE_CHANGE)
                return 1;
        
@@ -4888,13 +4890,23 @@ static int do_specialties (int cycles)
                set_special (SPCFLAG_INT);
        }
 
-       if (regs.spcflags & SPCFLAG_BRK) {
+       if ((regs.spcflags & SPCFLAG_BRK) || stopped_debug) {
                unset_special(SPCFLAG_BRK);
 #ifdef DEBUGGER
+               if (stopped_debug && !regs.stopped) {
+                       debugger_active = 1;
+                       stopped_debug = false;
+               }
                if (debugging) {
-                       debug();
-                       if (regs.stopped)
+                       if (!stopped_debug)
+                               debug();
+                       if (regs.stopped) {
+                               stopped_debug = true;
+                               if (debugging) {
+                                       debugger_active = 0;
+                               }
                                goto isstopped;
+                       }
                }
 #endif
        }