From 5f00f45775fbe4a6a461def3bd6a854595bccb7a Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Mon, 1 Aug 2016 22:41:50 +0000 Subject: [PATCH] Fix ddb "show proc" to show full arguments PR: 200052 Submitted by: Chang-Hsien Tsai --- sys/ddb/db_ps.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c index ab375d5e7ae9..83cad2ea7576 100644 --- a/sys/ddb/db_ps.c +++ b/sys/ddb/db_ps.c @@ -440,9 +440,16 @@ DB_SHOW_COMMAND(proc, db_show_proc) p->p_leader); if (p->p_sysent != NULL) db_printf(" ABI: %s\n", p->p_sysent->sv_name); - if (p->p_args != NULL) - db_printf(" arguments: %.*s\n", (int)p->p_args->ar_length, - p->p_args->ar_args); + if (p->p_args != NULL) { + db_printf(" arguments: "); + for (i = 0; i < (int)p->p_args->ar_length; i++) { + if (p->p_args->ar_args[i] == '\0') + db_printf(" "); + else + db_printf("%c", p->p_args->ar_args[i]); + } + db_printf("\n"); + } db_printf(" threads: %d\n", p->p_numthreads); FOREACH_THREAD_IN_PROC(p, td) { dumpthread(p, td, 1);