aboutsummaryrefslogtreecommitdiff
path: root/src/processor
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-06-26 11:34:13 -0700
committerLei Zhang <thestig@chromium.org>2018-06-28 00:20:01 +0000
commitfac0e886c8dee6418fcd303c1186518cc51e064d (patch)
treeac418c8666117af58d72b87c08c4d51d3a9de956 /src/processor
parentRefactor code out of MinidumpModuleList::Read(). (diff)
downloadbreakpad-fac0e886c8dee6418fcd303c1186518cc51e064d.tar.xz
Only do Android-specific adjustments for Android minidumps.
Change-Id: I33b1f988766f79b473127c4b56b1c81021b89631 Reviewed-on: https://chromium-review.googlesource.com/1115436 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Diffstat (limited to 'src/processor')
-rw-r--r--src/processor/minidump.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc
index fa21f273..d6309877 100644
--- a/src/processor/minidump.cc
+++ b/src/processor/minidump.cc
@@ -2725,8 +2725,10 @@ bool MinidumpModuleList::Read(uint32_t expected_size) {
return false;
}
- if (!StoreRange(module, base_address, module_index, module_count)) {
- if (base_address >= last_end_address) {
+ const bool is_android = minidump_->IsAndroid();
+ if (!StoreRange(module, base_address, module_index, module_count,
+ is_android)) {
+ if (!is_android || base_address >= last_end_address) {
BPLOG(ERROR) << "MinidumpModuleList could not store module "
<< module_index << "/" << module_count << ", "
<< module.code_file() << ", " << HexString(base_address)
@@ -2737,6 +2739,7 @@ bool MinidumpModuleList::Read(uint32_t expected_size) {
// If failed due to apparent range overlap the cause may be the client
// correction applied for Android packed relocations. If this is the
// case, back out the client correction and retry.
+ assert(is_android);
module_size -= last_end_address - base_address;
base_address = last_end_address;
if (!range_map_->StoreRange(base_address, module_size, module_index)) {
@@ -2762,7 +2765,8 @@ bool MinidumpModuleList::Read(uint32_t expected_size) {
bool MinidumpModuleList::StoreRange(const MinidumpModule& module,
uint64_t base_address,
uint32_t module_index,
- uint32_t module_count) {
+ uint32_t module_count,
+ bool is_android) {
if (range_map_->StoreRange(base_address, module.size(), module_index))
return true;
@@ -2770,7 +2774,7 @@ bool MinidumpModuleList::StoreRange(const MinidumpModule& module,
// entries for JITted code, so ignore these.
// TODO(wfh): Remove this code when Android is fixed.
// See https://crbug.com/439531
- if (IsDevAshmem(module.code_file())) {
+ if (is_android && IsDevAshmem(module.code_file())) {
BPLOG(INFO) << "MinidumpModuleList ignoring overlapping module "
<< module_index << "/" << module_count << ", "
<< module.code_file() << ", " << HexString(base_address) << "+"