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().
This commit is contained in:
marcel 2004-07-10 21:09:47 +00:00
parent 069f39a671
commit d6d709552d

View File

@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
* SAB82532 Dual UART driver
*/
#include "opt_ddb.h"
#include "opt_comconsole.h"
#include <sys/param.h>
@ -52,6 +51,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/ktr.h>
#include <sys/mutex.h>
@ -64,8 +64,6 @@ __FBSDID("$FreeBSD$");
#include <sys/syslog.h>
#include <sys/tty.h>
#include <ddb/ddb.h>
#include <dev/ofw/openfirm.h>
#include <sparc64/ebus/ebusvar.h>
@ -557,9 +555,10 @@ sabtty_intr(struct sabtty_softc *sc)
if (len != 0) {
for (i = 0; i < len; i++) {
c = SAB_READ(sc, SAB_RFIFO);
#if defined(DDB) && defined(ALT_BREAK_TO_DEBUGGER)
#if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER)
if (sc->sc_console != 0 && (i & 1) == 0)
brk = db_alt_break(c, &sc->sc_alt_break_state);
brk = kdb_alt_break(c,
&sc->sc_alt_break_state);
#endif
*sc->sc_iput++ = c;
if (sc->sc_iput == sc->sc_ibuf + sizeof(sc->sc_ibuf))
@ -606,7 +605,7 @@ sabtty_intr(struct sabtty_softc *sc)
if (brk != 0)
breakpoint();
return (needsoft);
}