From 4ac5ce523aab3cd6f464ae56149e56b2d7ac803c Mon Sep 17 00:00:00 2001 From: jasper Date: Sat, 4 Sep 2021 07:13:14 +0000 Subject: [PATCH] in backtraces, print as many arguments as the function actually has since amd64 is compiled with -msave-args we have all arguments available to print and there's no reason to limit this to six. discussed with kettenis@ --- sys/arch/amd64/amd64/db_trace.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/arch/amd64/amd64/db_trace.c b/sys/arch/amd64/amd64/db_trace.c index 646d3d6100f..e9209c348eb 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.53 2020/05/14 06:58:54 mpi Exp $ */ +/* $OpenBSD: db_trace.c,v 1.54 2021/09/04 07:13:14 jasper Exp $ */ /* $NetBSD: db_trace.c,v 1.1 2003/04/26 18:39:27 fvdl Exp $ */ /* @@ -164,8 +164,7 @@ db_stack_trace_print(db_expr_t addr, int have_addr, db_expr_t count, } } - narg = db_ctf_func_numargs(sym); - if (narg < 0 || narg > 6) + if ((narg = db_ctf_func_numargs(sym)) < 0) narg = 6; if (name == NULL) -- 2.20.1