Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ddb Since curlwp and curproc must always be non-NULL, re...



details:   https://anonhg.NetBSD.org/src/rev/bc027e006c1d
branches:  trunk
changeset: 761864:bc027e006c1d
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Feb 09 18:24:44 2011 +0000

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

diffstat:

 sys/ddb/db_trap.c |  29 +++++++++--------------------
 1 files changed, 9 insertions(+), 20 deletions(-)

diffs (52 lines):

diff -r 21e81ed74b8f -r bc027e006c1d sys/ddb/db_trap.c
--- a/sys/ddb/db_trap.c Wed Feb 09 15:31:30 2011 +0000
+++ b/sys/ddb/db_trap.c Wed Feb 09 18:24:44 2011 +0000
@@ -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);
 



Home | Main Index | Thread Index | Old Index