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

Unified Diff: snapshot/win/pe_image_reader.h

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_test.cc ('k') | snapshot/win/pe_image_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/win/pe_image_reader.h
diff --git a/snapshot/win/pe_image_reader.h b/snapshot/win/pe_image_reader.h
index 716d47fb3e8ba6489e32af72e9719137af73ec6a..73a9e3823b30315796c706f626b333daf2e87cb2 100644
--- a/snapshot/win/pe_image_reader.h
+++ b/snapshot/win/pe_image_reader.h
@@ -24,6 +24,7 @@
#include "util/misc/uuid.h"
#include "util/win/address_types.h"
#include "util/win/checked_win_address_range.h"
+#include "util/win/process_structs.h"
namespace crashpad {
@@ -31,7 +32,7 @@ class ProcessReaderWin;
namespace process_types {
-// TODO(scottmg): Genericize and/or? move process_types out of mac/.
+template <class Traits>
struct CrashpadInfo {
uint32_t signature;
uint32_t size;
@@ -39,10 +40,7 @@ struct CrashpadInfo {
uint8_t crashpad_handler_behavior; // TriState.
uint8_t system_crash_reporter_forwarding; // TriState.
uint16_t padding_0;
- uint64_t simple_annotations; // TODO(scottmg): x86/64.
-};
-
-struct Section {
+ typename Traits::Pointer simple_annotations;
};
} // namespace process_types
@@ -92,7 +90,9 @@ class PEImageReader {
//! \return `true` on success, `false` on failure. If the module does not have
//! a `CPADinfo` section, this will return `false` without logging any
//! messages. Other failures will result in messages being logged.
- bool GetCrashpadInfo(process_types::CrashpadInfo* crashpad_info) const;
+ template <class Traits>
+ bool GetCrashpadInfo(
+ process_types::CrashpadInfo<Traits>* crashpad_info) const;
//! \brief Obtains information from the module's debug directory, if any.
//!
« no previous file with comments | « snapshot/win/pe_image_annotations_reader_test.cc ('k') | snapshot/win/pe_image_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698