summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
authorart <art@openbsd.org>2002-05-18 09:49:16 +0000
committerart <art@openbsd.org>2002-05-18 09:49:16 +0000
commit332a70d350968331aa265465817ca5a3db75e44c (patch)
tree06d6060f2039b51974696206d2e47258d302a2fc /sys/ddb
parentwhen detaching form a process don't forget to remove posted messages. (diff)
downloadwireguard-openbsd-332a70d350968331aa265465817ca5a3db75e44c.tar.xz
wireguard-openbsd-332a70d350968331aa265465817ca5a3db75e44c.zip
Rename the MD db_stack_trace_cmd to db_stack_trace_print. Add an argument
that specifies which printf funciton it should use. Implement db_stack_trace_cmd in MI code. Thanks to miod@ for all the tests.
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_command.c9
-rw-r--r--sys/ddb/db_command.h3
-rw-r--r--sys/ddb/db_interface.h5
3 files changed, 13 insertions, 4 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index 24520db7716..d2e5ba3da11 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_command.c,v 1.28 2002/03/14 03:16:03 millert Exp $ */
+/* $OpenBSD: db_command.c,v 1.29 2002/05/18 09:49:17 art Exp $ */
/* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */
/*
@@ -639,3 +639,10 @@ db_boot_poweroff_cmd(addr, haddr, count, modif)
{
boot(RB_NOSYNC | RB_HALT | RB_POWERDOWN | RB_TIMEBAD);
}
+
+void
+db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
+ char *modif)
+{
+ db_stack_trace_print(addr, have_addr, count, modif, db_printf);
+}
diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h
index 84655b6c5b2..ff38839284d 100644
--- a/sys/ddb/db_command.h
+++ b/sys/ddb/db_command.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_command.h,v 1.14 2002/03/14 01:26:51 millert Exp $ */
+/* $OpenBSD: db_command.h,v 1.15 2002/05/18 09:49:17 art Exp $ */
/* $NetBSD: db_command.h,v 1.8 1996/02/05 01:56:55 christos Exp $ */
/*
@@ -56,6 +56,7 @@ void db_boot_dump_cmd(db_expr_t, int, db_expr_t, char *);
void db_boot_halt_cmd(db_expr_t, int, db_expr_t, char *);
void db_boot_reboot_cmd(db_expr_t, int, db_expr_t, char *);
void db_boot_poweroff_cmd(db_expr_t, int, db_expr_t, char *);
+void db_stack_trace_cmd(db_expr_t, int, db_expr_t, char *);
db_addr_t db_dot; /* current location */
db_addr_t db_last_addr; /* last explicit address typed */
diff --git a/sys/ddb/db_interface.h b/sys/ddb/db_interface.h
index 0f3346e6a96..9d58c99feab 100644
--- a/sys/ddb/db_interface.h
+++ b/sys/ddb/db_interface.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.h,v 1.4 2002/03/14 01:26:51 millert Exp $ */
+/* $OpenBSD: db_interface.h,v 1.5 2002/05/18 09:49:17 art Exp $ */
/* $NetBSD: db_interface.h,v 1.1 1996/02/05 01:57:03 christos Exp $ */
/*
@@ -33,7 +33,8 @@
#define _DDB_DB_INTERFACE_H_
/* arch/<arch>/<arch>/db_trace.c */
-void db_stack_trace_cmd(db_expr_t, int, db_expr_t, char *);
+void db_stack_trace_print(db_expr_t, int, db_expr_t, char *,
+ int (*)(const char *, ...));
/* arch/<arch>/<arch>/db_disasm.c */
db_addr_t db_disasm(db_addr_t, boolean_t);