aboutsummaryrefslogtreecommitdiff
path: root/src/processor/microdump.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/processor/microdump.cc')
-rw-r--r--src/processor/microdump.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/processor/microdump.cc b/src/processor/microdump.cc
index 4af62f56..f8922228 100644
--- a/src/processor/microdump.cc
+++ b/src/processor/microdump.cc
@@ -54,6 +54,7 @@ static const char kMicrodumpBegin[] = "-----BEGIN BREAKPAD MICRODUMP-----";
static const char kMicrodumpEnd[] = "-----END BREAKPAD MICRODUMP-----";
static const char kOsKey[] = ": O ";
static const char kCpuKey[] = ": C ";
+static const char kCrashReasonKey[] = ": R ";
static const char kGpuKey[] = ": G ";
static const char kMmapKey[] = ": M ";
static const char kStackKey[] = ": S ";
@@ -212,7 +213,9 @@ Microdump::Microdump(const string& contents)
: context_(new MicrodumpContext()),
stack_region_(new MicrodumpMemoryRegion()),
modules_(new MicrodumpModules()),
- system_info_(new SystemInfo()) {
+ system_info_(new SystemInfo()),
+ crash_reason_(),
+ crash_address_(0u) {
assert(!contents.empty());
bool in_microdump = false;
@@ -350,6 +353,15 @@ Microdump::Microdump(const string& contents)
} else {
std::cerr << "Unsupported architecture: " << arch << std::endl;
}
+ } else if ((pos = line.find(kCrashReasonKey)) != string::npos) {
+ string crash_reason_str(line, pos + strlen(kCrashReasonKey));
+ std::istringstream crash_reason_tokens(crash_reason_str);
+ string signal;
+ string address;
+ crash_reason_tokens >> signal;
+ crash_reason_tokens >> crash_reason_;
+ crash_reason_tokens >> address;
+ crash_address_ = HexStrToL<uint64_t>(address);
} else if ((pos = line.find(kGpuKey)) != string::npos) {
string gpu_str(line, pos + strlen(kGpuKey));
if (strcmp(gpu_str.c_str(), kGpuUnknown) != 0) {