mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-23 18:25:27 +00:00
Filter out duplicates from the image list when creating a minidump. See issue 266 for more details.
Reviewer = mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@277 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
f6b3e16ef8
commit
d55398a492
|
@ -385,6 +385,14 @@ void DynamicImages::ReadImageInfoForTask() {
|
||||||
|
|
||||||
// sorts based on loading address
|
// sorts based on loading address
|
||||||
sort(image_list_.begin(), image_list_.end() );
|
sort(image_list_.begin(), image_list_.end() );
|
||||||
|
// remove duplicates - this happens in certain strange cases
|
||||||
|
// You can see it in DashboardClient when Google Gadgets plugin
|
||||||
|
// is installed. Apple's crash reporter log and gdb "info shared"
|
||||||
|
// both show the same library multiple times at the same address
|
||||||
|
|
||||||
|
vector<DynamicImageRef>::iterator it = unique(image_list_.begin(),
|
||||||
|
image_list_.end() );
|
||||||
|
image_list_.erase(it, image_list_.end());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,6 +230,11 @@ class DynamicImageRef {
|
||||||
< (*const_cast<DynamicImageRef&>(inRef).p);
|
< (*const_cast<DynamicImageRef&>(inRef).p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool operator==(const DynamicImageRef &inInfo) const {
|
||||||
|
return (*const_cast<DynamicImageRef*>(this)->p).GetLoadAddress() ==
|
||||||
|
(*const_cast<DynamicImageRef&>(inInfo)).GetLoadAddress();
|
||||||
|
}
|
||||||
|
|
||||||
// Be just like DynamicImage*
|
// Be just like DynamicImage*
|
||||||
DynamicImage *operator->() {return p;}
|
DynamicImage *operator->() {return p;}
|
||||||
operator DynamicImage*() {return p;}
|
operator DynamicImage*() {return p;}
|
||||||
|
|
Loading…
Reference in a new issue