Module Name:    src
Committed By:   matt
Date:           Wed Feb  9 18:24:45 UTC 2011

Modified Files:
        src/sys/ddb: db_trap.c

Log Message:
Since curlwp and curproc must always be non-NULL, remove the == NULL branches.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/ddb/db_trap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/ddb/db_trap.c
diff -u src/sys/ddb/db_trap.c:1.24 src/sys/ddb/db_trap.c:1.25
--- src/sys/ddb/db_trap.c:1.24	Wed Feb 21 22:59:57 2007
+++ src/sys/ddb/db_trap.c	Wed Feb  9 18:24:44 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_trap.c,v 1.24 2007/02/21 22:59:57 thorpej Exp $	*/
+/*	$NetBSD: db_trap.c,v 1.25 2011/02/09 18:24:44 matt Exp $	*/
 
 /*
  * Mach Operating System
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_trap.c,v 1.24 2007/02/21 22:59:57 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trap.c,v 1.25 2011/02/09 18:24:44 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -75,26 +75,15 @@
 			    "(%d loads, %d stores),\n",
 			    db_inst_count, db_load_count, db_store_count);
 		}
-		if (curlwp != NULL) {
-			if (bkpt)
-				db_printf("Breakpoint");
-			else if (watchpt)
-				db_printf("Watchpoint");
-			else
-				db_printf("Stopped");
-			if (curproc == NULL)
-				db_printf("; curlwp = %p,"
-				    " curproc is NULL at\t", curlwp);
-			else
-				db_printf(" in pid %d.%d (%s) at\t",
-				    curproc->p_pid, curlwp->l_lid,
-				    curproc->p_comm);
-		} else if (bkpt)
-			db_printf("Breakpoint at\t");
+		if (bkpt)
+			db_printf("Breakpoint");
 		else if (watchpt)
-			db_printf("Watchpoint at\t");
+			db_printf("Watchpoint");
 		else
-			db_printf("Stopped at\t");
+			db_printf("Stopped");
+		db_printf(" in pid %d.%d (%s) at\t",
+		    curproc->p_pid, curlwp->l_lid,
+		    curproc->p_comm);
 		db_dot = PC_REGS(DDB_REGS);
 		db_print_loc_and_inst(db_dot);
 

Reply via email to