From 8cabb94fde0f691d73a6d17248e087d298f60de6 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sat, 10 Jul 2004 21:07:44 +0000 Subject: [PATCH] Update for the KDB framework: o Make debugging code conditional upon KDB instead of DDB. o Call kdb_alt_break() instead of db_alt_break(). o Call kdb_enter() instead of breakpoint(). --- sys/dev/ofw/ofw_console.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index 9dfe71334c02..0e1f91dfea7b 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -26,11 +26,11 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ddb.h" #include "opt_comconsole.h" #include "opt_ofw.h" #include +#include #include #include #include @@ -64,7 +64,7 @@ static int polltime; static struct callout_handle ofw_timeouthandle = CALLOUT_HANDLE_INITIALIZER(&ofw_timeouthandle); -#if defined(DDB) && defined(ALT_BREAK_TO_DEBUGGER) +#if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER) static int alt_break_state; #endif @@ -276,9 +276,9 @@ ofw_cons_getc(struct consdev *cp) } } -#if defined(DDB) && defined(ALT_BREAK_TO_DEBUGGER) - if (db_alt_break(ch, &alt_break_state)) - breakpoint(); +#if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER) + if (kdb_alt_break(ch, &alt_break_state)) + kdb_enter("Break sequence on console"); #endif return (ch); @@ -290,9 +290,9 @@ ofw_cons_checkc(struct consdev *cp) unsigned char ch; if (OF_read(stdin, &ch, 1) > 0) { -#if defined(DDB) && defined(ALT_BREAK_TO_DEBUGGER) - if (db_alt_break(ch, &alt_break_state)) - breakpoint(); +#if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER) + if (kdb_alt_break(ch, &alt_break_state)) + kdb_enter("Break sequence on console"); #endif return (ch); }