in backtraces, print as many arguments as the function actually has
authorjasper <jasper@openbsd.org>
Sat, 4 Sep 2021 07:13:14 +0000 (07:13 +0000)
committerjasper <jasper@openbsd.org>
Sat, 4 Sep 2021 07:13:14 +0000 (07:13 +0000)
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

index 646d3d6..e9209c3 100644 (file)
@@ -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)