crash-reporter: Validate proc files and log the state of crashed process.

This CL makes the following changes to UserCollector:
1. Check if the maps file is empty after copying proc files to the
   temporary container directory, which prevents the core-to-minidump
   conversion failure due to unusable maps file.
2. Obtain and log the state of the crashed process, which helps
   determine if the crashed process is in the zombie state.
3. Refactor the status file processing code.

BUG=chromium-os:24820
TEST=Tested the following:
1. Build crash-reporter and run unit tests.
2. Run the following autotest tests on a Cr48:
   - logging_CrashSender
   - logging_UserCrash
3. Check that the process state of a crashed process is logged in
   /var/log/messages.

Change-Id: Iebaf9c36c18185c703c18e7028ee4673dd9ebc93
Reviewed-on: https://gerrit.chromium.org/gerrit/13826
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
3 files changed
tree: b73ee6583c109bdad935bbf948118852494f0d1e
  1. crash_reporter/