summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_clock.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-07-10 21:36:01 +0000
committermarcel <marcel@FreeBSD.org>2004-07-10 21:36:01 +0000
commita9ad69d5afbc24f6748d28f393adec2556a9b944 (patch)
tree9e5d95534c4335250faaf97e9ff106a860667f5a /sys/kern/kern_clock.c
parentb995877a066c7e04b455d29b5641151d05828de5 (diff)
downloadFreeBSD-src-a9ad69d5afbc24f6748d28f393adec2556a9b944.zip
FreeBSD-src-a9ad69d5afbc24f6748d28f393adec2556a9b944.tar.gz
Update for the KDB framework:
o Make debugging code conditional upon KDB instead of DDB. o Call kdb_enter() instead of Debugger(). o Call kdb_backtrace() instead of db_print_backtrace() or backtrace(). kern_mutex.c: o Replace checks for db_active with checks for kdb_active and make them unconditional. kern_shutdown.c: o s/DDB_UNATTENDED/KDB_UNATTENDED/g o s/DDB_TRACE/KDB_TRACE/g o Save the TID of the thread doing the kernel dump so the debugger knows which thread to select as the current when debugging the kernel core file. o Clear kdb_active instead of db_active and do so unconditionally. o Remove backtrace() implementation. kern_synch.c: o Call kdb_reenter() instead of db_error().
Diffstat (limited to 'sys/kern/kern_clock.c')
-rw-r--r--sys/kern/kern_clock.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index 0ca4bec1..21d6275 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -38,12 +38,12 @@
__FBSDID("$FreeBSD$");
#include "opt_ntp.h"
-#include "opt_ddb.h"
#include "opt_watchdog.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/callout.h>
+#include <sys/kdb.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/ktr.h>
@@ -69,10 +69,6 @@ __FBSDID("$FreeBSD$");
#include <sys/gmon.h>
#endif
-#ifdef DDB
-#include <ddb/ddb.h>
-#endif
-
#ifdef DEVICE_POLLING
extern void hardclock_device_poll(void);
#endif /* DEVICE_POLLING */
@@ -543,12 +539,12 @@ watchdog_fire(void)
}
printf("Total %20ju\n", (uintmax_t)inttotal);
-#ifdef DDB
- db_print_backtrace();
- Debugger("watchdog timeout");
-#else /* !DDB */
+#ifdef KDB
+ kdb_backtrace();
+ kdb_enter("watchdog timeout");
+#else
panic("watchdog timeout");
-#endif /* DDB */
+#endif /* KDB */
}
#endif /* SW_WATCHDOG */
OpenPOWER on IntegriCloud