pargs.d [SUBPROCESS NAME] -c [COMMAND]
pargs.d captures the arguments to subprocesses of a specific name that are executed by a command.
-c
Run the specified command cmd and exit upon its completion. If more than one -c option is present on the command line, dtrace exits when all commands have exited, reporting the exit status for each child process as it terminates. The process-ID of the first command is made available to any D programs specified on the command line or using the -s option through the $target macro variable. Refer to the Solaris Dynamic Tracing Guide for more information on macro variables.
Example 1: Showing the arguments handed to cpphs by make (for
debugging GHC builds)
pargs.d cpphs -c make
dtrace(1M)
Here's a sample of the ld output when running make TEST=topHandler02 in ghc/testsuite/: