From a608af78171a4dc3530d2f50d98ca11420e5a587 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sat, 27 Aug 2011 22:10:45 +0000 Subject: [PATCH] Add support for alternative break-to-debugger to syscons(4). While most keyboards allow console break sequences (such as ctrl-alt-esc) to be entered, alternative break can prove useful under virtualisation and remote console systems where entering control sequences can be difficult or unreliable. MFC after: 3 weeks Approved by: re (bz) --- sys/dev/syscons/syscons.c | 4 ++++ sys/dev/syscons/syscons.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index ebaa945759d..b8f328ee34c 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -3562,6 +3562,10 @@ next_code: /* goto next_code */ } else { /* regular keys (maybe MKEY is set) */ +#if !defined(SC_DISABLE_KDBKEY) && defined(KDB) + if (enable_kdbkey) + kdb_alt_break(c, &sc->sc_altbrk); +#endif if (!(sc->flags & SC_SCRN_BLANKED)) return c; } diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h index a23f88474a3..79f531bd47a 100644 --- a/sys/dev/syscons/syscons.h +++ b/sys/dev/syscons/syscons.h @@ -266,6 +266,9 @@ typedef struct sc_softc { u_char cursor_char; u_char mouse_char; +#ifdef KDB + int sc_altbrk; +#endif } sc_softc_t; /* virtual screen */