Date: Mon, 29 Oct 2018 12:41:50 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r339855 - stable/11/sys/ddb Message-ID: <201810291241.w9TCfo8f080838@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Mon Oct 29 12:41:49 2018 New Revision: 339855 URL: https://svnweb.freebsd.org/changeset/base/339855 Log: MFC r303648: Fix ddb "show proc" to show full arguments PR: 200052 Modified: stable/11/sys/ddb/db_ps.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ddb/db_ps.c ============================================================================== --- stable/11/sys/ddb/db_ps.c Mon Oct 29 12:13:05 2018 (r339854) +++ stable/11/sys/ddb/db_ps.c Mon Oct 29 12:41:49 2018 (r339855) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810291241.w9TCfo8f080838>