diff options
author | rwatson <rwatson@FreeBSD.org> | 2011-08-27 22:10:45 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2011-08-27 22:10:45 +0000 |
commit | a3e1311cee07ff2ae61e77e2a5b657d62a041223 (patch) | |
tree | 09ce69234a9c23680ab67dbc016486c46b10b18b | |
parent | 6e223065c44da5e87b6c44fea12a2ff665efdbfb (diff) | |
download | FreeBSD-src-a3e1311cee07ff2ae61e77e2a5b657d62a041223.zip FreeBSD-src-a3e1311cee07ff2ae61e77e2a5b657d62a041223.tar.gz |
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)
-rw-r--r-- | sys/dev/syscons/syscons.c | 4 | ||||
-rw-r--r-- | sys/dev/syscons/syscons.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index ebaa945..b8f328e 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 a23f884..79f531b 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 */ |