From owner-p4-projects@FreeBSD.ORG Sat May 20 19:30:46 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 063A916A422; Sat, 20 May 2006 19:30:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9455616A421 for ; Sat, 20 May 2006 19:30:45 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECF7443D46 for ; Sat, 20 May 2006 19:30:44 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k4KJUAH8087729 for ; Sat, 20 May 2006 19:30:10 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4KJUAfI087725 for perforce@freebsd.org; Sat, 20 May 2006 19:30:10 GMT (envelope-from kmacy@freebsd.org) Date: Sat, 20 May 2006 19:30:10 GMT Message-Id: <200605201930.k4KJUAfI087725@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 97531 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2006 19:30:46 -0000 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