summaryrefslogtreecommitdiffstats
path: root/sys/sun4v
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/sun4v
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/sun4v')
-rw-r--r--sys/sun4v/sun4v/hvcons.c8
-rw-r--r--sys/sun4v/sun4v/machdep.c2
-rw-r--r--sys/sun4v/sun4v/trap.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/sun4v/sun4v/hvcons.c b/sys/sun4v/sun4v/hvcons.c
index 201b22c..3329d05 100644
--- a/sys/sun4v/sun4v/hvcons.c
+++ b/sys/sun4v/sun4v/hvcons.c
@@ -224,10 +224,10 @@ hvcn_cngetc(struct consdev *cp)
while ((l = hv_cons_getchar(&ch)) != H_EOK) {
#if defined(KDB)
if (l == H_BREAK || l == H_HUP)
- kdb_enter("Break sequence on console");
+ kdb_enter(KDB_WHY_BREAK, "Break sequence on console");
if (kdb_alt_break(ch, &alt_break_state))
- kdb_enter("Break sequence on console");
+ kdb_enter(KDB_WHY_BREAK, "Break sequence on console");
#endif
if (l != -2 && l != 0) {
return (-1);
@@ -248,9 +248,9 @@ hvcn_cncheckc(struct consdev *cp)
if ((l = hv_cons_getchar(&ch)) == H_EOK) {
#if defined(KDB)
if (l == H_BREAK || l == H_HUP)
- kdb_enter("Break sequence on console");
+ kdb_enter(KDB_WHY_BREAK, "Break sequence on console");
if (kdb_alt_break(ch, &alt_break_state))
- kdb_enter("Break sequence on console");
+ kdb_enter(KDB_WHY_BREAK, "Break sequence on console");
#endif
return (ch);
}
diff --git a/sys/sun4v/sun4v/machdep.c b/sys/sun4v/sun4v/machdep.c
index 16a508a..1d0bf66 100644
--- a/sys/sun4v/sun4v/machdep.c
+++ b/sys/sun4v/sun4v/machdep.c
@@ -510,7 +510,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
BVPRINTF("sparc64_init done\n");
}
diff --git a/sys/sun4v/sun4v/trap.c b/sys/sun4v/sun4v/trap.c
index 75d5ce0..f04c424 100644
--- a/sys/sun4v/sun4v/trap.c
+++ b/sys/sun4v/sun4v/trap.c
@@ -366,7 +366,7 @@ trap(struct trapframe *tf, int64_t type, uint64_t data)
}
if (debugger_on_signal &&
(sig == 4 || sig == 10 || sig == 11))
- kdb_enter("trapsig");
+ kdb_enter(KDB_WHY_TRAPSIG, "trapsig");
#ifdef VERBOSE
if (sig == 4 || sig == 10 || sig == 11)
printf("trap: %ld:%s: 0x%lx at 0x%lx on cpu=%d sig=%d proc=%s\n",
OpenPOWER on IntegriCloud