diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-05-12 19:56:05 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-05-12 19:56:05 +0000 |
commit | 1305009a7d2fa7fb5184f76339e28061673bfcaf (patch) | |
tree | 3bf61ba3ae870c47ce2d623291ead43b20c86bbb /sys/ddb | |
parent | e32eb83ef7db72d9e8e35710c2049b1d43f130b1 (diff) |
sho proc [addr] to print some proc's field; art@ ok
Diffstat (limited to 'sys/ddb')
-rw-r--r-- | sys/ddb/db_command.c | 17 | ||||
-rw-r--r-- | sys/ddb/db_command.h | 3 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 2edf162fa4b..f3e61da919f 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.c,v 1.30 2003/02/12 14:41:07 jason Exp $ */ +/* $OpenBSD: db_command.c,v 1.31 2003/05/12 19:56:03 mickey Exp $ */ /* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */ /* @@ -376,6 +376,20 @@ db_pool_print_cmd(addr, have_addr, count, modif) /*ARGSUSED*/ void +db_proc_print_cmd(addr, have_addr, count, modif) + db_expr_t addr; + int have_addr; + db_expr_t count; + char * modif; +{ + if (!have_addr) + addr = (db_expr_t)curproc; + + proc_printit((struct proc *)addr, modif, db_printf); +} + +/*ARGSUSED*/ +void db_uvmexp_print_cmd(addr, have_addr, count, modif) db_expr_t addr; int have_addr; @@ -404,6 +418,7 @@ struct db_command db_show_cmds[] = { { "object", db_object_print_cmd, 0, NULL }, { "page", db_page_print_cmd, 0, NULL }, { "pool", db_pool_print_cmd, 0, NULL }, + { "proc", db_proc_print_cmd, 0, NULL }, { "registers", db_show_regs, 0, NULL }, { "uvmexp", db_uvmexp_print_cmd, 0, NULL }, { "watches", db_listwatch_cmd, 0, NULL }, diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h index d76dac736c3..2fc48550b86 100644 --- a/sys/ddb/db_command.h +++ b/sys/ddb/db_command.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.h,v 1.16 2003/02/12 14:41:07 jason Exp $ */ +/* $OpenBSD: db_command.h,v 1.17 2003/05/12 19:56:04 mickey Exp $ */ /* $NetBSD: db_command.h,v 1.8 1996/02/05 01:56:55 christos Exp $ */ /* @@ -44,6 +44,7 @@ void db_object_print_cmd(db_expr_t, int, db_expr_t, char *); void db_page_print_cmd(db_expr_t, int, db_expr_t, char *); void db_extent_print_cmd(db_expr_t, int, db_expr_t, char *); void db_pool_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_proc_print_cmd(db_expr_t, int, db_expr_t, char *); void db_uvmexp_print_cmd(db_expr_t, int, db_expr_t, char *); void db_machine_commands_install(struct db_command *); void db_help_cmd(db_expr_t, int, db_expr_t, char *); |