summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2020-01-20 15:58:24 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2020-01-20 15:58:24 +0000
commit8dedb348f34b6ea68a8e7b1e905784762677b359 (patch)
treebe188db04b4562a8245c9d11553406df9fced9f5 /sys/arch/hppa
parent562bc692fe4670bfd2a4b5ec728fb5f5f41bbc00 (diff)
Separate the stack trace saving interface from ddb. The saving does not
require the debugger on most architectures, and the separation makes the code easier to use from other subsystems. The function definitions are still conditional to DDB. However, that should not matter for now. OK deraadt@, mpi@
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r--sys/arch/hppa/hppa/db_interface.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/hppa/hppa/db_interface.c b/sys/arch/hppa/hppa/db_interface.c
index 7afa81ed858..53449e93713 100644
--- a/sys/arch/hppa/hppa/db_interface.c
+++ b/sys/arch/hppa/hppa/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.46 2019/11/10 10:03:33 mpi Exp $ */
+/* $OpenBSD: db_interface.c,v 1.47 2020/01/20 15:58:23 visa Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -30,6 +30,7 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/stacktrace.h>
#include <machine/db_machdep.h>
#include <machine/frame.h>
@@ -315,7 +316,7 @@ db_stack_trace_print(db_expr_t addr, int have_addr, db_expr_t count,
}
void
-db_save_stack_trace(struct db_stack_trace *st)
+stacktrace_save(struct stacktrace *st)
{
register_t *fp, pc, rp;
int i;
@@ -325,7 +326,7 @@ db_save_stack_trace(struct db_stack_trace *st)
rp = fp[-5];
st->st_count = 0;
- for (i = 0; i < DB_STACK_TRACE_MAX; i++) {
+ for (i = 0; i < STACKTRACE_MAX; i++) {
st->st_pc[st->st_count++] = rp;
/* next frame */