Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ddb add a simple stacktrace macro



details:   https://anonhg.NetBSD.org/src/rev/e0d1a2f31615
branches:  trunk
changeset: 350111:e0d1a2f31615
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jan 04 21:25:41 2017 +0000

description:
add a simple stacktrace macro

diffstat:

 sys/ddb/db_interface.h |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r b9cfc8548cd0 -r e0d1a2f31615 sys/ddb/db_interface.h
--- a/sys/ddb/db_interface.h    Wed Jan 04 20:19:29 2017 +0000
+++ b/sys/ddb/db_interface.h    Wed Jan 04 21:25:41 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.h,v 1.32 2016/04/13 00:47:02 ozaki-r Exp $        */
+/*     $NetBSD: db_interface.h,v 1.33 2017/01/04 21:25:41 christos Exp $       */
 
 /*-
  * Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -73,4 +73,8 @@
 /* kern/subr_vmem.c */
 void           db_show_all_vmems(db_expr_t, bool, db_expr_t, const char *);
 
+#define        db_stacktrace() \
+    db_stack_trace_print((db_expr_t)(intptr_t)__builtin_frame_address(0), \
+       true, 65535, "", printf)
+
 #endif /* _DDB_DB_INTERFACE_H_ */



Home | Main Index | Thread Index | Old Index