Module Name: src Committed By: mrg Date: Sun Jun 2 06:09:17 UTC 2019
Modified Files: src/sys/ddb: db_interface.h Log Message: 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? To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/ddb/db_interface.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/ddb/db_interface.h diff -u src/sys/ddb/db_interface.h:1.36 src/sys/ddb/db_interface.h:1.37 --- src/sys/ddb/db_interface.h:1.36 Sun Mar 4 07:14:50 2018 +++ src/sys/ddb/db_interface.h Sun Jun 2 06:09:17 2019 @@ -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 @@ void db_show_disk(db_expr_t, bool, db_e 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_ */