Module Name:    src
Committed By:   christos
Date:           Sun Jan  6 03:34:52 UTC 2013

Modified Files:
        src/sys/ddb: db_command.c db_interface.h db_xxx.c

Log Message:
remove previous, dmesg just works.


To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 src/sys/ddb/db_command.c
cvs rdiff -u -r1.30 -r1.31 src/sys/ddb/db_interface.h
cvs rdiff -u -r1.68 -r1.69 src/sys/ddb/db_xxx.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_command.c
diff -u src/sys/ddb/db_command.c:1.140 src/sys/ddb/db_command.c:1.141
--- src/sys/ddb/db_command.c:1.140	Sat Jan  5 22:23:55 2013
+++ src/sys/ddb/db_command.c	Sat Jan  5 22:34:52 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_command.c,v 1.140 2013/01/06 03:23:55 christos Exp $	*/
+/*	$NetBSD: db_command.c,v 1.141 2013/01/06 03:34:52 christos Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.140 2013/01/06 03:23:55 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.141 2013/01/06 03:34:52 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -317,8 +317,6 @@ static const struct db_command db_comman
 	    "Delete a breakpoint.", "address | #number",NULL) },
 	{ DDB_ADD_CMD("delete",	db_delete_cmd,		0,
 	    "Delete a breakpoint.", "address | #number",NULL) },
-	{ DDB_ADD_CMD("dmesg",	db_dmesg,		0,
-	    "Show kernel message buffer.", "[count]",NULL) },
 	{ DDB_ADD_CMD("dwatch",	db_deletewatch_cmd,	0,
 	    "Delete the watchpoint.", "address",NULL) },
 	{ DDB_ADD_CMD("examine",	db_examine_cmd,		CS_SET_DOT,

Index: src/sys/ddb/db_interface.h
diff -u src/sys/ddb/db_interface.h:1.30 src/sys/ddb/db_interface.h:1.31
--- src/sys/ddb/db_interface.h:1.30	Sat Jan  5 22:23:55 2013
+++ src/sys/ddb/db_interface.h	Sat Jan  5 22:34:52 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_interface.h,v 1.30 2013/01/06 03:23:55 christos Exp $	*/
+/*	$NetBSD: db_interface.h,v 1.31 2013/01/06 03:34:52 christos Exp $	*/
 
 /*-
  * Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -44,7 +44,6 @@ void		db_stack_trace_print(db_expr_t, bo
 void		db_kgdb_cmd(db_expr_t, bool, db_expr_t, const char *);
 void		db_show_files_cmd(db_expr_t, bool, db_expr_t, const char *);
 void		db_show_panic(db_expr_t, bool, db_expr_t, const char *);
-void		db_show_dmesg(db_expr_t, bool, db_expr_t, const char *);
 
 /* kern/kern_proc.c */
 void		db_kill_proc(db_expr_t, bool, db_expr_t, const char *);

Index: src/sys/ddb/db_xxx.c
diff -u src/sys/ddb/db_xxx.c:1.68 src/sys/ddb/db_xxx.c:1.69
--- src/sys/ddb/db_xxx.c:1.68	Sat Jan  5 22:23:55 2013
+++ src/sys/ddb/db_xxx.c	Sat Jan  5 22:34:52 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_xxx.c,v 1.68 2013/01/06 03:23:55 christos Exp $	*/
+/*	$NetBSD: db_xxx.c,v 1.69 2013/01/06 03:34:52 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1.68 2013/01/06 03:23:55 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_xxx.c,v 1.69 2013/01/06 03:34:52 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kgdb.h"
@@ -320,33 +320,3 @@ db_show_panic(db_expr_t addr, bool haddr
 	(void)splx(s);
 #endif
 }
-
-extern kmutex_t log_lock;
-
-void
-db_show_dmesg(db_expr_t addr, bool haddr, db_expr_t count, const char *modif)
-{
-#ifdef _KERNEL	/* XXX CRASH(8) */
-	long maxlen, beg, end, len;
-
-	mutex_spin_enter(&log_lock);
-	maxlen = msgbufp->msg_bufs;
-	beg = msgbufp->msg_bufx;
-	end = msgbufp->msg_bufs;
-	mutex_spin_exit(&log_lock);
-
-	while (maxlen > 0) {
-		len = MIN(end - beg, maxlen);
-		if (len == 0)
-			break;
-		db_printf("%.*s", (int)len, (const char *)&msgbufp->msg_bufc[beg]);
-		maxlen -= len;
-		/*
-		 * ... then, copy from the beginning of message buffer to
-		 * the write pointer.
-		 */
-		beg = 0;
-		end = msgbufp->msg_bufx;
-	}
-#endif
-}

Reply via email to