diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-06-07 11:21:41 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-06-07 11:21:41 +0000 |
commit | 3ffe6ff5a6808c0fecd79ee4aaac31ad54e81cd4 (patch) | |
tree | 235afa9354c0592848f84b10de4b06368e329dba /sys/ddb/db_command.c | |
parent | d5c249313af9993f2ab7eab93a410fbd8d3422d9 (diff) |
Allow passing an address to 'show malloc' and print out some information about
that address.
Diffstat (limited to 'sys/ddb/db_command.c')
-rw-r--r-- | sys/ddb/db_command.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index dbde7a1ffed..d9c38757241 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.c,v 1.18 2000/06/07 09:40:02 art Exp $ */ +/* $OpenBSD: db_command.c,v 1.19 2000/06/07 11:21:39 art Exp $ */ /* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */ /* @@ -310,9 +310,12 @@ db_malloc_print_cmd(addr, have_addr, count, modif) char * modif; { #if defined(MALLOC_DEBUG) - extern void debug_malloc_printit __P((int (*) __P((const char *, ...)))); + extern void debug_malloc_printit __P((int (*) __P((const char *, ...)), vaddr_t)); - debug_malloc_printit(db_printf); + if (!have_addr) + addr = 0; + + debug_malloc_printit(db_printf, (vaddr_t)addr); #else db_printf("Malloc debugging not enabled.\n"); #endif |