Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Sep 2016 06:31:10 +0000 (UTC)
From:      Bruce Evans <bde@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r305864 - head/sys/ddb
Message-ID:  <201609160631.u8G6VAwE076232@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609160631.u8G6VAwE076232>