diff options
| author | 2000-06-07 11:21:39 +0000 | |
|---|---|---|
| committer | 2000-06-07 11:21:39 +0000 | |
| commit | e37c6774de708ece1600456f420eea22d75979b9 (patch) | |
| tree | 808742f62ca229e772b77be32a4cf39b37d9617f /sys/ddb/db_command.c | |
| parent | Document how 'show malloc' in ddb can be used to find out what went wrong. (diff) | |
| download | wireguard-openbsd-e37c6774de708ece1600456f420eea22d75979b9.tar.xz wireguard-openbsd-e37c6774de708ece1600456f420eea22d75979b9.zip | |
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 |
