was stopping on every entry/exit point
authorkbongers <kbongers@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 12 Aug 2001 17:41:26 +0000 (17:41 +0000)
committerkbongers <kbongers@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sun, 12 Aug 2001 17:41:26 +0000 (17:41 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1137 4a8a32a2-be11-0410-ad9d-d568d2c75423

debugger/mcs51/cmd.c

index 7c0b474bd9081c430dca82b20ab53f18d35ec23a..3d43bfa8f2128b346c42242df83feef7e1f0e2aa 100644 (file)
@@ -576,6 +576,8 @@ void simGo (unsigned int gaddr)
     unsigned int addr ;
     context *ctxt;
     int rv;
+    static int initial_break_flag = 0;
+
  top:    
     addr = simGoTillBp (gaddr);
 
@@ -594,7 +596,14 @@ void simGo (unsigned int gaddr)
        if not then we continue with the execution 
        of the program */
     if (!rv) {
-      fprintf(stdout, "Stopping at non-user breakpoint\n");
+      if (!initial_break_flag) {
+        initial_break_flag = 1;  // kludge to stop only at first run
+        fprintf(stdout, "Stopping at entry.  You can now list and set breakpoints\n");
+      }
+      else {
+               gaddr = -1;
+               goto top ;
+      }
 
 // notes: kpb
 // I took this out, after running "run" it would just keep re-running