summaryrefslogtreecommitdiff
path: root/sys/ddb
diff options
context:
space:
mode:
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_command.c19
-rw-r--r--sys/ddb/db_command.h3
2 files changed, 20 insertions, 2 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index ea7c06d4842..dbde7a1ffed 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_command.c,v 1.17 1999/02/26 01:38:22 art Exp $ */
+/* $OpenBSD: db_command.c,v 1.18 2000/06/07 09:40:02 art Exp $ */
/* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */
/*
@@ -301,6 +301,22 @@ db_map_print_cmd(addr, have_addr, count, modif)
_vm_map_print((vm_map_t) addr, full, db_printf);
#endif
}
+/*ARGSUSED*/
+void
+db_malloc_print_cmd(addr, have_addr, count, modif)
+ db_expr_t addr;
+ int have_addr;
+ db_expr_t count;
+ char * modif;
+{
+#if defined(MALLOC_DEBUG)
+ extern void debug_malloc_printit __P((int (*) __P((const char *, ...))));
+
+ debug_malloc_printit(db_printf);
+#else
+ db_printf("Malloc debugging not enabled.\n");
+#endif
+}
/*ARGSUSED*/
void
@@ -351,6 +367,7 @@ struct db_command db_show_cmds[] = {
{ "map", db_map_print_cmd, 0, NULL },
{ "object", db_object_print_cmd, 0, NULL },
{ "extents", db_extent_print_cmd, 0, NULL },
+ { "malloc", db_malloc_print_cmd, 0, NULL },
{ NULL, NULL, 0, NULL, }
};
diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h
index 3b0f44b821e..8eb5b5bf79f 100644
--- a/sys/ddb/db_command.h
+++ b/sys/ddb/db_command.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_command.h,v 1.9 1998/09/01 04:27:01 art Exp $ */
+/* $OpenBSD: db_command.h,v 1.10 2000/06/07 09:40:02 art Exp $ */
/* $NetBSD: db_command.h,v 1.8 1996/02/05 01:56:55 christos Exp $ */
/*
@@ -39,6 +39,7 @@ int db_cmd_search __P((char *, struct db_command *, struct db_command **));
void db_cmd_list __P((struct db_command *));
void db_command __P((struct db_command **, struct db_command *));
void db_map_print_cmd __P((db_expr_t, int, db_expr_t, char *));
+void db_malloc_print_cmd __P((db_expr_t, int, db_expr_t, char *));
void db_object_print_cmd __P((db_expr_t, int, db_expr_t, char *));
void db_extent_print_cmd __P((db_expr_t, int, db_expr_t, char *));
void db_machine_commands_install __P((struct db_command *));