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

Unified Diff: minidump/test/minidump_writable_test_util.cc

Issue 1379873005: win: Write memory map info as MINIDUMP_MEMORY_INFO[_LIST] (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@save-peb-more-2
Patch Set: headers Created 5 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') | snapshot/snapshot_test.gyp » ('j') | 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 d16aed9472fa9cd290f52c56d030939206bfa333..ef00f40a610f3bed68d7219d11d01225a9ad3bc7 100644
--- a/minidump/test/minidump_writable_test_util.cc
+++ b/minidump/test/minidump_writable_test_util.cc
@@ -181,6 +181,14 @@ struct MinidumpThreadListTraits {
}
};
+struct MinidumpMemoryInfoListTraits {
+ using ListType = MINIDUMP_MEMORY_INFO_LIST;
+ enum : size_t { kElementSize = sizeof(MINIDUMP_MEMORY_INFO) };
+ static size_t ElementCount(const ListType* list) {
+ return static_cast<size_t>(list->NumberOfEntries);
+ }
+};
+
struct MinidumpModuleCrashpadInfoListTraits {
using ListType = MinidumpModuleCrashpadInfoList;
enum : size_t { kElementSize = sizeof(MinidumpModuleCrashpadInfoLink) };
@@ -245,6 +253,14 @@ const MINIDUMP_THREAD_LIST* MinidumpWritableAtLocationDescriptor<
}
template <>
+const MINIDUMP_MEMORY_INFO_LIST* MinidumpWritableAtLocationDescriptor<
+ MINIDUMP_MEMORY_INFO_LIST>(const std::string& file_contents,
+ const MINIDUMP_LOCATION_DESCRIPTOR& location) {
+ return MinidumpListAtLocationDescriptor<MinidumpMemoryInfoListTraits>(
+ file_contents, location);
+}
+
+template <>
const MinidumpModuleCrashpadInfoList*
MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfoList>(
const std::string& file_contents,
« no previous file with comments | « minidump/test/minidump_writable_test_util.h ('k') | snapshot/snapshot_test.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698