Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Mar 2004 13:46:38 -0800 (PST)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 48623 for review
Message-ID:  <200403102146.i2ALkcCV083077@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=48623

Change 48623 by marcel@marcel_nfs on 2004/03/10 13:46:37

	Replace #ifdef DDB with #ifdef KDB and not with
	#ifdef DEBUG.
	
	Add KDB as a global option.
	
	Requested by: phk, jmallet

Affected files ...

.. //depot/projects/gdb/sys/alpha/tlsb/zs_tlsb.c#4 edit
.. //depot/projects/gdb/sys/amd64/amd64/machdep.c#6 edit
.. //depot/projects/gdb/sys/conf/NOTES#6 edit
.. //depot/projects/gdb/sys/conf/options#6 edit
.. //depot/projects/gdb/sys/i386/i386/machdep.c#4 edit
.. //depot/projects/gdb/sys/i386/isa/pcvt/pcvt_kbd.c#3 edit
.. //depot/projects/gdb/sys/ia64/ia64/machdep.c#4 edit
.. //depot/projects/gdb/sys/kern/kern_clock.c#4 edit
.. //depot/projects/gdb/sys/kern/kern_shutdown.c#4 edit
.. //depot/projects/gdb/sys/kern/subr_witness.c#5 edit
.. //depot/projects/gdb/sys/kern/vfs_vnops.c#3 edit
.. //depot/projects/gdb/sys/pc98/i386/machdep.c#3 edit
.. //depot/projects/gdb/sys/powerpc/powermac/pswitch.c#3 edit
.. //depot/projects/gdb/sys/sparc64/sparc64/machdep.c#3 edit

Differences ...

==== //depot/projects/gdb/sys/alpha/tlsb/zs_tlsb.c#4 (text+ko) ====

@@ -525,7 +525,7 @@
 
 		while (zs_get_status(base, 0) & 1) {
 			c = zs_get_data(base, 0);
-#ifdef DEBUG
+#ifdef KDB
 			if (c == CTRL('\\'))
 				kdb_enter("manual escape to debugger");
 #endif
@@ -540,7 +540,7 @@
 
 		while (zs_get_status(base, 1) & 1) {
 			c = zs_get_data(base, 1);
-#ifdef DEBUG
+#ifdef KDB
 			if (c == CTRL('\\'))
 				kdb_enter("manual escape to debugger");
 #endif

==== //depot/projects/gdb/sys/amd64/amd64/machdep.c#6 (text+ko) ====

@@ -1216,7 +1216,7 @@
 
 	kdb_init();
 
-#ifdef DEBUG
+#ifdef KDB
 	if (boothowto & RB_KDB)
 		kdb_enter("Boot flags requested debugger");
 #endif

==== //depot/projects/gdb/sys/conf/NOTES#6 (text+ko) ====

@@ -229,6 +229,11 @@
 # DEBUGGING OPTIONS
 
 #
+# Compile with kernel debugger related code.
+#
+options 	KDB
+
+#
 # Print a stack trace of the current thread on the console for a panic.
 #
 options 	KDB_TRACE

==== //depot/projects/gdb/sys/conf/options#6 (text+ko) ====

@@ -77,6 +77,7 @@
 DDB_NUMSYM	opt_ddb.h
 GDB
 GDBSPEED	opt_gdb.h
+KDB		opt_global.h
 KDB_TRACE	opt_kdb.h
 KDB_UNATTENDED	opt_kdb.h
 

==== //depot/projects/gdb/sys/i386/i386/machdep.c#4 (text+ko) ====

@@ -2101,7 +2101,7 @@
 
 	kdb_init();
 
-#ifdef DEBUG
+#ifdef KDB
 	if (boothowto & RB_KDB)
 		kdb_enter("Boot flags requested debugger");
 #endif

==== //depot/projects/gdb/sys/i386/isa/pcvt/pcvt_kbd.c#3 (text+ko) ====

@@ -945,7 +945,7 @@
 		shutdown_nice(0);
 #endif /* PCVT_CTRL_ALT_DEL */
 
-#if defined(DEBUG)		 /*   Check for cntl-alt-esc	*/
+#if defined(KDB)		 /*   Check for cntl-alt-esc	*/
 
   	if((key == 110) && ctrl_down && (meta_down || altgr_down))
  	{
@@ -958,7 +958,7 @@
 				goto loop;
 		}
 	}
-#endif /* defined(DEBUG) */
+#endif /* defined(KDB) */
 
 	/* look for keys with special handling */
 	if(key == 128)

==== //depot/projects/gdb/sys/ia64/ia64/machdep.c#4 (text+ko) ====

@@ -755,7 +755,7 @@
 	 */
 	kdb_init();
 
-#ifdef DEBUG
+#ifdef KDB
 	if (boothowto & RB_KDB)
 		kdb_enter("Boot flags requested debugger\n");
 #endif

==== //depot/projects/gdb/sys/kern/kern_clock.c#4 (text+ko) ====

@@ -548,12 +548,12 @@
 	}
 	printf("Total        %20ju\n", (uintmax_t)inttotal);
 
-#ifdef DEBUG
+#ifdef KDB
 	kdb_backtrace();
 	kdb_enter("watchdog timeout");
 #else
 	panic("watchdog timeout");
-#endif /* DEBUG */
+#endif /* KDB */
 }
 
 #endif /* SW_WATCHDOG */

==== //depot/projects/gdb/sys/kern/kern_shutdown.c#4 (text+ko) ====

@@ -84,7 +84,7 @@
  */
 #include <machine/stdarg.h>
 
-#ifdef DEBUG
+#ifdef KDB
 #ifdef KDB_UNATTENDED
 int debugger_on_panic = 0;
 #else
@@ -100,7 +100,7 @@
 #endif
 SYSCTL_INT(_debug, OID_AUTO, trace_on_panic, CTLFLAG_RW,
 	&trace_on_panic, 0, "Print stack trace on kernel panic");
-#endif /* DEBUG */
+#endif /* KDB */
 
 int sync_on_panic = 1;
 SYSCTL_INT(_kern, OID_AUTO, sync_on_panic, CTLFLAG_RW,
@@ -507,7 +507,7 @@
 #endif
 #endif
 
-#ifdef DEBUG
+#ifdef KDB
 	if (newpanic && trace_on_panic)
 		kdb_backtrace();
 	if (debugger_on_panic)

==== //depot/projects/gdb/sys/kern/subr_witness.c#5 (text+ko) ====

@@ -207,10 +207,10 @@
 SYSCTL_PROC(_debug, OID_AUTO, witness_watch, CTLFLAG_RW | CTLTYPE_INT, NULL, 0,
     sysctl_debug_witness_watch, "I", "witness is watching lock operations");
 
-#ifdef DEBUG
+#ifdef KDB
 /*
- * When DEBUG is enabled and witness_kdb is set to 1, it will cause the
- * system to drop into kdebug() when:
+ * When KDB is enabled and witness_kdb is set to 1, it will cause the system
+ * to drop into kdebug() when:
  *	- a lock heirarchy violation occurs
  *	- locks are held when going to sleep.
  */
@@ -223,15 +223,15 @@
 SYSCTL_INT(_debug, OID_AUTO, witness_kdb, CTLFLAG_RW, &witness_kdb, 0, "");
 
 /*
- * When DEBUG is enabled and witness_trace is set to 1, it will cause the
- * system to print a stack trace:
+ * When KDB is enabled and witness_trace is set to 1, it will cause the system
+ * to print a stack trace:
  *	- a lock heirarchy violation occurs
  *	- locks are held when going to sleep.
  */
 int	witness_trace = 1;
 TUNABLE_INT("debug.witness_trace", &witness_trace);
 SYSCTL_INT(_debug, OID_AUTO, witness_trace, CTLFLAG_RW, &witness_trace, 0, "");
-#endif /* DEBUG */
+#endif /* KDB */
 
 #ifdef WITNESS_SKIPSPIN
 int	witness_skipspin = 1;
@@ -872,7 +872,7 @@
 	mtx_unlock_spin(&w_mtx);
 	return;
 
-#ifdef DEBUG
+#ifdef KDB
 debugger:
 	if (witness_trace)
 		kdb_backtrace();
@@ -1148,7 +1148,7 @@
 	}
 	if (flags & WARN_PANIC && n)
 		panic("witness_warn");
-#ifdef DEBUG
+#ifdef KDB
 	else if (witness_kdb && n)
 		kdb_enter(__func__);
 #endif

==== //depot/projects/gdb/sys/kern/vfs_vnops.c#3 (text+ko) ====

@@ -790,7 +790,7 @@
 		}
 		error = VOP_IOCTL(vp, com, data, fp->f_flag, active_cred, td);
 		if (error == ENOIOCTL) {
-#ifdef DEBUG
+#ifdef DIAGNOSTIC
 			kdb_enter("ENOIOCTL leaked through");
 #endif
 			error = ENOTTY;

==== //depot/projects/gdb/sys/pc98/i386/machdep.c#3 (text+ko) ====

@@ -2166,7 +2166,7 @@
 
 	kdb_init();
 
-#ifdef DEBUG
+#ifdef KDB
 	if (boothowto & RB_KDB)
 		kdb_enter("Boot flags requested debugger");
 #endif

==== //depot/projects/gdb/sys/powerpc/powermac/pswitch.c#3 (text+ko) ====

@@ -138,7 +138,5 @@
 
 	dev = (device_t)arg;
 
-#ifdef DEBUG
 	kdb_enter(device_get_nameunit(dev));
-#endif
 }

==== //depot/projects/gdb/sys/sparc64/sparc64/machdep.c#3 (text+ko) ====

@@ -385,7 +385,7 @@
 
 	kdb_init();
 
-#ifdef DEBUG
+#ifdef KDB
 	if (boothowto & RB_KDB)
 		kdb_enter("Boot flags requested debugger");
 #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403102146.i2ALkcCV083077>