summaryrefslogtreecommitdiff
path: root/sys/ddb/db_access.h
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2017-04-20 12:41:44 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2017-04-20 12:41:44 +0000
commiteeb5de6186b3574f4852fdf604c0d31f96448ee1 (patch)
tree90df45bd434fbbdd05be3443af9075a8af59718c /sys/ddb/db_access.h
parentc3de74dc1edd1469fba32ab5324713687a11f099 (diff)
Add routines for saving stack traces and printing saved traces
on amd64 and i386. With guenther@
Diffstat (limited to 'sys/ddb/db_access.h')
-rw-r--r--sys/ddb/db_access.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/ddb/db_access.h b/sys/ddb/db_access.h
index b214af7c63b..e4d3011748a 100644
--- a/sys/ddb/db_access.h
+++ b/sys/ddb/db_access.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_access.h,v 1.7 2016/04/19 10:24:42 mpi Exp $ */
+/* $OpenBSD: db_access.h,v 1.8 2017/04/20 12:41:43 visa Exp $ */
/* $NetBSD: db_access.h,v 1.6 1994/10/09 08:29:57 mycroft Exp $ */
/*
@@ -38,3 +38,13 @@ void db_put_value(db_addr_t, size_t, db_expr_t);
void db_read_bytes(db_addr_t, size_t, char *);
void db_write_bytes(db_addr_t, size_t, char *);
+
+#define DB_STACK_TRACE_MAX 19
+
+struct db_stack_trace {
+ unsigned int st_count;
+ db_addr_t st_pc[DB_STACK_TRACE_MAX];
+};
+
+void db_print_stack_trace(struct db_stack_trace *);
+void db_save_stack_trace(struct db_stack_trace *);