aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/google_breakpad/processor/minidump.h5
-rw-r--r--src/processor/minidump.cc24
2 files changed, 24 insertions, 5 deletions
diff --git a/src/google_breakpad/processor/minidump.h b/src/google_breakpad/processor/minidump.h
index 55b09533..474382b9 100644
--- a/src/google_breakpad/processor/minidump.h
+++ b/src/google_breakpad/processor/minidump.h
@@ -451,6 +451,11 @@ class MinidumpModule : public MinidumpObject,
// be read.
bool module_valid_;
+ // True if debug info was read from the module. Certain modules
+ // may contain debug records in formats we don't support,
+ // so we can just set this to false to ignore them.
+ bool has_debug_info_;
+
MDRawModule module_;
// Cached module name.
diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc
index f4817044..19dbaeb0 100644
--- a/src/processor/minidump.cc
+++ b/src/processor/minidump.cc
@@ -1296,6 +1296,7 @@ MinidumpModule::MinidumpModule(Minidump* minidump)
module_valid_(false),
module_(),
name_(NULL),
+ has_debug_info_(false),
cv_record_(NULL),
cv_record_signature_(MD_CVINFOUNKNOWN_SIGNATURE),
misc_record_(NULL) {
@@ -1320,6 +1321,7 @@ bool MinidumpModule::Read() {
misc_record_ = NULL;
module_valid_ = false;
+ has_debug_info_ = false;
valid_ = false;
if (!minidump_->ReadBytes(&module_, MD_MODULE_SIZE)) {
@@ -1380,6 +1382,9 @@ bool MinidumpModule::ReadAuxiliaryData() {
return false;
}
+ // At this point, we have enough info for the module to be valid.
+ valid_ = true;
+
// CodeView and miscellaneous debug records are only required if the
// module indicates that they exist.
if (module_.cv_record.data_size && !GetCVRecord(NULL)) {
@@ -1394,7 +1399,7 @@ bool MinidumpModule::ReadAuxiliaryData() {
return false;
}
- valid_ = true;
+ has_debug_info_ = true;
return true;
}
@@ -1415,6 +1420,9 @@ string MinidumpModule::code_identifier() const {
return "";
}
+ if (!has_debug_info_)
+ return "";
+
MinidumpSystemInfo *minidump_system_info = minidump_->GetSystemInfo();
if (!minidump_system_info) {
BPLOG(ERROR) << "MinidumpModule code_identifier requires "
@@ -1471,6 +1479,9 @@ string MinidumpModule::debug_file() const {
return "";
}
+ if (!has_debug_info_)
+ return "";
+
string file;
// Prefer the CodeView record if present.
if (cv_record_) {
@@ -1547,6 +1558,9 @@ string MinidumpModule::debug_identifier() const {
return "";
}
+ if (!has_debug_info_)
+ return "";
+
string identifier;
// Use the CodeView record if present.
@@ -2090,10 +2104,10 @@ bool MinidumpModuleList::Read(u_int32_t expected_size) {
MinidumpModule* module = &(*modules)[module_index];
if (!module->ReadAuxiliaryData()) {
- BPLOG(ERROR) << "MinidumpModuleList could not read module auxiliary "
- "data for module " <<
- module_index << "/" << module_count;
- return false;
+ BPLOG(INFO) << "MinidumpModuleList could not read module auxiliary "
+ "data for module " <<
+ module_index << "/" << module_count;
+ continue;
}
// It is safe to use module->code_file() after successfully calling