Module Name: src
Committed By: mrg
Date: Thu May 21 08:23:22 UTC 2015
Modified Files:
src/sys/ddb: db_command.c
Log Message:
only call the on-enter commands if we're not recursing.
avoids having a fault in the on-enter commands repeating.
To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 src/sys/ddb/db_command.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/ddb/db_command.c
diff -u src/sys/ddb/db_command.c:1.144 src/sys/ddb/db_command.c:1.145
--- src/sys/ddb/db_command.c:1.144 Sun Feb 8 19:41:39 2015
+++ src/sys/ddb/db_command.c Thu May 21 08:23:22 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: db_command.c,v 1.144 2015/02/08 19:41:39 christos Exp $ */
+/* $NetBSD: db_command.c,v 1.145 2015/05/21 08:23:22 mrg Exp $ */
/*
* Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.144 2015/02/08 19:41:39 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.145 2015/05/21 08:23:22 mrg Exp $");
#ifdef _KERNEL_OPT
#include "opt_aio.h"
@@ -549,8 +549,13 @@ db_command_loop(void)
db_recover = &db_jmpbuf;
(void) setjmp(&db_jmpbuf);
- /* Execute default ddb start commands */
- db_execute_commandlist(db_cmd_on_enter);
+ /*
+ * Execute default ddb start commands only if this is the
+ * first entry into DDB, in case the start commands fault
+ * and we recurse into here.
+ */
+ if (!savejmp)
+ db_execute_commandlist(db_cmd_on_enter);
(void) setjmp(&db_jmpbuf);
while (!db_cmd_loop_done) {