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

Unified Diff: minidump/test/minidump_writable_test_util.cc

Issue 675803002: Add MinidumpCrashpadModule, its list form, their writers, and their tests (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Update for https://codereview.chromium.org/679443002/ Created 6 years, 2 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
« no previous file with comments | « minidump/test/minidump_writable_test_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/test/minidump_writable_test_util.cc
diff --git a/minidump/test/minidump_writable_test_util.cc b/minidump/test/minidump_writable_test_util.cc
index 3e98a0335dadd3abe9ac94810833fc37dd79470e..ccee7ed12c17e1453a5d5bf792378861d3f514c8 100644
--- a/minidump/test/minidump_writable_test_util.cc
+++ b/minidump/test/minidump_writable_test_util.cc
@@ -160,6 +160,14 @@ struct MinidumpThreadListTraits {
}
};
+struct MinidumpModuleCrashpadInfoListTraits {
+ typedef MinidumpModuleCrashpadInfoList ListType;
+ static constexpr size_t kElementSize = sizeof(MINIDUMP_LOCATION_DESCRIPTOR);
+ static size_t ElementCount(const ListType* list) {
+ return list->count;
+ }
+};
+
struct MinidumpSimpleStringDictionaryListTraits {
typedef MinidumpSimpleStringDictionary ListType;
static constexpr size_t kElementSize =
@@ -217,6 +225,15 @@ const MINIDUMP_THREAD_LIST* MinidumpWritableAtLocationDescriptor<
}
template <>
+const MinidumpModuleCrashpadInfoList*
+MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfoList>(
+ const std::string& file_contents,
+ const MINIDUMP_LOCATION_DESCRIPTOR& location) {
+ return MinidumpListAtLocationDescriptor<MinidumpModuleCrashpadInfoListTraits>(
+ file_contents, location);
+}
+
+template <>
const MinidumpSimpleStringDictionary*
MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>(
const std::string& file_contents,
« no previous file with comments | « minidump/test/minidump_writable_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698