summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2014-08-14 16:01:51 +0000
committerimp <imp@FreeBSD.org>2014-08-14 16:01:51 +0000
commitc1d89db3fb3a5c6a32dfaf04bc9d70846783a86d (patch)
tree968a8519b5a99fb2ee80191bac3f2bd4de0c7fb8 /sys/ddb
parentcffc99a418cae163cad01a65eb1b07791d638f98 (diff)
downloadFreeBSD-src-c1d89db3fb3a5c6a32dfaf04bc9d70846783a86d.zip
FreeBSD-src-c1d89db3fb3a5c6a32dfaf04bc9d70846783a86d.tar.gz
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.
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_run.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/ddb/db_run.c b/sys/ddb/db_run.c
index f0b31bf..897dc3d 100644
--- a/sys/ddb/db_run.c
+++ b/sys/ddb/db_run.c
@@ -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);
OpenPOWER on IntegriCloud