common.sh: add ps call in dump_trace() to show all commands

This adds a "ps" call in dump_trace() to expose hidden commands and
ease trouble-shooting.

Compared to earlier and well-tested attempt
https://chromium-review.googlesource.com/#/q/I7978bcf03bd279e3bcce17a239ae0301868d8601
... this has two drawbacks: 1. it does not wrap long lines; 2. it
shows two spurious processes: the subshell + the ps call.

However it has one major advantage: it's only one line long instead of fifty.

BUG=None
TEST=./build_image make_it_fail
TEST=Insert "die fake_failure" at the top of update_bootloaders.sh
./build_image base

Change-Id: Iad269ab19d923a8e1efb1222e309bbf88707d991
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/273685
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/common.sh b/common.sh
index 6fd2b8b..b3227eb 100644
--- a/common.sh
+++ b/common.sh
@@ -75,6 +75,7 @@
   p=${#BASH_ARGV[@]}
 
   error "$(date)"
+  error "$(ps f -o pgid,ppid,pid,etime,cputime,%cpu,command)"
 
   # Frame 0 is ourselves so it's always suppressed / does not count.
   for (( n = ${#FUNCNAME[@]}; n > hidden_frames; --n )); do
@@ -90,7 +91,7 @@
       ! (( p -= ${BASH_ARGC[${n} - 1]} ))
     fi
     if [[ ${n} == ${#FUNCNAME[@]} ]]; then
-      error "script called: ${0##/*} ${args}"
+      error "Arguments of $$: ${0##/*} ${args}"
       error "Backtrace:  (most recent call is last)"
     else
       src=${BASH_SOURCE[${n}]##*/}