diff options
author | marcel <marcel@FreeBSD.org> | 2004-07-10 21:16:01 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2004-07-10 21:16:01 +0000 |
commit | 3351894f4f1db6871dd97146e062af72132cbce4 (patch) | |
tree | 4b9fac403c0d323735bb37bbe9928d4c8a7a800a /sys/dev | |
parent | f2187020e10546e5940df4df4d3a7007846f4ef6 (diff) | |
download | FreeBSD-src-3351894f4f1db6871dd97146e062af72132cbce4.zip FreeBSD-src-3351894f4f1db6871dd97146e062af72132cbce4.tar.gz |
Update for the KDB framework:
o Call kdb_enter() instead of breakpoint().
o Call kdb_alt_break() instead of db_alt_break().
o Make debugging code conditional upon KDB instead of DDB.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/uart/uart_core.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c index 36b59be..9740cff 100644 --- a/sys/dev/uart/uart_core.c +++ b/sys/dev/uart/uart_core.c @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #ifndef KLD_MODULE #include "opt_comconsole.h" -#include "opt_ddb.h" #endif #include <sys/param.h> @@ -39,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include <sys/cons.h> #include <sys/fcntl.h> #include <sys/interrupt.h> +#include <sys/kdb.h> #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/queue.h> @@ -50,8 +50,6 @@ __FBSDID("$FreeBSD$"); #include <machine/resource.h> #include <machine/stdarg.h> -#include <ddb/ddb.h> - #include <dev/uart/uart.h> #include <dev/uart/uart_bus.h> #include <dev/uart/uart_cpu.h> @@ -85,9 +83,9 @@ static void uart_intr_break(struct uart_softc *sc) { -#if defined(DDB) && defined(BREAK_TO_DEBUGGER) +#if defined(KDB) && defined(BREAK_TO_DEBUGGER) if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE) { - breakpoint(); + kdb_enter("Line break on console"); return; } #endif @@ -133,11 +131,11 @@ uart_intr_rxready(struct uart_softc *sc) rxp = sc->sc_rxput; UART_RECEIVE(sc); -#if defined(DDB) && defined(ALT_BREAK_TO_DEBUGGER) +#if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER) if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE) { while (rxp != sc->sc_rxput) { - if (db_alt_break(sc->sc_rxbuf[rxp++], &sc->sc_altbrk)) - breakpoint(); + if (kdb_alt_break(sc->sc_rxbuf[rxp++], &sc->sc_altbrk)) + kdb_enter("Break sequence on console"); if (rxp == sc->sc_rxbufsz) rxp = 0; } |