svn commit: r303648 - head/sys/ddb
Conrad E. Meyer
cem at FreeBSD.org
Mon Aug 1 22:41:51 UTC 2016
Author: cem
Date: Mon Aug 1 22:41:50 2016
New Revision: 303648
URL: https://svnweb.freebsd.org/changeset/base/303648
Log:
Fix ddb "show proc" to show full arguments
PR: 200052
Submitted by: Chang-Hsien Tsai <luke.tw AT gmail.com>
Modified:
head/sys/ddb/db_ps.c
Modified: head/sys/ddb/db_ps.c
==============================================================================
--- head/sys/ddb/db_ps.c Mon Aug 1 22:39:51 2016 (r303647)
+++ head/sys/ddb/db_ps.c Mon Aug 1 22:41:50 2016 (r303648)
@@ -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);
More information about the svn-src-head
mailing list