svn commit: r269982 - head/sys/ddb

Warner Losh imp at FreeBSD.org
Thu Aug 14 16:01:52 UTC 2014


Author: imp
Date: Thu Aug 14 16:01:51 2014
New Revision: 269982
URL: http://svnweb.freebsd.org/changeset/base/269982

Log:
  ins is only set and unused, but only when we're not doing software
  single stepping. Only set it when we're doing that by bending
  style(9) rules a little to avoid even worse #ifdef soup.

Modified:
  head/sys/ddb/db_run.c

Modified: head/sys/ddb/db_run.c
==============================================================================
--- head/sys/ddb/db_run.c	Thu Aug 14 16:01:46 2014	(r269981)
+++ head/sys/ddb/db_run.c	Thu Aug 14 16:01:51 2014	(r269982)
@@ -188,14 +188,14 @@ db_restart_at_pc(watchpt)
 	if ((db_run_mode == STEP_COUNT) ||
 	    (db_run_mode == STEP_RETURN) ||
 	    (db_run_mode == STEP_CALLT)) {
-	    db_expr_t		ins;
-
 	    /*
 	     * We are about to execute this instruction,
 	     * so count it now.
 	     */
-
-	    ins = db_get_value(pc, sizeof(int), FALSE);
+#ifdef	SOFTWARE_SSTEP
+	    db_expr_t		ins =
+#endif
+	    db_get_value(pc, sizeof(int), FALSE);
 	    db_inst_count++;
 	    db_load_count += inst_load(ins);
 	    db_store_count += inst_store(ins);


More information about the svn-src-head mailing list