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

Unified Diff: snapshot/win/pe_image_reader.h

Issue 1311003003: Implement ModuleSnapshotWin::UUID (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 years, 4 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
Index: snapshot/win/pe_image_reader.h
diff --git a/snapshot/win/pe_image_reader.h b/snapshot/win/pe_image_reader.h
index 71b4863e8ffdaa0777091bdb87590e3f078d7ffd..b619b8fc1cc743c4dd6d12fbd59b3567be63d04b 100644
--- a/snapshot/win/pe_image_reader.h
+++ b/snapshot/win/pe_image_reader.h
@@ -21,6 +21,7 @@
#include "base/basictypes.h"
#include "util/misc/initialization_state_dcheck.h"
+#include "util/misc/uuid.h"
#include "util/win/address_types.h"
#include "util/win/checked_win_address_range.h"
@@ -93,7 +94,21 @@ class PEImageReader {
//! messages. Other failures will result in messages being logged.
bool GetCrashpadInfo(process_types::CrashpadInfo* crashpad_info) const;
+ //! \brief Obtains information from the module's debug directory, if any.
+ //!
+ //! \param[out] uuid The unique identifier of the executable/PDB.
+ //! \param[out] age The age field for the pdb (the number of times it's been
+ //! relinked).
+ //! \param[out] pdbname Name of the pdb file.
+ //! \return `true` on success, or `false` if the module has no debug directory
+ //! entry.
+ bool DebugDirectoryInformation(UUID* uuid, DWORD* age, std::string* pdbname);
+
private:
+ //! \brief Reads the `NT_HEADERS` from the beginning of the image.
Mark Mentovai 2015/09/01 01:20:31 IMAGE_NT_HEADERS?
scottmg 2015/09/01 16:29:53 Done.
+ bool ReadNtHeaders(WinVMAddress* nt_header_address,
+ IMAGE_NT_HEADERS* nt_headers) const;
+
//! \brief Finds a given section by name in the image.
bool GetSectionByName(const std::string& name,
IMAGE_SECTION_HEADER* section) const;

Powered by Google App Engine
This is Rietveld 408576698