summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-12-25 17:52:02 +0000
committerrwatson <rwatson@FreeBSD.org>2007-12-25 17:52:02 +0000
commitbdee30611dab246a5227856892385a02c7352f12 (patch)
treeae45f86ab6fb75519ba2d9dbc206616dba84cc13 /sys/sparc64
parente3b63ab4174a215e3a606c591d7a3f41490e75e6 (diff)
downloadFreeBSD-src-bdee30611dab246a5227856892385a02c7352f12.zip
FreeBSD-src-bdee30611dab246a5227856892385a02c7352f12.tar.gz
Add a new 'why' argument to kdb_enter(), and a set of constants to use
for that argument. This will allow DDB to detect the broad category of reason why the debugger has been entered, which it can use for the purposes of deciding which DDB script to run. Assign approximate why values to all current consumers of the kdb_enter() interface.
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/pci/psycho.c2
-rw-r--r--sys/sparc64/sparc64/machdep.c2
-rw-r--r--sys/sparc64/sparc64/trap.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c
index 9f5632f..846afdd 100644
--- a/sys/sparc64/pci/psycho.c
+++ b/sys/sparc64/pci/psycho.c
@@ -850,7 +850,7 @@ psycho_powerfail(void *arg)
#ifdef DEBUGGER_ON_POWERFAIL
struct psycho_softc *sc = arg;
- kdb_enter("powerfail");
+ kdb_enter(KDB_WHY_POWERFAIL, "powerfail");
#else
static int shutdown;
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 2e6d05e..7d1aa02 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -448,7 +448,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec)
#ifdef KDB
if (boothowto & RB_KDB)
- kdb_enter("Boot flags requested debugger");
+ kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger");
#endif
}
diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c
index 8d0ea35..e9e3c40 100644
--- a/sys/sparc64/sparc64/trap.c
+++ b/sys/sparc64/sparc64/trap.c
@@ -289,7 +289,7 @@ trap(struct trapframe *tf)
}
if (debugger_on_signal &&
(sig == 4 || sig == 10 || sig == 11))
- kdb_enter("trapsig");
+ kdb_enter(KDB_WHY_TRAPSIG, "trapsig");
ksiginfo_init_trap(&ksi);
ksi.ksi_signo = sig;
ksi.ksi_code = (int)tf->tf_type; /* XXX not POSIX */
OpenPOWER on IntegriCloud