Author: bde
Date: Fri Sep 16 06:31:10 2016
New Revision: 305864
URL: https://svnweb.freebsd.org/changeset/base/305864

Log:
  Statically initialize the run mode to the one that will become
  current on first entry.  This fixes a spurious "Stepping aborted"
  message when the first entry is for a breakpoint.
  
  Don't reset to the run mode to STEP_NONE when stopping, and remove
  STEP_NONE.  This mode was never really used, except transiently to
  mis-decide whether to print the message on first entry.

Modified:
  head/sys/ddb/db_run.c

Modified: head/sys/ddb/db_run.c
==============================================================================
--- head/sys/ddb/db_run.c       Fri Sep 16 05:33:08 2016        (r305863)
+++ head/sys/ddb/db_run.c       Fri Sep 16 06:31:10 2016        (r305864)
@@ -48,14 +48,13 @@ __FBSDID("$FreeBSD$");
 #include <ddb/db_break.h>
 #include <ddb/db_access.h>
 
-static int     db_run_mode;
-#define        STEP_NONE       0
 #define        STEP_ONCE       1
 #define        STEP_RETURN     2
 #define        STEP_CALLT      3
 #define        STEP_CONTINUE   4
 #define        STEP_INVISIBLE  5
 #define        STEP_COUNT      6
+static int     db_run_mode = STEP_CONTINUE;
 
 static bool            db_sstep_multiple;
 static bool            db_sstep_print;
@@ -150,7 +149,6 @@ db_stop_at_pc(int type, int code, bool *
 #endif
        if (db_run_mode != STEP_CONTINUE && !IS_SSTEP_TRAP(type, code)) {
            printf("Stepping aborted\n");
-           db_run_mode = STEP_NONE;
            return (true);
        }
 
@@ -203,7 +201,6 @@ db_stop_at_pc(int type, int code, bool *
                return (false); /* continue */
            }
        }
-       db_run_mode = STEP_NONE;
        return (true);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to