crash: Add more context to crash_sender crash logs.

To assist with debugging crash_sender crashes, gather information about
what files exist in the spool directories and which crash crash_sender
was processing when it crashed.

BUG=chromium:1108944
TEST=ran commands on DUT by hand and verified that relevant \
     .meta files and directory contents were printed

Change-Id: I329aed0a9d504730659c534dc50d94b1226fe3bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2317780
Tested-by: Miriam Zimmerman <mutexlox@chromium.org>
Reviewed-by: Ian Barkley-Yeung <iby@chromium.org>
Commit-Queue: Miriam Zimmerman <mutexlox@chromium.org>
diff --git a/crash-reporter/crash_reporter_logs.conf b/crash-reporter/crash_reporter_logs.conf
index b7733e4..82ae678 100644
--- a/crash-reporter/crash_reporter_logs.conf
+++ b/crash-reporter/crash_reporter_logs.conf
@@ -269,6 +269,19 @@
 crash_sender=\
   echo "===/var/log/messages==="; \
   tail -n 50 /var/log/messages | grep crash_sender; \
+  dirs="/var/spool/crash /home/chronos/crash /run/daemon-store/crash/*/\
+      /home/chronos/user/crash"; \
+  echo "===spool contents==="; \
+  ls -l $dirs; \
+  echo "===in-progress meta contents==="; \
+  for d in $dirs; do \
+    for p in $d/*.processing; do \
+      if [ -f $p ]; then\
+        echo "$p:"; \
+        cat ${p%.processing}.meta; \
+      fi \
+    done; \
+  done; \
   echo EOF
 
 # Collect last 100 lines of logs from mount-encrypted for debugging encrypted