summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-05-08 21:17:10 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-05-08 21:17:10 +0000
commitc3c9e08467d5f22fd5b3d930f17868812f65eff3 (patch)
tree8e2eda6ed7d3b21e9aba7646cf5acb5c1eedfd4c /sys/arch/amd64
parentf8b614979adba7091fe48e26b2b5dc936974b3a9 (diff)
After a break point at the beginning of a function, printing its
arguments faulted in ddb. Accessing the register arguments was off by one and in wrong order. OK dlg@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/db_trace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/db_trace.c b/sys/arch/amd64/amd64/db_trace.c
index f3fa7161e30..32708159f8b 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.27 2017/05/08 00:13:38 dlg Exp $ */
+/* $OpenBSD: db_trace.c,v 1.28 2017/05/08 21:17:09 bluhm Exp $ */
/* $NetBSD: db_trace.c,v 1.1 2003/04/26 18:39:27 fvdl Exp $ */
/*
@@ -260,7 +260,7 @@ db_stack_trace_print(db_expr_t addr, boolean_t have_addr, db_expr_t count,
if (lastframe == 0 && offset == 0 && !have_addr) {
/* We have a breakpoint before the frame is set up */
- for (i = min(6, narg); i > 0; i--) {
+ for (i = 0; i < min(6, narg); i++) {
(*pr)("%lx", *db_reg_args[i]);
if (--narg != 0)
(*pr)(",");