Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1308)

Unified Diff: src/processor/minidump.cc

Issue 2029953003: Adding support for overlapping ranges to RangeMap. (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/processor/minidump.cc
diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc
index 84f013d061a5f668c19886c72d5b1b2a3b621a6c..bc04fb035af385045d619a4f4fe708b727bdcedb 100644
--- a/src/processor/minidump.cc
+++ b/src/processor/minidump.cc
@@ -2612,7 +2612,8 @@ bool MinidumpModuleList::Read(uint32_t expected_size) {
return false;
}
- if (!range_map_->StoreRange(base_address, module_size, module_index)) {
+ if (!range_map_->StoreRange(base_address, 0 /* delta */, module_size,
+ module_index)) {
// Android's shared memory implementation /dev/ashmem can contain
// duplicate entries for JITted code, so ignore these.
// TODO(wfh): Remove this code when Android is fixed.
@@ -2626,7 +2627,7 @@ bool MinidumpModuleList::Read(uint32_t expected_size) {
// If this is the case, back out the client correction and retry.
module_size -= last_end_address - base_address;
base_address = last_end_address;
- if (!range_map_->StoreRange(base_address,
+ if (!range_map_->StoreRange(base_address, 0 /* delta */,
module_size, module_index)) {
BPLOG(ERROR) << "MinidumpModuleList could not store module " <<
module_index << "/" << module_count << ", " <<
@@ -2672,7 +2673,7 @@ const MinidumpModule* MinidumpModuleList::GetModuleForAddress(
}
unsigned int module_index;
- if (!range_map_->RetrieveRange(address, &module_index, NULL, NULL)) {
+ if (!range_map_->RetrieveRange(address, &module_index, NULL, NULL, NULL)) {
BPLOG(INFO) << "MinidumpModuleList has no module at " <<
HexString(address);
return NULL;
@@ -2708,7 +2709,8 @@ const MinidumpModule* MinidumpModuleList::GetModuleAtSequence(
}
unsigned int module_index;
- if (!range_map_->RetrieveRangeAtIndex(sequence, &module_index, NULL, NULL)) {
+ if (!range_map_->RetrieveRangeAtIndex(sequence, &module_index, NULL, NULL,
+ NULL)) {
BPLOG(ERROR) << "MinidumpModuleList has no module at sequence " << sequence;
return NULL;
}
@@ -2876,7 +2878,8 @@ bool MinidumpMemoryList::Read(uint32_t expected_size) {
return false;
}
- if (!range_map_->StoreRange(base_address, region_size, region_index)) {
+ if (!range_map_->StoreRange(base_address, 0 /* delta */, region_size,
+ region_index)) {
BPLOG(ERROR) << "MinidumpMemoryList could not store memory region " <<
region_index << "/" << region_count << ", " <<
HexString(base_address) << "+" <<
@@ -2923,7 +2926,7 @@ MinidumpMemoryRegion* MinidumpMemoryList::GetMemoryRegionForAddress(
}
unsigned int region_index;
- if (!range_map_->RetrieveRange(address, &region_index, NULL, NULL)) {
+ if (!range_map_->RetrieveRange(address, &region_index, NULL, NULL, NULL)) {
BPLOG(INFO) << "MinidumpMemoryList has no memory region at " <<
HexString(address);
return NULL;
@@ -3981,7 +3984,8 @@ bool MinidumpMemoryInfoList::Read(uint32_t expected_size) {
uint64_t base_address = info->GetBase();
uint64_t region_size = info->GetSize();
- if (!range_map_->StoreRange(base_address, region_size, index)) {
+ if (!range_map_->StoreRange(base_address, 0 /* delta */, region_size,
+ index)) {
BPLOG(ERROR) << "MinidumpMemoryInfoList could not store"
" memory region " <<
index << "/" << header.number_of_entries << ", " <<
@@ -4027,7 +4031,7 @@ const MinidumpMemoryInfo* MinidumpMemoryInfoList::GetMemoryInfoForAddress(
}
unsigned int info_index;
- if (!range_map_->RetrieveRange(address, &info_index, NULL, NULL)) {
+ if (!range_map_->RetrieveRange(address, &info_index, NULL, NULL, NULL)) {
BPLOG(INFO) << "MinidumpMemoryInfoList has no memory info at " <<
HexString(address);
return NULL;

Powered by Google App Engine
This is Rietveld 408576698