summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2011-08-27 22:10:45 +0000
committerrwatson <rwatson@FreeBSD.org>2011-08-27 22:10:45 +0000
commita3e1311cee07ff2ae61e77e2a5b657d62a041223 (patch)
tree09ce69234a9c23680ab67dbc016486c46b10b18b /sys/dev/syscons
parent6e223065c44da5e87b6c44fea12a2ff665efdbfb (diff)
downloadFreeBSD-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)
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/syscons.c4
-rw-r--r--sys/dev/syscons/syscons.h3
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 */
OpenPOWER on IntegriCloud