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

Unified Diff: base/win/pe_image.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « base/win/pe_image.h ('k') | base/win/pe_image_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/pe_image.cc
diff --git a/base/win/pe_image.cc b/base/win/pe_image.cc
index e226b6a67072025c0e090ef22db9d421b7fdcd30..572b4d927e2eaf65cf147dc584fd70ea50166236 100644
--- a/base/win/pe_image.cc
+++ b/base/win/pe_image.cc
@@ -20,9 +20,6 @@ struct EnumAllImportsStorage {
namespace {
- // PdbInfo Signature
- const DWORD kPdbInfoSignature = 'SDSR';
-
// Compare two strings byte by byte on an unsigned basis.
// if s1 == s2, return 0
// if s1 < s2, return negative
@@ -38,12 +35,6 @@ namespace {
*reinterpret_cast<const unsigned char*>(s2));
}
- struct PdbInfo {
- DWORD Signature;
- GUID Guid;
- DWORD Age;
- char PdbFileName[1];
- };
} // namespace
// Callback used to enumerate imports. See EnumImportChunksFunction.
@@ -151,36 +142,6 @@ PIMAGE_SECTION_HEADER PEImage::GetImageSectionHeaderByName(
return ret;
}
-bool PEImage::GetDebugId(LPGUID guid, LPDWORD age) const {
- if (NULL == guid || NULL == age) {
- return false;
- }
-
- DWORD debug_directory_size =
- GetImageDirectoryEntrySize(IMAGE_DIRECTORY_ENTRY_DEBUG);
- PIMAGE_DEBUG_DIRECTORY debug_directory =
- reinterpret_cast<PIMAGE_DEBUG_DIRECTORY>(
- GetImageDirectoryEntryAddr(IMAGE_DIRECTORY_ENTRY_DEBUG));
-
- size_t directory_count =
- debug_directory_size / sizeof(IMAGE_DEBUG_DIRECTORY);
-
- for (size_t index = 0; index < directory_count; ++index) {
- if (debug_directory[index].Type == IMAGE_DEBUG_TYPE_CODEVIEW) {
- PdbInfo* pdb_info = reinterpret_cast<PdbInfo*>(
- RVAToAddr(debug_directory[index].AddressOfRawData));
- if (pdb_info->Signature != kPdbInfoSignature) {
- // Unsupported PdbInfo signature
- return false;
- }
- *guid = pdb_info->Guid;
- *age = pdb_info->Age;
- return true;
- }
- }
- return false;
-}
-
PDWORD PEImage::GetExportEntry(LPCSTR name) const {
PIMAGE_EXPORT_DIRECTORY exports = GetExportDirectory();
« no previous file with comments | « base/win/pe_image.h ('k') | base/win/pe_image_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698