summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/amd64/amd64/db_trace.c3
-rw-r--r--sys/arch/hppa/hppa/db_interface.c3
-rw-r--r--sys/arch/i386/i386/db_trace.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/db_trace.c b/sys/arch/amd64/amd64/db_trace.c
index e48b78574d4..bc454ddd58f 100644
--- a/sys/arch/amd64/amd64/db_trace.c
+++ b/sys/arch/amd64/amd64/db_trace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trace.c,v 1.41 2018/05/04 02:51:34 visa Exp $ */
+/* $OpenBSD: db_trace.c,v 1.42 2018/05/04 02:54:23 visa Exp $ */
/* $NetBSD: db_trace.c,v 1.1 2003/04/26 18:39:27 fvdl Exp $ */
/*
@@ -267,6 +267,7 @@ db_save_stack_trace(struct db_stack_trace *st)
frame = frame->f_frame;
lastframe = NULL;
+ st->st_count = 0;
for (i = 0; i < DB_STACK_TRACE_MAX && frame != NULL; i++) {
st->st_pc[st->st_count++] = callpc;
diff --git a/sys/arch/hppa/hppa/db_interface.c b/sys/arch/hppa/hppa/db_interface.c
index 33c3bf093fc..8e0349dff0c 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.43 2018/03/20 15:45:32 mpi Exp $ */
+/* $OpenBSD: db_interface.c,v 1.44 2018/05/04 02:54:23 visa Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -324,6 +324,7 @@ db_save_stack_trace(struct db_stack_trace *st)
pc = 0;
rp = fp[-5];
+ st->st_count = 0;
for (i = 0; i < DB_STACK_TRACE_MAX; i++) {
st->st_pc[st->st_count++] = rp;
diff --git a/sys/arch/i386/i386/db_trace.c b/sys/arch/i386/i386/db_trace.c
index 0e5289f60ab..da912b5d752 100644
--- a/sys/arch/i386/i386/db_trace.c
+++ b/sys/arch/i386/i386/db_trace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_trace.c,v 1.32 2017/12/08 08:54:03 mpi Exp $ */
+/* $OpenBSD: db_trace.c,v 1.33 2018/05/04 02:54:23 visa Exp $ */
/* $NetBSD: db_trace.c,v 1.18 1996/05/03 19:42:01 christos Exp $ */
/*
@@ -354,6 +354,7 @@ db_save_stack_trace(struct db_stack_trace *st)
callpc = db_get_value((int)&frame->f_retaddr, 4, FALSE);
lastframe = NULL;
+ st->st_count = 0;
for (i = 0; i < DB_STACK_TRACE_MAX && frame != NULL; i++) {
char *name;
db_expr_t offset;