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.

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

Change-Id: Iebaf9c36c18185c703c18e7028ee4673dd9ebc93
Reviewed-by: Ken Mixter <>
Tested-by: Ben Chan <>
Commit-Ready: Ben Chan <>
3 files changed
tree: b73ee6583c109bdad935bbf948118852494f0d1e
  1. crash_reporter/