]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Do not exit CPU stopped state when in debugger.
authorToni Wilen <twilen@winuae.net>
Sun, 23 Nov 2014 15:20:02 +0000 (17:20 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 23 Nov 2014 15:20:02 +0000 (17:20 +0200)
debug.cpp
newcpu.cpp

index 241483ec1de69a3878d342340ab14bab40d4a764..954d176f02ca58ba39608e27f34b2545ea6129a1 100644 (file)
--- a/debug.cpp
+++ b/debug.cpp
@@ -4578,6 +4578,12 @@ static void addhistory (void)
        }
 }
 
+static void debug_continue(void)
+{
+       set_special (SPCFLAG_BRK);
+}
+
+
 void debug (void)
 {
        int i;
@@ -4683,7 +4689,7 @@ void debug (void)
                                }
                        }
                        if (!bp) {
-                               set_special (SPCFLAG_BRK);
+                               debug_continue();
                                return;
                        }
                }
@@ -4701,7 +4707,7 @@ void debug (void)
        if (skipaddr_doskip > 0) {
                skipaddr_doskip--;
                if (skipaddr_doskip > 0) {
-                       set_special (SPCFLAG_BRK);
+                       debug_continue();
                        return;
                }
        }
@@ -4744,8 +4750,7 @@ void debug (void)
                do_skip = 1;
        if (do_skip) {
                set_special (SPCFLAG_BRK);
-               m68k_resumestopped ();
-               debugging = 1;
+               debugging = -1;
        }
        resume_sound ();
        inputdevice_acquire (TRUE);
index a3ef61863acb83d24af99c477a48aebc4b7f41ab..f6c41afbe141b692b9362aaa38924cca5fbd9c74 100644 (file)
@@ -3500,9 +3500,9 @@ static int do_specialties (int cycles)
                unset_special (SPCFLAG_TRAP);
                Exception (3);
        }
-
        while ((regs.spcflags & SPCFLAG_STOP) && !(regs.spcflags & SPCFLAG_BRK)) {
 
+isstopped:
                if (uae_int_requested || uaenet_int_requested) {
                        INTREQ_f (0x8008);
                        set_special (SPCFLAG_INT);
@@ -3619,8 +3619,11 @@ static int do_specialties (int cycles)
        if (regs.spcflags & SPCFLAG_BRK) {
                unset_special(SPCFLAG_BRK);
 #ifdef DEBUGGER
-               if (debugging)
+               if (debugging) {
                        debug();
+                       if (regs.stopped)
+                               goto isstopped;
+               }
 #endif
        }