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

Unified Diff: snapshot/win/pe_image_annotations_reader.cc

Issue 1355503005: win: Make reading CrashpadInfo work across bitness (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 5 years, 3 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 | « snapshot/win/pe_image_annotations_reader.h ('k') | snapshot/win/pe_image_annotations_reader_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/win/pe_image_annotations_reader.cc
diff --git a/snapshot/win/pe_image_annotations_reader.cc b/snapshot/win/pe_image_annotations_reader.cc
index c2e6e73b86ef6dae5d34faba11ac84535aac4c9a..f2d145479d218a6a23954f1101d9f05507ebaa77 100644
--- a/snapshot/win/pe_image_annotations_reader.cc
+++ b/snapshot/win/pe_image_annotations_reader.cc
@@ -20,6 +20,7 @@
#include "client/simple_string_dictionary.h"
#include "snapshot/win/pe_image_reader.h"
#include "snapshot/win/process_reader_win.h"
+#include "util/win/process_structs.h"
namespace crashpad {
@@ -34,13 +35,20 @@ PEImageAnnotationsReader::PEImageAnnotationsReader(
std::map<std::string, std::string> PEImageAnnotationsReader::SimpleMap() const {
std::map<std::string, std::string> simple_map_annotations;
- ReadCrashpadSimpleAnnotations(&simple_map_annotations);
+ if (process_reader_->Is64Bit()) {
+ ReadCrashpadSimpleAnnotations<process_types::internal::Traits64>(
+ &simple_map_annotations);
+ } else {
+ ReadCrashpadSimpleAnnotations<process_types::internal::Traits32>(
+ &simple_map_annotations);
+ }
return simple_map_annotations;
}
+template <class Traits>
void PEImageAnnotationsReader::ReadCrashpadSimpleAnnotations(
std::map<std::string, std::string>* simple_map_annotations) const {
- process_types::CrashpadInfo crashpad_info;
+ process_types::CrashpadInfo<Traits> crashpad_info;
if (!pe_image_reader_->GetCrashpadInfo(&crashpad_info))
return;
« no previous file with comments | « snapshot/win/pe_image_annotations_reader.h ('k') | snapshot/win/pe_image_annotations_reader_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698