1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

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@
This commit is contained in:
bluhm 2017-05-08 21:17:09 +00:00
parent ffc2886b8f
commit c8473915ab

View File

@ -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)(",");