diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/mac/Breakpad.xcodeproj/project.pbxproj | 24 | ||||
-rw-r--r-- | src/common/mac/file_id.cc | 8 | ||||
-rw-r--r-- | src/common/mac/macho_id.cc | 36 | ||||
-rw-r--r-- | src/common/mac/macho_id.h | 19 | ||||
-rw-r--r-- | src/tools/mac/crash_report/crash_report.xcodeproj/project.pbxproj | 15 | ||||
-rw-r--r-- | src/tools/mac/crash_report/on_demand_symbol_supplier.mm | 11 | ||||
-rw-r--r-- | src/tools/mac/dump_syms/dump_syms.xcodeproj/project.pbxproj | 15 |
7 files changed, 51 insertions, 77 deletions
diff --git a/src/client/mac/Breakpad.xcodeproj/project.pbxproj b/src/client/mac/Breakpad.xcodeproj/project.pbxproj index 2dcbc134..e60fe71a 100644 --- a/src/client/mac/Breakpad.xcodeproj/project.pbxproj +++ b/src/client/mac/Breakpad.xcodeproj/project.pbxproj @@ -38,6 +38,11 @@ 3329D4ED0FA16D820007BBC5 /* Breakpad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3329D4EC0FA16D820007BBC5 /* Breakpad.xib */; }; 33880C800F9E097100817F82 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 33880C7E0F9E097100817F82 /* InfoPlist.strings */; }; 4084699D0F5D9CF900FDCA37 /* crash_report_sender.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4084699C0F5D9CF900FDCA37 /* crash_report_sender.icns */; }; + 4D72CA0E13DFAD5C006CABE3 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CA0D13DFAD5C006CABE3 /* md5.c */; }; + 4D72CA2513DFAE1C006CABE3 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CA0D13DFAD5C006CABE3 /* md5.c */; }; + 4D72CA2F13DFAE65006CABE3 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CA0D13DFAD5C006CABE3 /* md5.c */; }; + 4D72CA3813DFAE91006CABE3 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CA0D13DFAD5C006CABE3 /* md5.c */; }; + 4D72CA3913DFAE92006CABE3 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CA0D13DFAD5C006CABE3 /* md5.c */; }; 4DBE49A6134A4F200072546A /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DBE4769134A4F080072546A /* CoreServices.framework */; }; 4DBE49A7134A4F280072546A /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DBE4769134A4F080072546A /* CoreServices.framework */; }; 4DBE49A8134A4F380072546A /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DBE4769134A4F080072546A /* CoreServices.framework */; }; @@ -51,9 +56,6 @@ 8B3102E611F0D74C00FCF3E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; }; 8B3102EB11F0D78000FCF3E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; }; 8B31FC8211EFD2B800FCF3E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; }; - 8B4BDAAF12012BC5009C7060 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B4BDAA7120124EA009C7060 /* libcrypto.dylib */; }; - 8B4BDABE12012CEF009C7060 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B4BDAA7120124EA009C7060 /* libcrypto.dylib */; }; - 8B4BDAC512012D05009C7060 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B4BDAA7120124EA009C7060 /* libcrypto.dylib */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; D23F4B2E12A7E13200686C8D /* minidump_generator_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D23F4B2C12A7E13200686C8D /* minidump_generator_test.cc */; }; D23F4B3312A7E17700686C8D /* libgtest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D2F9A41512131EF0002747C1 /* libgtest.a */; }; @@ -76,7 +78,6 @@ D246419112BAA52F005170D0 /* convert_UTF.c in Sources */ = {isa = PBXBuildFile; fileRef = F92C53870ECCE6C0009BE4BA /* convert_UTF.c */; }; D246419512BAA54C005170D0 /* file_id.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C53740ECCE635009BE4BA /* file_id.cc */; }; D246419612BAA55A005170D0 /* macho_id.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C537A0ECCE635009BE4BA /* macho_id.cc */; }; - D246419C12BAA65F005170D0 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B4BDAA7120124EA009C7060 /* libcrypto.dylib */; }; D24641A012BAA67F005170D0 /* macho_walker.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C537E0ECCE635009BE4BA /* macho_walker.cc */; }; D24641AF12BAA82D005170D0 /* macho_utilities.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C537C0ECCE635009BE4BA /* macho_utilities.cc */; }; D24641EC12BAC6FB005170D0 /* logging.cc in Sources */ = {isa = PBXBuildFile; fileRef = D244535112426EBB009BBCE0 /* logging.cc */; }; @@ -123,7 +124,6 @@ D2F9A53B121383A1002747C1 /* macho_walker.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C537E0ECCE635009BE4BA /* macho_walker.cc */; }; D2F9A53C121383A1002747C1 /* string_utilities.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C53820ECCE635009BE4BA /* string_utilities.cc */; }; D2F9A53F121383A1002747C1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; }; - D2F9A540121383A1002747C1 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B4BDAA7120124EA009C7060 /* libcrypto.dylib */; }; D2F9A541121383A1002747C1 /* libgtest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D2F9A41512131EF0002747C1 /* libgtest.a */; }; D2F9A553121383DC002747C1 /* crash_generation_server_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = D2F9A4CE121336F7002747C1 /* crash_generation_server_test.cc */; }; F91AF5D00FD60393009D8BE2 /* BreakpadFramework_Test.mm in Sources */ = {isa = PBXBuildFile; fileRef = F91AF5CF0FD60393009D8BE2 /* BreakpadFramework_Test.mm */; }; @@ -548,6 +548,7 @@ 3329D4EC0FA16D820007BBC5 /* Breakpad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Breakpad.xib; path = sender/Breakpad.xib; sourceTree = "<group>"; }; 33880C7F0F9E097100817F82 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = sender/English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; 4084699C0F5D9CF900FDCA37 /* crash_report_sender.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = crash_report_sender.icns; path = sender/crash_report_sender.icns; sourceTree = "<group>"; }; + 4D72CA0D13DFAD5C006CABE3 /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../../common/md5.c; sourceTree = SOURCE_ROOT; }; 4DBE4769134A4F080072546A /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; }; 8B31007011F0CD3C00FCF3E4 /* GTMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMDefines.h; path = ../../common/mac/GTMDefines.h; sourceTree = SOURCE_ROOT; }; 8B3101E911F0CDE300FCF3E4 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; @@ -555,7 +556,6 @@ 8B31027711F0D3AF00FCF3E4 /* BreakpadDebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = BreakpadDebug.xcconfig; path = ../../common/mac/BreakpadDebug.xcconfig; sourceTree = SOURCE_ROOT; }; 8B31027811F0D3AF00FCF3E4 /* BreakpadRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = BreakpadRelease.xcconfig; path = ../../common/mac/BreakpadRelease.xcconfig; sourceTree = SOURCE_ROOT; }; 8B31FFF611F0C90500FCF3E4 /* Breakpad.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Breakpad.xcconfig; path = ../../common/mac/Breakpad.xcconfig; sourceTree = SOURCE_ROOT; }; - 8B4BDAA7120124EA009C7060 /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = usr/lib/libcrypto.dylib; sourceTree = SDKROOT; }; 8DC2EF5B0486A6940098B216 /* Breakpad.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Breakpad.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D23F4B2C12A7E13200686C8D /* minidump_generator_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = minidump_generator_test.cc; path = tests/minidump_generator_test.cc; sourceTree = "<group>"; }; D23F4B9A12A8688800686C8D /* minidump_generator_test_helper.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = minidump_generator_test_helper.cc; path = tests/minidump_generator_test_helper.cc; sourceTree = "<group>"; }; @@ -696,7 +696,6 @@ buildActionMask = 2147483647; files = ( D246418412BAA4BA005170D0 /* Foundation.framework in Frameworks */, - D246419C12BAA65F005170D0 /* libcrypto.dylib in Frameworks */, 4DBE49A6134A4F200072546A /* CoreServices.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -713,7 +712,6 @@ buildActionMask = 2147483647; files = ( D2F9A53F121383A1002747C1 /* Foundation.framework in Frameworks */, - D2F9A540121383A1002747C1 /* libcrypto.dylib in Frameworks */, D2F9A541121383A1002747C1 /* libgtest.a in Frameworks */, 4DBE49A9134A4F460072546A /* CoreServices.framework in Frameworks */, ); @@ -734,7 +732,6 @@ files = ( 8B31FC8211EFD2B800FCF3E4 /* Foundation.framework in Frameworks */, F92C56570ECD113E009BE4BA /* Carbon.framework in Frameworks */, - 8B4BDAAF12012BC5009C7060 /* libcrypto.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -753,7 +750,6 @@ buildActionMask = 2147483647; files = ( 8B31029411F0D54300FCF3E4 /* Foundation.framework in Frameworks */, - 8B4BDABE12012CEF009C7060 /* libcrypto.dylib in Frameworks */, D23F4B3312A7E17700686C8D /* libgtest.a in Frameworks */, 4DBE49A7134A4F280072546A /* CoreServices.framework in Frameworks */, ); @@ -771,7 +767,6 @@ buildActionMask = 2147483647; files = ( 8B3102E611F0D74C00FCF3E4 /* Foundation.framework in Frameworks */, - 8B4BDAC512012D05009C7060 /* libcrypto.dylib in Frameworks */, D2F9A44412131F84002747C1 /* libgtest.a in Frameworks */, 4DBE49A8134A4F380072546A /* CoreServices.framework in Frameworks */, ); @@ -842,7 +837,6 @@ 0867D69AFE84028FC02AAC07 /* Frameworks */ = { isa = PBXGroup; children = ( - 8B4BDAA7120124EA009C7060 /* libcrypto.dylib */, 8B3101E911F0CDE300FCF3E4 /* SenTestingKit.framework */, F9C44EE40EF0A006003AEBAA /* SystemConfiguration.framework */, F92C554A0ECCF530009BE4BA /* Carbon.framework */, @@ -900,6 +894,7 @@ D244540A12439BA0009BBCE0 /* memory_unittest.cc */, F92C53870ECCE6C0009BE4BA /* convert_UTF.c */, F92C53880ECCE6C0009BE4BA /* convert_UTF.h */, + 4D72CA0D13DFAD5C006CABE3 /* md5.c */, F92C53850ECCE6AD009BE4BA /* string_conversion.cc */, F92C53860ECCE6AD009BE4BA /* string_conversion.h */, F92C53840ECCE68D009BE4BA /* mac */, @@ -1648,6 +1643,7 @@ D246419612BAA55A005170D0 /* macho_id.cc in Sources */, D24641A012BAA67F005170D0 /* macho_walker.cc in Sources */, D24641AF12BAA82D005170D0 /* macho_utilities.cc in Sources */, + 4D72CA2513DFAE1C006CABE3 /* md5.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1685,6 +1681,7 @@ D24641ED12BAC6FB005170D0 /* minidump.cc in Sources */, D24641EE12BAC6FB005170D0 /* pathname_stripper.cc in Sources */, D24641EF12BAC6FB005170D0 /* basic_code_modules.cc in Sources */, + 4D72CA3913DFAE92006CABE3 /* md5.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1709,6 +1706,7 @@ F92C56430ECD10CA009BE4BA /* macho_utilities.cc in Sources */, F92C56440ECD10CA009BE4BA /* macho_walker.cc in Sources */, F92C56450ECD10CA009BE4BA /* MachIPC.mm in Sources */, + 4D72CA0E13DFAD5C006CABE3 /* md5.c in Sources */, F92C56460ECD10CA009BE4BA /* minidump_file_writer.cc in Sources */, F92C56470ECD10CA009BE4BA /* minidump_generator.cc in Sources */, F92C56480ECD10CA009BE4BA /* SimpleStringDictionary.mm in Sources */, @@ -1751,6 +1749,7 @@ F93803D60F8083B7004D428B /* macho_walker.cc in Sources */, F93803D70F8083B7004D428B /* string_utilities.cc in Sources */, D23F4B2E12A7E13200686C8D /* minidump_generator_test.cc in Sources */, + 4D72CA2F13DFAE65006CABE3 /* md5.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1790,6 +1789,7 @@ F93DE33F0F82C66B00608B94 /* string_utilities.cc in Sources */, D2F9A3D51212F87C002747C1 /* exception_handler_test.cc in Sources */, D244540B12439BA0009BBCE0 /* memory_unittest.cc in Sources */, + 4D72CA3813DFAE91006CABE3 /* md5.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/src/common/mac/file_id.cc b/src/common/mac/file_id.cc index ebb8c40e..50502e4c 100644 --- a/src/common/mac/file_id.cc +++ b/src/common/mac/file_id.cc @@ -53,19 +53,19 @@ bool FileID::FileIdentifier(unsigned char identifier[16]) { if (fd == -1) return false; - MD5_CTX md5; - MD5_Init(&md5); + MD5Context md5; + MD5Init(&md5); // Read 4k x 2 bytes at a time. This is faster than just 4k bytes, but // doesn't seem to be an unreasonable size for the stack. unsigned char buffer[4096 * 2]; size_t buffer_size = sizeof(buffer); while ((buffer_size = read(fd, buffer, buffer_size) > 0)) { - MD5_Update(&md5, buffer, buffer_size); + MD5Update(&md5, buffer, buffer_size); } close(fd); - MD5_Final(identifier, &md5); + MD5Final(identifier, &md5); return true; } diff --git a/src/common/mac/macho_id.cc b/src/common/mac/macho_id.cc index 486cf536..44e78205 100644 --- a/src/common/mac/macho_id.cc +++ b/src/common/mac/macho_id.cc @@ -37,8 +37,6 @@ extern "C" { // necessary for Leopard #include <fcntl.h> #include <mach-o/loader.h> #include <mach-o/swap.h> - #include <openssl/md5.h> - #include <openssl/sha.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -57,7 +55,6 @@ MachoID::MachoID(const char *path) : file_(0), crc_(0), md5_context_(), - sha1_context_(), update_function_(NULL) { strlcpy(path_, path, sizeof(path_)); file_ = open(path, O_RDONLY); @@ -117,11 +114,7 @@ void MachoID::UpdateCRC(unsigned char *bytes, size_t size) { } void MachoID::UpdateMD5(unsigned char *bytes, size_t size) { - MD5_Update(&md5_context_, bytes, size); -} - -void MachoID::UpdateSHA1(unsigned char *bytes, size_t size) { - SHA_Update(&sha1_context_, bytes, size); + MD5Update(&md5_context_, bytes, size); } void MachoID::Update(MachoWalker *walker, off_t offset, size_t size) { @@ -225,30 +218,13 @@ bool MachoID::MD5(int cpu_type, unsigned char identifier[16]) { MachoWalker walker(path_, WalkerCB, this); update_function_ = &MachoID::UpdateMD5; - if (MD5_Init(&md5_context_)) { - if (!walker.WalkHeader(cpu_type)) - return false; - - MD5_Final(identifier, &md5_context_); - return true; - } - - return false; -} + MD5Init(&md5_context_); -bool MachoID::SHA1(int cpu_type, unsigned char identifier[16]) { - MachoWalker walker(path_, WalkerCB, this); - update_function_ = &MachoID::UpdateSHA1; - - if (SHA_Init(&sha1_context_)) { - if (!walker.WalkHeader(cpu_type)) - return false; - - SHA_Final(identifier, &sha1_context_); - return true; - } + if (!walker.WalkHeader(cpu_type)) + return false; - return false; + MD5Final(identifier, &md5_context_); + return true; } // static diff --git a/src/common/mac/macho_id.h b/src/common/mac/macho_id.h index ea01a6d7..9bcefc56 100644 --- a/src/common/mac/macho_id.h +++ b/src/common/mac/macho_id.h @@ -36,8 +36,8 @@ #include <limits.h> #include <mach-o/loader.h> -#include <openssl/md5.h> -#include <openssl/sha.h> + +#include "common/md5.h" namespace MacFileUtilities { @@ -65,10 +65,6 @@ class MachoID { // Return true on success, false otherwise bool MD5(int cpu_type, unsigned char identifier[16]); - // For the given |cpu_type|, return the SHA1 for the mach-o data segment(s). - // Return true on success, false otherwise - bool SHA1(int cpu_type, unsigned char identifier[16]); - private: // Signature of class member function to be called with data read from file typedef void (MachoID::*UpdateFunction)(unsigned char *bytes, size_t size); @@ -81,14 +77,10 @@ class MachoID { // to each byte. void UpdateMD5(unsigned char *bytes, size_t size); - // Update the SHA1 value by examining |size| |bytes| and applying the - // algorithm to each byte. - void UpdateSHA1(unsigned char *bytes, size_t size); - // Bottleneck for update routines void Update(MachoWalker *walker, off_t offset, size_t size); - // The callback from the MachoWalker for CRC, MD5, and SHA1 + // The callback from the MachoWalker for CRC and MD5 static bool WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, bool swap, void *context); @@ -110,10 +102,7 @@ class MachoID { uint32_t crc_; // The MD5 context - MD5_CTX md5_context_; - - // The SHA1 context - SHA_CTX sha1_context_; + MD5Context md5_context_; // The current update to call from the Update callback UpdateFunction update_function_; diff --git a/src/tools/mac/crash_report/crash_report.xcodeproj/project.pbxproj b/src/tools/mac/crash_report/crash_report.xcodeproj/project.pbxproj index 902df75f..a0e6b3f9 100644 --- a/src/tools/mac/crash_report/crash_report.xcodeproj/project.pbxproj +++ b/src/tools/mac/crash_report/crash_report.xcodeproj/project.pbxproj @@ -24,6 +24,7 @@ 4D2C725D126F9C9200B43EAF /* x86_insn.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C725C126F9C9200B43EAF /* x86_insn.c */; }; 4D2C7264126F9CBB00B43EAF /* ia32_modrm.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C7261126F9CBB00B43EAF /* ia32_modrm.c */; }; 4D2C726D126F9CDC00B43EAF /* x86_imm.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D2C7263126F9CBB00B43EAF /* x86_imm.c */; }; + 4D72CA5713DFBA84006CABE3 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CA5613DFBA84006CABE3 /* md5.c */; }; 557800400BE1F28500EC23E0 /* macho_utilities.cc in Sources */ = {isa = PBXBuildFile; fileRef = 5578003E0BE1F28500EC23E0 /* macho_utilities.cc */; }; 8B31FF2A11F0C62700FCF3E4 /* dwarf_cfi_to_module.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8B31FF2411F0C62700FCF3E4 /* dwarf_cfi_to_module.cc */; }; 8B31FF2B11F0C62700FCF3E4 /* dwarf_cu_to_module.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8B31FF2611F0C62700FCF3E4 /* dwarf_cu_to_module.cc */; }; @@ -35,7 +36,6 @@ 8B31FF8911F0C6FB00FCF3E4 /* module.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8B31FF8611F0C6FB00FCF3E4 /* module.cc */; }; 8B31FFC511F0C8AB00FCF3E4 /* dwarf2diehandler.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8B31FFC311F0C8AB00FCF3E4 /* dwarf2diehandler.cc */; }; 8B40BDC00C0638E4009535AF /* logging.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8B40BDBF0C0638E4009535AF /* logging.cc */; }; - 8B4BDBBD120131CA009C7060 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B4BDBBC120131CA009C7060 /* libcrypto.dylib */; }; 8DD76F9A0486AA7600D96B5E /* crash_report.mm in Sources */ = {isa = PBXBuildFile; fileRef = 08FB7796FE84155DC02AAC07 /* crash_report.mm */; settings = {ATTRIBUTES = (); }; }; 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08FB779EFE84155DC02AAC07 /* Foundation.framework */; }; 9B35FEEA0B26761C008DE8C7 /* basic_code_modules.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9B35FEE70B26761C008DE8C7 /* basic_code_modules.cc */; }; @@ -83,6 +83,7 @@ 4D2C725C126F9C9200B43EAF /* x86_insn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = x86_insn.c; path = ../../../third_party/libdisasm/x86_insn.c; sourceTree = SOURCE_ROOT; }; 4D2C7261126F9CBB00B43EAF /* ia32_modrm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ia32_modrm.c; path = ../../../third_party/libdisasm/ia32_modrm.c; sourceTree = SOURCE_ROOT; }; 4D2C7263126F9CBB00B43EAF /* x86_imm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = x86_imm.c; path = ../../../third_party/libdisasm/x86_imm.c; sourceTree = SOURCE_ROOT; }; + 4D72CA5613DFBA84006CABE3 /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../../../common/md5.c; sourceTree = SOURCE_ROOT; }; 5578003E0BE1F28500EC23E0 /* macho_utilities.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = macho_utilities.cc; path = ../../../common/mac/macho_utilities.cc; sourceTree = SOURCE_ROOT; }; 5578003F0BE1F28500EC23E0 /* macho_utilities.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = macho_utilities.h; path = ../../../common/mac/macho_utilities.h; sourceTree = SOURCE_ROOT; }; 8B31025311F0D2D400FCF3E4 /* Breakpad.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Breakpad.xcconfig; path = ../../../common/mac/Breakpad.xcconfig; sourceTree = SOURCE_ROOT; }; @@ -107,7 +108,6 @@ 8B31FFC311F0C8AB00FCF3E4 /* dwarf2diehandler.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dwarf2diehandler.cc; path = ../../../common/dwarf/dwarf2diehandler.cc; sourceTree = SOURCE_ROOT; }; 8B31FFC411F0C8AB00FCF3E4 /* dwarf2diehandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dwarf2diehandler.h; path = ../../../common/dwarf/dwarf2diehandler.h; sourceTree = SOURCE_ROOT; }; 8B40BDBF0C0638E4009535AF /* logging.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = logging.cc; path = ../../../processor/logging.cc; sourceTree = SOURCE_ROOT; }; - 8B4BDBBC120131CA009C7060 /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = usr/lib/libcrypto.dylib; sourceTree = SDKROOT; }; 8DD76FA10486AA7600D96B5E /* crash_report */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = crash_report; sourceTree = BUILT_PRODUCTS_DIR; }; 9B35FEE20B2675F9008DE8C7 /* code_module.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = code_module.h; path = ../../../google_breakpad/processor/code_module.h; sourceTree = SOURCE_ROOT; }; 9B35FEE30B2675F9008DE8C7 /* code_modules.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = code_modules.h; path = ../../../google_breakpad/processor/code_modules.h; sourceTree = SOURCE_ROOT; }; @@ -170,7 +170,6 @@ buildActionMask = 2147483647; files = ( 8DD76F9C0486AA7600D96B5E /* Foundation.framework in Frameworks */, - 8B4BDBBD120131CA009C7060 /* libcrypto.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -205,6 +204,7 @@ 8B31FF4011F0C64400FCF3E4 /* stabs_to_module.h */, 8B31FF8411F0C6FB00FCF3E4 /* language.cc */, 8B31FF8511F0C6FB00FCF3E4 /* language.h */, + 4D72CA5613DFBA84006CABE3 /* md5.c */, 8B31FF8611F0C6FB00FCF3E4 /* module.cc */, 8B31FF8711F0C6FB00FCF3E4 /* module.h */, 08FB7795FE84155DC02AAC07 /* breakpad */, @@ -228,7 +228,6 @@ 08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */ = { isa = PBXGroup; children = ( - 8B4BDBBC120131CA009C7060 /* libcrypto.dylib */, 08FB779EFE84155DC02AAC07 /* Foundation.framework */, ); name = "External Frameworks and Libraries"; @@ -390,7 +389,14 @@ isa = PBXProject; buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "crash_report" */; compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = 08FB7794FE84155DC02AAC07 /* crash_report */; projectDirPath = ""; projectRoot = ""; @@ -457,6 +463,7 @@ 4D2C725D126F9C9200B43EAF /* x86_insn.c in Sources */, 4D2C7264126F9CBB00B43EAF /* ia32_modrm.c in Sources */, 4D2C726D126F9CDC00B43EAF /* x86_imm.c in Sources */, + 4D72CA5713DFBA84006CABE3 /* md5.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/src/tools/mac/crash_report/on_demand_symbol_supplier.mm b/src/tools/mac/crash_report/on_demand_symbol_supplier.mm index 00360f67..99d54faf 100644 --- a/src/tools/mac/crash_report/on_demand_symbol_supplier.mm +++ b/src/tools/mac/crash_report/on_demand_symbol_supplier.mm @@ -291,14 +291,9 @@ bool OnDemandSymbolSupplier::GenerateSymbolFile(const CodeModule *module, } if (dump.SetArchitecture(architecture)) { - FILE *file = fopen([symbol_path fileSystemRepresentation],"w"); - if (file) { - dump.WriteSymbolFile(file); - fclose(file); - } else { - printf("Unable to open %s (%d)\n", name.c_str(), errno); - result = false; - } + std::fstream file([symbol_path fileSystemRepresentation], + std::ios_base::out | std::ios_base::trunc); + dump.WriteSymbolFile(file); } else { printf("Architecture %s not available for %s\n", system_info->cpu.c_str(), name.c_str()); diff --git a/src/tools/mac/dump_syms/dump_syms.xcodeproj/project.pbxproj b/src/tools/mac/dump_syms/dump_syms.xcodeproj/project.pbxproj index 2ddaf2c7..87ae48fd 100644 --- a/src/tools/mac/dump_syms/dump_syms.xcodeproj/project.pbxproj +++ b/src/tools/mac/dump_syms/dump_syms.xcodeproj/project.pbxproj @@ -33,7 +33,7 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ - 8B4BDBCA12013288009C7060 /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B4BDBC912013288009C7060 /* libcrypto.dylib */; }; + 4D72CAF513DFBAC2006CABE3 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CAF413DFBAC2006CABE3 /* md5.c */; }; B84A91F8116CF78F006C210E /* libgtestmockall.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B88FB024116BDFFF00407530 /* libgtestmockall.a */; }; B84A91FB116CF7AF006C210E /* module.cc in Sources */ = {isa = PBXBuildFile; fileRef = B88FAE241166603300407530 /* module.cc */; }; B84A91FC116CF7AF006C210E /* stabs_to_module.cc in Sources */ = {isa = PBXBuildFile; fileRef = B88FAE3C11666C8900407530 /* stabs_to_module.cc */; }; @@ -270,12 +270,12 @@ /* Begin PBXFileReference section */ 08FB7796FE84155DC02AAC07 /* dump_syms.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = dump_syms.mm; path = ../../../common/mac/dump_syms.mm; sourceTree = "<group>"; }; 08FB779EFE84155DC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 4D72CAF413DFBAC2006CABE3 /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../../../common/md5.c; sourceTree = SOURCE_ROOT; }; 557800890BE1F3AB00EC23E0 /* macho_utilities.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = macho_utilities.cc; path = ../../../common/mac/macho_utilities.cc; sourceTree = SOURCE_ROOT; }; 5578008A0BE1F3AB00EC23E0 /* macho_utilities.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = macho_utilities.h; path = ../../../common/mac/macho_utilities.h; sourceTree = SOURCE_ROOT; }; 8B31023E11F0CF1C00FCF3E4 /* Breakpad.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Breakpad.xcconfig; path = ../../../common/mac/Breakpad.xcconfig; sourceTree = SOURCE_ROOT; }; 8B3102D411F0D60300FCF3E4 /* BreakpadDebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = BreakpadDebug.xcconfig; path = ../../../common/mac/BreakpadDebug.xcconfig; sourceTree = SOURCE_ROOT; }; 8B3102D511F0D60300FCF3E4 /* BreakpadRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = BreakpadRelease.xcconfig; path = ../../../common/mac/BreakpadRelease.xcconfig; sourceTree = SOURCE_ROOT; }; - 8B4BDBC912013288009C7060 /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = usr/lib/libcrypto.dylib; sourceTree = SDKROOT; }; 9BDF186D0B1BB43700F8391B /* dump_syms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dump_syms.h; path = ../../../common/mac/dump_syms.h; sourceTree = "<group>"; }; 9BDF186E0B1BB43700F8391B /* dump_syms_tool.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = dump_syms_tool.mm; sourceTree = "<group>"; }; 9BE650410B52F6D800611104 /* file_id.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = file_id.cc; path = ../../../common/mac/file_id.cc; sourceTree = SOURCE_ROOT; }; @@ -456,7 +456,6 @@ buildActionMask = 2147483647; files = ( B8C5B523116653BA00D34F4E /* Foundation.framework in Frameworks */, - 8B4BDBCA12013288009C7060 /* libcrypto.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -491,6 +490,7 @@ 08FB7796FE84155DC02AAC07 /* dump_syms.mm */, 9BDF186E0B1BB43700F8391B /* dump_syms_tool.mm */, B89E0E701166573700DD08C9 /* macho_dump.cc */, + 4D72CAF413DFBAC2006CABE3 /* md5.c */, 08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); @@ -500,7 +500,6 @@ 08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */ = { isa = PBXGroup; children = ( - 8B4BDBC912013288009C7060 /* libcrypto.dylib */, 08FB779EFE84155DC02AAC07 /* Foundation.framework */, ); name = "External Frameworks and Libraries"; @@ -884,7 +883,14 @@ isa = PBXProject; buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "dump_syms" */; compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = 08FB7794FE84155DC02AAC07 /* dump_syms */; projectDirPath = ""; projectRoot = ""; @@ -1073,6 +1079,7 @@ B88FAE351166673E00407530 /* dwarf_cfi_to_module.cc in Sources */, B88FAE3B11666C6F00407530 /* stabs_reader.cc in Sources */, B88FAE3E11666C8900407530 /* stabs_to_module.cc in Sources */, + 4D72CAF513DFBAC2006CABE3 /* md5.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; |