PERFORCE change 97531 for review
Kip Macy
kmacy at FreeBSD.org
Sat May 20 19:30:46 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=97531
Change 97531 by kmacy at kmacy_storage:sun4v_rwbuf on 2006/05/20 19:29:44
add support for break
Affected files ...
.. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hvcons.c#2 edit
Differences ...
==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hvcons.c#2 (text+ko) ====
@@ -68,6 +68,10 @@
static struct callout_handle hvcn_timeouthandle
= CALLOUT_HANDLE_INITIALIZER(&hvcn_timeouthandle);
+#if defined(KDB)
+static int alt_break_state;
+#endif
+
static void hvcn_tty_start(struct tty *);
static int hvcn_tty_param(struct tty *, struct termios *);
static void hvcn_tty_stop(struct tty *, int);
@@ -113,7 +117,7 @@
}
error = ttyld_open(tp, dev);
-#ifdef SIMULATOR
+#if defined(SIMULATOR) || 1
if (error == 0 && setuptimeout) {
int polltime;
@@ -195,12 +199,16 @@
ch = '\0';
while ((l = hv_cngetchar(&ch)) != H_EOK) {
+#if defined(KDB)
+ if (l == H_BREAK || l == H_HUP)
+ kdb_enter("Break sequence on console");
+#endif
if (l != -2 && l != 0) {
return (-1);
}
}
-#if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER)
+#if defined(KDB)
if (kdb_alt_break(ch, &alt_break_state))
kdb_enter("Break sequence on console");
#endif
@@ -212,9 +220,14 @@
hvcncheckc(struct consdev *cp)
{
unsigned char ch;
-
- if (hv_cngetchar(&ch) == H_EOK) {
-#if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER)
+ int l;
+
+ if ((l = hv_cngetchar(&ch)) == H_EOK) {
+#if defined(KDB)
+ if (l == H_BREAK || l == H_HUP)
+ kdb_enter("Break sequence on console");
+#endif
+#if defined(KDB)
if (kdb_alt_break(ch, &alt_break_state))
kdb_enter("Break sequence on console");
#endif
More information about the p4-projects
mailing list