Source-Changes-HG archive

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

[src/trunk]: src/sys/ddb add two db_stack_print_trace frontends that emit to ...



details:   https://anonhg.NetBSD.org/src/rev/e88222016841
branches:  trunk
changeset: 451752:e88222016841
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Jun 02 06:09:17 2019 +0000

description:
add two db_stack_print_trace frontends that emit to the system log
or the user's terminal.

kind of wrong to be called db_*() when they'll typically be used
outside of ddb itself, but db_stacktrace() itself is no different.
fix this by making the stack trace support separate from ddb?

diffstat:

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

diffs (22 lines):

diff -r 4df986efa6d7 -r e88222016841 sys/ddb/db_interface.h
--- a/sys/ddb/db_interface.h    Sat Jun 01 22:18:23 2019 +0000
+++ b/sys/ddb/db_interface.h    Sun Jun 02 06:09:17 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_interface.h,v 1.36 2018/03/04 07:14:50 mlelstv Exp $        */
+/*     $NetBSD: db_interface.h,v 1.37 2019/06/02 06:09:17 mrg Exp $    */
 
 /*-
  * Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -84,4 +84,12 @@
     db_stack_trace_print((db_expr_t)(intptr_t)__builtin_frame_address(0), \
        true, 65535, "", printf)
 
+#define        db_ustacktrace() \
+    db_stack_trace_print((db_expr_t)(intptr_t)__builtin_frame_address(0), \
+       true, 65535, "", uprintf)
+
+#define        db_lstacktrace() \
+    db_stack_trace_print((db_expr_t)(intptr_t)__builtin_frame_address(0), \
+       true, 65535, "", addlog)
+
 #endif /* _DDB_DB_INTERFACE_H_ */



Home | Main Index | Thread Index | Old Index