summaryrefslogtreecommitdiff
path: root/sys/ddb/db_command.c
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2007-02-09 21:55:00 +0000
committerad <ad@NetBSD.org>2007-02-09 21:55:00 +0000
commitb07ec3fc388a5aeae51e8871aa89eefea3ce1e53 (patch)
treec93d3b23a29f98ac0e26c9d43afb509219d0ea42 /sys/ddb/db_command.c
parent5c1aad3ad0b9d2403784bd52128e8e8399e22254 (diff)
Merge newlock2 to head.
Diffstat (limited to 'sys/ddb/db_command.c')
-rw-r--r--sys/ddb/db_command.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index 7101a155e52..7961bf0da81 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -1,4 +1,4 @@
-/* $NetBSD: db_command.c,v 1.91 2006/11/16 01:32:44 christos Exp $ */
+/* $NetBSD: db_command.c,v 1.92 2007/02/09 21:55:26 ad Exp $ */
/*
* Mach Operating System
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.91 2006/11/16 01:32:44 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.92 2007/02/09 21:55:26 ad Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -48,6 +48,8 @@ __KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.91 2006/11/16 01:32:44 christos Exp
#include <sys/pool.h>
#include <sys/proc.h>
#include <sys/vnode.h>
+#include <sys/lockdebug.h>
+#include <sys/sleepq.h>
#include <machine/db_machdep.h> /* type definitions */
@@ -121,6 +123,7 @@ static void db_stack_trace_cmd(db_expr_t, int, db_expr_t, const char *);
static void db_sync_cmd(db_expr_t, int, db_expr_t, const char *);
static void db_uvmexp_print_cmd(db_expr_t, int, db_expr_t, const char *);
static void db_vnode_print_cmd(db_expr_t, int, db_expr_t, const char *);
+static void db_lock_print_cmd(db_expr_t, int, db_expr_t, const char *);
static void db_mount_print_cmd(db_expr_t, int, db_expr_t, const char *);
static void db_mbuf_print_cmd(db_expr_t, int, db_expr_t, const char *);
@@ -144,6 +147,7 @@ static const struct db_command db_show_cmds[] = {
{ "breaks", db_listbreak_cmd, 0, NULL },
{ "buf", db_buf_print_cmd, 0, NULL },
{ "event", db_event_print_cmd, 0, NULL },
+ { "lock", db_lock_print_cmd, 0, NULL },
{ "malloc", db_malloc_print_cmd, 0, NULL },
{ "map", db_map_print_cmd, 0, NULL },
{ "mount", db_mount_print_cmd, 0, NULL },
@@ -680,6 +684,15 @@ db_uvmexp_print_cmd(db_expr_t addr, int have_addr,
uvmexp_print(db_printf);
}
+/*ARGSUSED*/
+static void
+db_lock_print_cmd(db_expr_t addr, int have_addr,
+ db_expr_t count, const char *modif)
+{
+
+ lockdebug_lock_print((void *)addr, db_printf);
+}
+
/*
* Call random function:
* !expr(arg,arg,arg)