Date: Thu, 16 Jan 2003 13:44:26 +0100 (CET) From: Hartmut Brandt <brandt@fokus.gmd.de> To: FreeBSD-gnats-submit@FreeBSD.org Subject: sparc64/47143: OFW console does not implement ALT_BREAK_TO_DEBUGGER Message-ID: <200301161244.h0GCiQko000674@catssrv.fokus.gmd.de>
next in thread | raw e-mail | index | archive | help
>Number: 47143 >Category: sparc64 >Synopsis: OFW console does not implement ALT_BREAK_TO_DEBUGGER >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-sparc >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 16 04:50:03 PST 2003 >Closed-Date: >Last-Modified: >Originator: Hartmut Brandt >Release: FreeBSD 5.0-CURRENT sparc64 >Organization: FhI Fokus >Environment: System: FreeBSD catssrv.fokus.gmd.de 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Thu Jan 16 13:19:01 CET 2003 hbb@catssrv.fokus.gmd.de:/opt/obj/usr/src/sys/CATSSRV sparc64 >Description: The kernel option ALT_BREAK_TO_DEBUGGER does not work with the open firmware console on sparc (and probably other platforms that use ofw). >How-To-Repeat: Compile a kernel with 'options ALT_BREAK_TO_DEBUGGER' and 'options DDB', reboot and try \r~^B. Observe, that the debugger is not called. >Fix: The following patch implements the flag in ofw_console.c. Index: ofw_console.c =================================================================== RCS file: /home/cvs/freebsd/src/sys/dev/ofw/ofw_console.c,v retrieving revision 1.7 diff -c -r1.7 ofw_console.c *** ofw_console.c 18 Nov 2002 06:19:12 -0000 1.7 --- ofw_console.c 16 Jan 2003 12:39:41 -0000 *************** *** 28,33 **** --- 28,36 ---- "$FreeBSD: src/sys/dev/ofw/ofw_console.c,v 1.7 2002/11/18 06:19:12 jake Exp $"; #endif /* not lint */ + #include "opt_ddb.h" + #include "opt_comconsole.h" + #include <sys/param.h> #include <sys/kernel.h> #include <sys/systm.h> *************** *** 39,44 **** --- 42,49 ---- #include <dev/ofw/openfirm.h> + #include <ddb/ddb.h> + #define OFW_POLL_HZ 4 static d_open_t ofw_dev_open; *************** *** 68,73 **** --- 73,82 ---- static struct callout_handle ofw_timeouthandle = CALLOUT_HANDLE_INITIALIZER(&ofw_timeouthandle); + #if defined(DDB) && defined(ALT_BREAK_TO_DEBUGGER) + static int alt_break_state; + #endif + static void ofw_tty_start(struct tty *); static int ofw_tty_param(struct tty *, struct termios *); static void ofw_tty_stop(struct tty *, int); *************** *** 295,300 **** --- 304,314 ---- } } + #if defined(DDB) && defined(ALT_BREAK_TO_DEBUGGER) + if (db_alt_break(ch, &alt_break_state)) + breakpoint(); + #endif + return (ch); } *************** *** 304,309 **** --- 318,327 ---- unsigned char ch; if (OF_read(stdin, &ch, 1) > 0) { + #if defined(DDB) && defined(ALT_BREAK_TO_DEBUGGER) + if (db_alt_break(ch, &alt_break_state)) + breakpoint(); + #endif return (ch); } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301161244.h0GCiQko000674>