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/61c1ac5acb9f
branches: trunk
changeset: 999443:61c1ac5acb9f
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 e05d46a46b0e -r 61c1ac5acb9f 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