aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2011-08-27 22:10:45 +0000
committerRobert Watson <rwatson@FreeBSD.org>2011-08-27 22:10:45 +0000
commita608af78171a4dc3530d2f50d98ca11420e5a587 (patch)
tree09ce69234a9c23680ab67dbc016486c46b10b18b
parent04114c5ee3c11ded72b6092ea14f332897262d2a (diff)
downloadsrc-a608af78171a4dc3530d2f50d98ca11420e5a587.tar.gz
src-a608af78171a4dc3530d2f50d98ca11420e5a587.zip
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)
Notes
Notes: svn path=/head/; revision=225221
-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 ebaa945759d0..b8f328ee34c3 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 a23f88474a30..79f531bd47a1 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 */