PERFORCE change 36436 for review

Marcel Moolenaar marcel at FreeBSD.org
Tue Aug 19 11:13:19 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=36436

Change 36436 by marcel at 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 <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#ifndef KLD_MODULE
 #include "opt_comconsole.h"
 #include "opt_ddb.h"
+#endif
 
 #include <sys/param.h>
 #include <sys/systm.h>


More information about the p4-projects mailing list