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

Unified Diff: snapshot/win/pe_image_reader.h

Issue 1411123011: win: Don't attempt to read a nonexistent IMAGE_DIRECTORY_ENTRY_DEBUG (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback 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 | « no previous file | 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 73a9e3823b30315796c706f626b333daf2e87cb2..f6364d99f2d08389dfad5149af3e5018f53be3ce 100644
--- a/snapshot/win/pe_image_reader.h
+++ b/snapshot/win/pe_image_reader.h
@@ -109,15 +109,30 @@ class PEImageReader {
private:
//! \brief Implementation helper for DebugDirectoryInformation() templated by
//! `IMAGE_NT_HEADERS` type for different bitnesses.
+ //!
+ //! \return `true` on success, with the parameters set appropriately. `false`
+ //! on failure. This method may return `false` without logging anything in
+ //! the case of a module that does not contain relevant debugging
+ //! information but is otherwise properly structured.
template <class NtHeadersType>
bool ReadDebugDirectoryInformation(UUID* uuid,
DWORD* age,
std::string* pdbname) const;
//! \brief Reads the `IMAGE_NT_HEADERS` from the beginning of the image.
+ //!
+ //! \param[out] nt_headers The contents of the templated NtHeadersType
+ //! structure read from the remote process.
+ //! \param[out] nt_headers_address The address of the templated NtHeadersType
+ //! structure in the remote process’ address space. If this information is
+ //! not needed, this parameter may be `nullptr`.
+ //!
+ //! \return `true` on success, with \a nt_headers and optionally \a
+ //! nt_headers_address set appropriately. `false` on failure, with a
+ //! message logged.
template <class NtHeadersType>
- bool ReadNtHeaders(WinVMAddress* nt_header_address,
- NtHeadersType* nt_headers) const;
+ bool ReadNtHeaders(NtHeadersType* nt_headers,
+ WinVMAddress* nt_headers_address) const;
//! \brief Finds a given section by name in the image.
template <class NtHeadersType>
« no previous file with comments | « no previous file | snapshot/win/pe_image_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698