| Index: snapshot/win/pe_image_reader.h
|
| diff --git a/snapshot/win/pe_image_reader.h b/snapshot/win/pe_image_reader.h
|
| index 2273a8e6ac8bdbf0fed8d28440abb4a6dd2c5b79..716d47fb3e8ba6489e32af72e9719137af73ec6a 100644
|
| --- a/snapshot/win/pe_image_reader.h
|
| +++ b/snapshot/win/pe_image_reader.h
|
| @@ -102,14 +102,25 @@ class PEImageReader {
|
| //! \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);
|
| + bool DebugDirectoryInformation(UUID* uuid,
|
| + DWORD* age,
|
| + std::string* pdbname) const;
|
|
|
| private:
|
| + //! \brief Implementation helper for DebugDirectoryInformation() templated by
|
| + //! `IMAGE_NT_HEADERS` type for different bitnesses.
|
| + 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.
|
| + template <class NtHeadersType>
|
| bool ReadNtHeaders(WinVMAddress* nt_header_address,
|
| - IMAGE_NT_HEADERS* nt_headers) const;
|
| + NtHeadersType* nt_headers) const;
|
|
|
| //! \brief Finds a given section by name in the image.
|
| + template <class NtHeadersType>
|
| bool GetSectionByName(const std::string& name,
|
| IMAGE_SECTION_HEADER* section) const;
|
|
|
|
|