aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authornealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-06-04 22:57:09 +0000
committernealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-06-04 22:57:09 +0000
commitd55398a492d56f7f136f20d65172cbf541e06b0b (patch)
tree099d4fd1c43ae1153d5eb5a9c8b970d638332bc0 /src/client
parentSet the dump thread id and the requesting thread id properties of MDRawBreakp... (diff)
downloadbreakpad-d55398a492d56f7f136f20d65172cbf541e06b0b.tar.xz
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
Diffstat (limited to 'src/client')
-rw-r--r--src/client/mac/handler/dynamic_images.cc8
-rw-r--r--src/client/mac/handler/dynamic_images.h5
2 files changed, 13 insertions, 0 deletions
diff --git a/src/client/mac/handler/dynamic_images.cc b/src/client/mac/handler/dynamic_images.cc
index 2c2918f5..7bbcd566 100644
--- a/src/client/mac/handler/dynamic_images.cc
+++ b/src/client/mac/handler/dynamic_images.cc
@@ -385,6 +385,14 @@ void DynamicImages::ReadImageInfoForTask() {
// sorts based on loading address
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());
}
}
}
diff --git a/src/client/mac/handler/dynamic_images.h b/src/client/mac/handler/dynamic_images.h
index 5764280b..c9acf70a 100644
--- a/src/client/mac/handler/dynamic_images.h
+++ b/src/client/mac/handler/dynamic_images.h
@@ -230,6 +230,11 @@ class DynamicImageRef {
< (*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*
DynamicImage *operator->() {return p;}
operator DynamicImage*() {return p;}