Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ddb remove previous, dmesg just works.
details: https://anonhg.NetBSD.org/src/rev/323107689a92
branches: trunk
changeset: 783732:323107689a92
user: christos <christos%NetBSD.org@localhost>
date: Sun Jan 06 03:34:52 2013 +0000
description:
remove previous, dmesg just works.
diffstat:
sys/ddb/db_command.c | 6 ++----
sys/ddb/db_interface.h | 3 +--
sys/ddb/db_xxx.c | 34 ++--------------------------------
3 files changed, 5 insertions(+), 38 deletions(-)
diffs (96 lines):
diff -r dddf2287634e -r 323107689a92 sys/ddb/db_command.c
--- a/sys/ddb/db_command.c Sun Jan 06 03:25:01 2013 +0000
+++ b/sys/ddb/db_command.c Sun Jan 06 03:34:52 2013 +0000
@@ -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 @@
"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,
diff -r dddf2287634e -r 323107689a92 sys/ddb/db_interface.h
--- a/sys/ddb/db_interface.h Sun Jan 06 03:25:01 2013 +0000
+++ b/sys/ddb/db_interface.h Sun Jan 06 03:34:52 2013 +0000
@@ -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_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 *);
diff -r dddf2287634e -r 323107689a92 sys/ddb/db_xxx.c
--- a/sys/ddb/db_xxx.c Sun Jan 06 03:25:01 2013 +0000
+++ b/sys/ddb/db_xxx.c Sun Jan 06 03:34:52 2013 +0000
@@ -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 @@
(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
-}
Home |
Main Index |
Thread Index |
Old Index