From owner-p4-projects@FreeBSD.ORG Tue Aug 19 11:13:19 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C2D2616A4C1; Tue, 19 Aug 2003 11:13:18 -0700 (PDT) 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 7579A16A4BF for ; Tue, 19 Aug 2003 11:13:18 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 152FD43F3F for ; Tue, 19 Aug 2003 11:13:18 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h7JIDH0U030010 for ; Tue, 19 Aug 2003 11:13:17 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h7JIDHJO030007 for perforce@freebsd.org; Tue, 19 Aug 2003 11:13:17 -0700 (PDT) Date: Tue, 19 Aug 2003 11:13:17 -0700 (PDT) Message-Id: <200308191813.h7JIDHJO030007@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 36436 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2003 18:13:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=36436 Change 36436 by marcel@marcel_nfs on 2003/08/19 11:12:59 Fix building uart(4) as a module: don't try to include the non-existent opt_comconsole.h and opt_ddb.h. Consequently, when uart(4) is loaded as a module, it cannot be used to break to the debugger. I think we need to make it runtime knobs. It's not really in the way when not enabled (performance-wise) and it's safer than having it always enabled. Note also that we use db_alt_break(), which may not be compiled into the kernel. If we go with runtime knobs, we have to make sure db_alt_break() unconditionally resolves, or we have to create a local copy. It makes sense to have ddb stubs for when ddb is not present. Affected files ... .. //depot/projects/uart/dev/uart/uart_core.c#19 edit Differences ... ==== //depot/projects/uart/dev/uart/uart_core.c#19 (text+ko) ==== @@ -27,8 +27,10 @@ #include __FBSDID("$FreeBSD$"); +#ifndef KLD_MODULE #include "opt_comconsole.h" #include "opt_ddb.h" +#endif #include #include