Date: Sat, 20 May 2006 19:30:10 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 97531 for review Message-ID: <200605201930.k4KJUAfI087725@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=97531 Change 97531 by kmacy@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605201930.k4KJUAfI087725>