From 4ac61acb3a7dad6ce722fe07564be8ec92713228 Mon Sep 17 00:00:00 2001 From: dmaclach Date: Mon, 19 Jul 2010 20:43:49 +0000 Subject: Clean up build for 64 bit. Fix up some broken mac projects. Consolidate project settings in xcconfig files. http://breakpad.appspot.com/130001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@627 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/mac/Breakpad.xcodeproj/project.pbxproj | 699 ++++++++-------- src/client/mac/Framework/Breakpad.mm | 33 +- src/client/mac/Framework/OnDemandServer.mm | 2 +- src/client/mac/crash_generation/Inspector.mm | 11 +- src/client/mac/handler/breakpad_nlist_64.cc | 22 +- src/client/mac/handler/dynamic_images.cc | 10 +- src/client/mac/handler/dynamic_images.h | 24 +- src/client/mac/handler/exception_handler_test.cc | 4 +- src/client/mac/handler/minidump_generator.cc | 31 +- .../mac/handler/protected_memory_allocator.cc | 2 +- .../mac/handler/protected_memory_allocator.h | 4 +- src/client/mac/sender/crash_report_sender.h | 5 +- src/client/mac/sender/crash_report_sender.m | 67 +- src/client/mac/testapp/Controller.m | 7 +- src/client/mac/testapp/English.lproj/MainMenu.xib | 898 ++++++++++++++++++++- src/client/mac/testapp/TestClass.mm | 2 +- src/client/mac/tests/SimpleStringDictionaryTest.h | 2 +- src/client/minidump_file_writer-inl.h | 21 +- src/client/minidump_file_writer.cc | 19 +- src/client/minidump_file_writer.h | 4 +- src/client/minidump_file_writer_unittest.cc | 11 +- 21 files changed, 1365 insertions(+), 513 deletions(-) (limited to 'src/client') diff --git a/src/client/mac/Breakpad.xcodeproj/project.pbxproj b/src/client/mac/Breakpad.xcodeproj/project.pbxproj index f6cdcc00..73a0b479 100644 --- a/src/client/mac/Breakpad.xcodeproj/project.pbxproj +++ b/src/client/mac/Breakpad.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 42; + objectVersion = 45; objects = { /* Begin PBXAggregateTarget section */ @@ -22,6 +22,12 @@ F95BB8B3101F94D300AA053B /* PBXTargetDependency */, F95BB8B5101F94D300AA053B /* PBXTargetDependency */, F95BB8B7101F94D300AA053B /* PBXTargetDependency */, + 8B31023911F0CF0600FCF3E4 /* PBXTargetDependency */, + 8B31051711F1010E00FCF3E4 /* PBXTargetDependency */, + 8B31051911F1010E00FCF3E4 /* PBXTargetDependency */, + 8B31051B11F1010E00FCF3E4 /* PBXTargetDependency */, + 8B31051D11F1010E00FCF3E4 /* PBXTargetDependency */, + 8B31051F11F1010E00FCF3E4 /* PBXTargetDependency */, ); name = All; productName = All; @@ -32,6 +38,15 @@ 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 */; }; + 8B3101C611F0CD9F00FCF3E4 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D6A5FE840307C02AAC07 /* AppKit.framework */; }; + 8B3101C711F0CD9F00FCF3E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; }; + 8B3101CA11F0CDB000FCF3E4 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D6A5FE840307C02AAC07 /* AppKit.framework */; }; + 8B3101CB11F0CDB000FCF3E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; }; + 8B3101EA11F0CDE300FCF3E4 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B3101E911F0CDE300FCF3E4 /* SenTestingKit.framework */; }; + 8B31029411F0D54300FCF3E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; }; + 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 */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; D2A5DD301188633800081F03 /* breakpad_nlist_64.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C53690ECCE3FD009BE4BA /* breakpad_nlist_64.cc */; }; D2A5DD401188640400081F03 /* breakpad_nlist_64.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C53690ECCE3FD009BE4BA /* breakpad_nlist_64.cc */; }; @@ -114,6 +129,146 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 8B31023811F0CF0600FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = B88FAFC9116BDCAD00407530; + remoteInfo = all_unittests; + }; + 8B31051611F1010E00FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = F93803BD0F80820F004D428B; + remoteInfo = generator_test; + }; + 8B31051811F1010E00FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = F93DE2D00F82A67300608B94; + remoteInfo = minidump_file_writer_unittest; + }; + 8B31051A11F1010E00FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = F93DE32B0F82C55600608B94; + remoteInfo = handler_test; + }; + 8B31051C11F1010E00FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = B89E0E731166575200DD08C9; + remoteInfo = macho_dump; + }; + 8B31051E11F1010E00FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB894101F94C000AA053B /* symupload.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 9BD835FA0B0544950055103E; + remoteInfo = minidump_upload; + }; + 8B31F7A011EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B89E0E741166575200DD08C9; + remoteInfo = macho_dump; + }; + 8B31F7A211EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B88FB024116BDFFF00407530; + remoteInfo = gtestmockall; + }; + 8B31F7A411EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B88FB14B116CF4A700407530; + remoteInfo = byte_cursor_unittest; + }; + 8B31F7A611EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B89E0E9511665A6400DD08C9; + remoteInfo = macho_reader_unittest; + }; + 8B31F7A811EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B88FB007116BDE8300407530; + remoteInfo = stabs_reader_unittest; + }; + 8B31F7AA11EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B88FB135116CF30F00407530; + remoteInfo = bytereader_unittest; + }; + 8B31F7AC11EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B88FAF2F116A591E00407530; + remoteInfo = dwarf2reader_cfi_unittest; + }; + 8B31F7AE11EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B88FB0DF116CEEA800407530; + remoteInfo = dwarf2diehandler_unittest; + }; + 8B31F7B011EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B88FB10A116CF07900407530; + remoteInfo = dwarf_cu_to_module_unittest; + }; + 8B31F7B211EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B88FB0F2116CEF1900407530; + remoteInfo = dwarf_line_to_module_unittest; + }; + 8B31F7B411EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B88FB11F116CF27F00407530; + remoteInfo = dwarf_cfi_to_module_unittest; + }; + 8B31F7B611EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B84A91F4116CF784006C210E; + remoteInfo = stabs_to_module_unittest; + }; + 8B31F7B811EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B88FB0B9116CEABF00407530; + remoteInfo = module_unittest; + }; + 8B31F7BA11EF9A8700FCF3E4 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D21F97D211CBA0F200239E38; + remoteInfo = test_assembler_unittest; + }; F91AF6370FD60A74009D8BE2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; @@ -230,7 +385,7 @@ isa = PBXContainerItemProxy; containerPortal = F95BB889101F94AC00AA053B /* dump_syms.xcodeproj */; proxyType = 1; - remoteGlobalIDString = 8DD76F960486AA7600D96B5E; + remoteGlobalIDString = B8C5B5101166531A00D34F4E; remoteInfo = dump_syms; }; F95BB8B4101F94D300AA053B /* PBXContainerItemProxy */ = { @@ -285,6 +440,12 @@ 3329D4EC0FA16D820007BBC5 /* Breakpad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Breakpad.xib; path = sender/Breakpad.xib; sourceTree = ""; }; 33880C7F0F9E097100817F82 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = sender/English.lproj/InfoPlist.strings; sourceTree = ""; }; 4084699C0F5D9CF900FDCA37 /* crash_report_sender.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = crash_report_sender.icns; path = sender/crash_report_sender.icns; sourceTree = ""; }; + 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; }; + 8B31022211F0CE1000FCF3E4 /* GTMGarbageCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMGarbageCollection.h; path = ../../common/mac/GTMGarbageCollection.h; sourceTree = SOURCE_ROOT; }; + 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; }; 8DC2EF5B0486A6940098B216 /* Breakpad.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Breakpad.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F91AF5CF0FD60393009D8BE2 /* BreakpadFramework_Test.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = BreakpadFramework_Test.mm; path = tests/BreakpadFramework_Test.mm; sourceTree = ""; }; F9286B380F7EB25800A4DCC8 /* Inspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Inspector.h; path = crash_generation/Inspector.h; sourceTree = ""; }; @@ -393,6 +554,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 8B31FC8211EFD2B800FCF3E4 /* Foundation.framework in Frameworks */, F92C56570ECD113E009BE4BA /* Carbon.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -402,6 +564,8 @@ buildActionMask = 2147483647; files = ( F9C44EE50EF0A006003AEBAA /* SystemConfiguration.framework in Frameworks */, + 8B3101C611F0CD9F00FCF3E4 /* AppKit.framework in Frameworks */, + 8B3101C711F0CD9F00FCF3E4 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -409,6 +573,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 8B31029411F0D54300FCF3E4 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -423,6 +588,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 8B3102E611F0D74C00FCF3E4 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -431,6 +597,8 @@ buildActionMask = 2147483647; files = ( F9C44E000EF077CD003AEBAA /* Breakpad.framework in Frameworks */, + 8B3101CA11F0CDB000FCF3E4 /* AppKit.framework in Frameworks */, + 8B3101CB11F0CDB000FCF3E4 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -439,6 +607,8 @@ buildActionMask = 2147483647; files = ( F91AF6210FD60784009D8BE2 /* Breakpad.framework in Frameworks */, + 8B3101EA11F0CDE300FCF3E4 /* SenTestingKit.framework in Frameworks */, + 8B3102EB11F0D78000FCF3E4 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -464,6 +634,9 @@ 0867D691FE84028FC02AAC07 /* Breakpad */ = { isa = PBXGroup; children = ( + 8B31FFF611F0C90500FCF3E4 /* Breakpad.xcconfig */, + 8B31027711F0D3AF00FCF3E4 /* BreakpadDebug.xcconfig */, + 8B31027811F0D3AF00FCF3E4 /* BreakpadRelease.xcconfig */, F95BB8A3101F94C300AA053B /* Tools */, 32DBCF5E0370ADEE00C91783 /* Breakpad_Prefix.pch */, F92C538D0ECCE6F2009BE4BA /* client */, @@ -478,6 +651,7 @@ 0867D69AFE84028FC02AAC07 /* Frameworks */ = { isa = PBXGroup; children = ( + 8B3101E911F0CDE300FCF3E4 /* SenTestingKit.framework */, F9C44EE40EF0A006003AEBAA /* SystemConfiguration.framework */, F92C554A0ECCF530009BE4BA /* Carbon.framework */, 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */, @@ -523,6 +697,8 @@ F92C53840ECCE68D009BE4BA /* mac */ = { isa = PBXGroup; children = ( + 8B31022211F0CE1000FCF3E4 /* GTMGarbageCollection.h */, + 8B31007011F0CD3C00FCF3E4 /* GTMDefines.h */, F9C77E0F0F7DDF650045F7DB /* testing */, F9C44EE70EF0A3C1003AEBAA /* GTMLogger.h */, F9C44EE80EF0A3C1003AEBAA /* GTMLogger.m */, @@ -620,6 +796,20 @@ isa = PBXGroup; children = ( F95BB892101F94AC00AA053B /* dump_syms */, + 8B31F7A111EF9A8700FCF3E4 /* macho_dump */, + 8B31F7A311EF9A8700FCF3E4 /* libgtestmockall.a */, + 8B31F7A511EF9A8700FCF3E4 /* byte_cursor_unittest */, + 8B31F7A711EF9A8700FCF3E4 /* macho_reader_unittest */, + 8B31F7A911EF9A8700FCF3E4 /* stabs_reader_unittest */, + 8B31F7AB11EF9A8700FCF3E4 /* bytereader_unittest */, + 8B31F7AD11EF9A8700FCF3E4 /* dwarf2reader_cfi_unittest */, + 8B31F7AF11EF9A8700FCF3E4 /* dwarf2diehandler_unittest */, + 8B31F7B111EF9A8700FCF3E4 /* dwarf_cu_to_module_unittest */, + 8B31F7B311EF9A8700FCF3E4 /* dwarf_line_to_module_unittest */, + 8B31F7B511EF9A8700FCF3E4 /* dwarf_cfi_to_module_unittest */, + 8B31F7B711EF9A8700FCF3E4 /* stabs_to_module_unittest */, + 8B31F7B911EF9A8700FCF3E4 /* module_unittest */, + 8B31F7BB11EF9A8700FCF3E4 /* test_assembler_unittest */, ); name = Products; sourceTree = ""; @@ -870,7 +1060,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Breakpad" */; - compatibilityVersion = "Xcode 2.4"; + compatibilityVersion = "Xcode 3.1"; hasScannedForEncodings = 1; mainGroup = 0867D691FE84028FC02AAC07 /* Breakpad */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -906,6 +1096,104 @@ /* End PBXProject section */ /* Begin PBXReferenceProxy section */ + 8B31F7A111EF9A8700FCF3E4 /* macho_dump */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = macho_dump; + remoteRef = 8B31F7A011EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8B31F7A311EF9A8700FCF3E4 /* libgtestmockall.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libgtestmockall.a; + remoteRef = 8B31F7A211EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8B31F7A511EF9A8700FCF3E4 /* byte_cursor_unittest */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = byte_cursor_unittest; + remoteRef = 8B31F7A411EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8B31F7A711EF9A8700FCF3E4 /* macho_reader_unittest */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = macho_reader_unittest; + remoteRef = 8B31F7A611EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8B31F7A911EF9A8700FCF3E4 /* stabs_reader_unittest */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = stabs_reader_unittest; + remoteRef = 8B31F7A811EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8B31F7AB11EF9A8700FCF3E4 /* bytereader_unittest */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = bytereader_unittest; + remoteRef = 8B31F7AA11EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8B31F7AD11EF9A8700FCF3E4 /* dwarf2reader_cfi_unittest */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = dwarf2reader_cfi_unittest; + remoteRef = 8B31F7AC11EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8B31F7AF11EF9A8700FCF3E4 /* dwarf2diehandler_unittest */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = dwarf2diehandler_unittest; + remoteRef = 8B31F7AE11EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8B31F7B111EF9A8700FCF3E4 /* dwarf_cu_to_module_unittest */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = dwarf_cu_to_module_unittest; + remoteRef = 8B31F7B011EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8B31F7B311EF9A8700FCF3E4 /* dwarf_line_to_module_unittest */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = dwarf_line_to_module_unittest; + remoteRef = 8B31F7B211EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8B31F7B511EF9A8700FCF3E4 /* dwarf_cfi_to_module_unittest */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = dwarf_cfi_to_module_unittest; + remoteRef = 8B31F7B411EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8B31F7B711EF9A8700FCF3E4 /* stabs_to_module_unittest */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = stabs_to_module_unittest; + remoteRef = 8B31F7B611EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8B31F7B911EF9A8700FCF3E4 /* module_unittest */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = module_unittest; + remoteRef = 8B31F7B811EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8B31F7BB11EF9A8700FCF3E4 /* test_assembler_unittest */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.executable"; + path = test_assembler_unittest; + remoteRef = 8B31F7BA11EF9A8700FCF3E4 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; F95BB885101F949F00AA053B /* crash_report */ = { isa = PBXReferenceProxy; fileType = "compiled.mach-o.executable"; @@ -1149,6 +1437,36 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 8B31023911F0CF0600FCF3E4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = all_unittests; + targetProxy = 8B31023811F0CF0600FCF3E4 /* PBXContainerItemProxy */; + }; + 8B31051711F1010E00FCF3E4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = F93803BD0F80820F004D428B /* generator_test */; + targetProxy = 8B31051611F1010E00FCF3E4 /* PBXContainerItemProxy */; + }; + 8B31051911F1010E00FCF3E4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = F93DE2D00F82A67300608B94 /* minidump_file_writer_unittest */; + targetProxy = 8B31051811F1010E00FCF3E4 /* PBXContainerItemProxy */; + }; + 8B31051B11F1010E00FCF3E4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = F93DE32B0F82C55600608B94 /* handler_test */; + targetProxy = 8B31051A11F1010E00FCF3E4 /* PBXContainerItemProxy */; + }; + 8B31051D11F1010E00FCF3E4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = macho_dump; + targetProxy = 8B31051C11F1010E00FCF3E4 /* PBXContainerItemProxy */; + }; + 8B31051F11F1010E00FCF3E4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = minidump_upload; + targetProxy = 8B31051E11F1010E00FCF3E4 /* PBXContainerItemProxy */; + }; F91AF6380FD60A74009D8BE2 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 8DC2EF4F0486A6940098B216 /* Breakpad */; @@ -1275,15 +1593,10 @@ 1DEB91AE08733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Framework/Breakpad_Prefix.pch; HEADER_SEARCH_PATHS = "../..//**"; @@ -1297,8 +1610,6 @@ 1DEB91AF08733DA50010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; @@ -1314,48 +1625,28 @@ }; 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 8B31027711F0D3AF00FCF3E4 /* BreakpadDebug.xcconfig */; buildSettings = { - ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_ACTUAL)"; - PREBINDING = NO; - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; }; name = Debug; }; 1DEB91B308733DA50010E9CD /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 8B31027811F0D3AF00FCF3E4 /* BreakpadRelease.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; - ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "../..//**"; - PREBINDING = NO; - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; }; name = Release; }; F92C53560ECCE34A009BE4BA /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; HEADER_SEARCH_PATHS = "../..//**"; - INSTALL_PATH = /usr/local/bin; OTHER_LDFLAGS = ( - "-lcrypto", "$(inherited)", + "-lcrypto", ); - PREBINDING = NO; PRODUCT_NAME = Inspector; }; name = Debug; @@ -1363,45 +1654,28 @@ F92C53570ECCE34A009BE4BA /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEAD_CODE_STRIPPING = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; HEADER_SEARCH_PATHS = "../..//**"; - INSTALL_PATH = /usr/local/bin; - LD_GENERATE_MAP_FILE = YES; OTHER_LDFLAGS = ( "$(inherited)", "-lcrypto", ); - PREBINDING = NO; PRODUCT_NAME = Inspector; - ZERO_LINK = NO; }; name = Release; }; F92C563D0ECD10B3009BE4BA /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; HEADER_SEARCH_PATHS = "../..//**"; - INSTALL_PATH = /usr/local/lib; LD_DYLIB_INSTALL_NAME = "@executable_path/../Resources/$(EXECUTABLE_PATH)"; OTHER_LDFLAGS = ( "$(inherited)", "-headerpad_max_install_names", "-lcrypto", ); - PREBINDING = NO; PRODUCT_NAME = breakpadUtilities; }; name = Debug; @@ -1409,47 +1683,24 @@ F92C563E0ECD10B3009BE4BA /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; HEADER_SEARCH_PATHS = "../..//**"; - INSTALL_PATH = /usr/local/lib; LD_DYLIB_INSTALL_NAME = "@executable_path/../Resources/$(EXECUTABLE_PATH)"; OTHER_LDFLAGS = ( "$(inherited)", "-headerpad_max_install_names", "-lcrypto", ); - PREBINDING = NO; PRODUCT_NAME = breakpadUtilities; - ZERO_LINK = NO; }; name = Release; }; F92C56A30ECE04A8009BE4BA /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; HEADER_SEARCH_PATHS = "../..//**"; INFOPLIST_FILE = "sender/crash_report_sender-Info.plist"; - INSTALL_PATH = "$(HOME)/Applications"; - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; PRODUCT_NAME = crash_report_sender; }; name = Debug; @@ -1457,42 +1708,16 @@ F92C56A40ECE04A8009BE4BA /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; HEADER_SEARCH_PATHS = "../..//**"; INFOPLIST_FILE = "sender/crash_report_sender-Info.plist"; - INSTALL_PATH = "$(HOME)/Applications"; - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; PRODUCT_NAME = crash_report_sender; - ZERO_LINK = NO; }; name = Release; }; F93803C00F808210004D428B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - INSTALL_PATH = /usr/local/bin; - OTHER_LDFLAGS = ( - "-lcrypto", - "-framework", - Foundation, - ); - PREBINDING = NO; + OTHER_LDFLAGS = "-lcrypto"; PRODUCT_NAME = generator_test; USER_HEADER_SEARCH_PATHS = ../../; }; @@ -1501,41 +1726,15 @@ F93803C10F808210004D428B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_MODEL_TUNING = G5; - INSTALL_PATH = /usr/local/bin; - OTHER_LDFLAGS = ( - "-lcrypto", - "-framework", - Foundation, - ); - PREBINDING = NO; + OTHER_LDFLAGS = "-lcrypto"; PRODUCT_NAME = generator_test; - ZERO_LINK = NO; }; name = Release; }; F93DE2D30F82A67400608B94 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_CHAR_IS_UNSIGNED_CHAR = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; - INSTALL_PATH = /usr/local/bin; - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; PRODUCT_NAME = minidump_file_writer_unittest; USER_HEADER_SEARCH_PATHS = ../../; }; @@ -1544,40 +1743,14 @@ F93DE2D40F82A67400608B94 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_MODEL_TUNING = G5; - INSTALL_PATH = /usr/local/bin; - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; PRODUCT_NAME = minidump_file_writer_unittest; - ZERO_LINK = NO; }; name = Release; }; F93DE32E0F82C55700608B94 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - INSTALL_PATH = /usr/local/bin; - OTHER_LDFLAGS = ( - "-lcrypto", - "-framework", - Foundation, - ); - PREBINDING = NO; + OTHER_LDFLAGS = "-lcrypto"; PRODUCT_NAME = handler_test; USER_HEADER_SEARCH_PATHS = ../../; }; @@ -1586,49 +1759,26 @@ F93DE32F0F82C55700608B94 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_MODEL_TUNING = G5; - INSTALL_PATH = /usr/local/bin; - OTHER_LDFLAGS = ( - "-lcrypto", - "-framework", - Foundation, - ); - PREBINDING = NO; + OTHER_LDFLAGS = "-lcrypto"; PRODUCT_NAME = handler_test; - ZERO_LINK = NO; }; name = Release; }; F93DE3B90F830E7000608B94 /* Debug With Code Coverage */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 8B31027711F0D3AF00FCF3E4 /* BreakpadDebug.xcconfig */; buildSettings = { - ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH)"; - PREBINDING = NO; - SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; }; name = "Debug With Code Coverage"; }; F93DE3BA0F830E7000608B94 /* Debug With Code Coverage */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_VERSION = A; GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Framework/Breakpad_Prefix.pch; HEADER_SEARCH_PATHS = "../..//**"; @@ -1642,19 +1792,11 @@ F93DE3BB0F830E7000608B94 /* Debug With Code Coverage */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; HEADER_SEARCH_PATHS = "../..//**"; - INSTALL_PATH = /usr/local/bin; OTHER_LDFLAGS = ( - "-lcrypto", "$(inherited)", + "-lcrypto", ); - PREBINDING = NO; PRODUCT_NAME = Inspector; }; name = "Debug With Code Coverage"; @@ -1662,24 +1804,16 @@ F93DE3BC0F830E7000608B94 /* Debug With Code Coverage */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; HEADER_SEARCH_PATHS = "../..//**"; - INSTALL_PATH = /usr/local/lib; LD_DYLIB_INSTALL_NAME = "@executable_path/../Resources/$(EXECUTABLE_PATH)"; OTHER_LDFLAGS = ( "$(inherited)", "-headerpad_max_install_names", "-lcrypto", ); - PREBINDING = NO; PRODUCT_NAME = breakpadUtilities; }; name = "Debug With Code Coverage"; @@ -1687,23 +1821,8 @@ F93DE3BD0F830E7000608B94 /* Debug With Code Coverage */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; HEADER_SEARCH_PATHS = "../..//**"; INFOPLIST_FILE = "sender/crash_report_sender-Info.plist"; - INSTALL_PATH = "$(HOME)/Applications"; - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; PRODUCT_NAME = crash_report_sender; }; name = "Debug With Code Coverage"; @@ -1711,24 +1830,8 @@ F93DE3BE0F830E7000608B94 /* Debug With Code Coverage */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/build/$(CONFIGURATION)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; INFOPLIST_FILE = testapp/Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; PRODUCT_NAME = BreakpadTest; }; name = "Debug With Code Coverage"; @@ -1736,9 +1839,6 @@ F93DE3BF0F830E7000608B94 /* Debug With Code Coverage */ = { isa = XCBuildConfiguration; buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; PRODUCT_NAME = All; }; name = "Debug With Code Coverage"; @@ -1746,28 +1846,14 @@ F93DE3C00F830E7000608B94 /* Debug With Code Coverage */ = { isa = XCBuildConfiguration; buildSettings = { - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks"; - GCC_DYNAMIC_NO_PIC = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", + ); GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_GENERATE_TEST_COVERAGE_FILES = YES; - GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h"; INFOPLIST_FILE = "UnitTests-Info.plist"; - INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; LIBRARY_SEARCH_PATHS = ./gcov; - OTHER_LDFLAGS = ( - "-lgcov", - "-framework", - Cocoa, - "-framework", - SenTestingKit, - ); - PREBINDING = NO; PRODUCT_NAME = UnitTests; - USER_HEADER_SEARCH_PATHS = "../../ ../../common/mac/**"; WRAPPER_EXTENSION = octest; }; name = "Debug With Code Coverage"; @@ -1775,15 +1861,6 @@ F93DE3C10F830E7000608B94 /* Debug With Code Coverage */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_TEST_COVERAGE_FILES = YES; - GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - INSTALL_PATH = /usr/local/bin; LIBRARY_SEARCH_PATHS = ./gcov; OTHER_LDFLAGS = ( "-lgcov", @@ -1791,7 +1868,6 @@ "-framework", Foundation, ); - PREBINDING = NO; PRODUCT_NAME = generator_test; USER_HEADER_SEARCH_PATHS = ../../; }; @@ -1800,25 +1876,10 @@ F93DE3C20F830E7000608B94 /* Debug With Code Coverage */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_CHAR_IS_UNSIGNED_CHAR = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_GENERATE_TEST_COVERAGE_FILES = YES; GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - INSTALL_PATH = /usr/local/bin; LIBRARY_SEARCH_PATHS = ./gcov; - OTHER_LDFLAGS = ( - "-lgcov", - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; + OTHER_LDFLAGS = "-lgcov"; PRODUCT_NAME = minidump_file_writer_unittest; USER_HEADER_SEARCH_PATHS = ../../; }; @@ -1827,23 +1888,13 @@ F93DE3C30F830E7000608B94 /* Debug With Code Coverage */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_GENERATE_TEST_COVERAGE_FILES = YES; GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - INSTALL_PATH = /usr/local/bin; LIBRARY_SEARCH_PATHS = ./gcov; OTHER_LDFLAGS = ( "-lcrypto", "-lgcov", - "-framework", - Foundation, ); - PREBINDING = NO; PRODUCT_NAME = handler_test; USER_HEADER_SEARCH_PATHS = ../../; }; @@ -1852,9 +1903,6 @@ F94585850F782326009A47BF /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; PRODUCT_NAME = All; }; name = Debug; @@ -1862,35 +1910,15 @@ F94585860F782326009A47BF /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; PRODUCT_NAME = All; - ZERO_LINK = NO; }; name = Release; }; F9C44DA80EF060A8003AEBAA /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/build/$(CONFIGURATION)"; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; INFOPLIST_FILE = testapp/Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; PRODUCT_NAME = BreakpadTest; }; name = Debug; @@ -1898,46 +1926,22 @@ F9C44DA90EF060A8003AEBAA /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/build/$(CONFIGURATION)"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; INFOPLIST_FILE = testapp/Info.plist; - INSTALL_PATH = "$(HOME)/Applications"; - OTHER_LDFLAGS = ( - "-framework", - Foundation, - "-framework", - AppKit, - ); - PREBINDING = NO; PRODUCT_NAME = BreakpadTest; - ZERO_LINK = NO; }; name = Release; }; F9C77DDC0F7DD5D00045F7DB /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks"; - GCC_DYNAMIC_NO_PIC = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", + ); GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Cocoa.framework/Headers/Cocoa.h"; INFOPLIST_FILE = "UnitTests-Info.plist"; - INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; - OTHER_LDFLAGS = ( - "-framework", - Cocoa, - "-framework", - SenTestingKit, - ); - PREBINDING = NO; PRODUCT_NAME = UnitTests; - USER_HEADER_SEARCH_PATHS = "../../ ../../common/mac/**"; WRAPPER_EXTENSION = octest; }; name = Debug; @@ -1945,25 +1949,14 @@ F9C77DDD0F7DD5D00045F7DB /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(DEVELOPER_FRAMEWORKS_DIR)\"", + ); GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_MODEL_TUNING = G5; INFOPLIST_FILE = "UnitTests-Info.plist"; - INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; - OTHER_LDFLAGS = ( - "-framework", - Cocoa, - "-framework", - SenTestingKit, - ); - PREBINDING = NO; PRODUCT_NAME = UnitTests; WRAPPER_EXTENSION = octest; - ZERO_LINK = NO; }; name = Release; }; diff --git a/src/client/mac/Framework/Breakpad.mm b/src/client/mac/Framework/Breakpad.mm index 23e5d9bf..1d6b9287 100644 --- a/src/client/mac/Framework/Breakpad.mm +++ b/src/client/mac/Framework/Breakpad.mm @@ -265,7 +265,7 @@ bool Breakpad::ExceptionHandlerDirectCallback(void *context, //============================================================================= #pragma mark - -#include +#include //============================================================================= // Returns the pathname to the Resources directory for this version of @@ -286,23 +286,16 @@ NSString * GetResourcePath() { // // Get the pathname to the code which contains this function - void *address = nil; - NSModule module = nil; - _dyld_lookup_and_bind_fully("_GetResourcePath", - &address, - &module); - - if (module && address) { - const char* moduleName = NSNameOfModule(module); - if (moduleName) { - // The "Resources" directory should be in the same directory as the - // executable code, since that's how the Breakpad framework is built. - resourcePath = [NSString stringWithUTF8String:moduleName]; - resourcePath = [resourcePath stringByDeletingLastPathComponent]; - resourcePath = [resourcePath stringByAppendingPathComponent:@"Resources/"]; - } else { - DEBUGLOG(stderr, "Missing moduleName\n"); - } + Dl_info info; + if (dladdr((const void*)GetResourcePath, &info) != 0) { + NSFileManager *filemgr = [NSFileManager defaultManager]; + NSString *filePath + = [filemgr stringWithFileSystemRepresentation:info.dli_fname + length:strlen(info.dli_fname)]; + NSString *bundlePath = [filePath stringByDeletingLastPathComponent]; + // The "Resources" directory should be in the same directory as the + // executable code, since that's how the Breakpad framework is built. + resourcePath = [bundlePath stringByAppendingPathComponent:@"Resources/"]; } else { DEBUGLOG(stderr, "Could not find GetResourcePath\n"); // fallback plan @@ -573,7 +566,7 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) { struct timeval tv; gettimeofday(&tv, NULL); char timeStartedString[32]; - sprintf(timeStartedString, "%d", tv.tv_sec); + sprintf(timeStartedString, "%zd", tv.tv_sec); dictionary.SetKeyValue(BREAKPAD_PROCESS_START_TIME, timeStartedString); @@ -591,7 +584,7 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) { // For each key-value pair, call BreakpadAddUploadParameter() NSEnumerator *keyEnumerator = [serverParameters keyEnumerator]; NSString *aParameter; - while (aParameter = [keyEnumerator nextObject]) { + while ((aParameter = [keyEnumerator nextObject])) { BreakpadAddUploadParameter(this, aParameter, [serverParameters objectForKey:aParameter]); } diff --git a/src/client/mac/Framework/OnDemandServer.mm b/src/client/mac/Framework/OnDemandServer.mm index 11b126c2..38685460 100644 --- a/src/client/mac/Framework/OnDemandServer.mm +++ b/src/client/mac/Framework/OnDemandServer.mm @@ -116,7 +116,7 @@ void OnDemandServer::LaunchOnDemand() { // and holding on to this port delays launching until the current process // exits! mach_port_deallocate(mach_task_self(), server_port_); - server_port_ = NULL; + server_port_ = MACH_PORT_DEAD; // Now, the service is still registered and all we need to do is send // a mach message to the service port in order to launch the server. diff --git a/src/client/mac/crash_generation/Inspector.mm b/src/client/mac/crash_generation/Inspector.mm index d328ee5d..1fe2a208 100644 --- a/src/client/mac/crash_generation/Inspector.mm +++ b/src/client/mac/crash_generation/Inspector.mm @@ -44,6 +44,8 @@ #import "common/mac/SimpleStringDictionary.h" #import "common/mac/MachIPC.h" +#import "GTMDefines.h" + #import #if VERBOSE @@ -91,14 +93,14 @@ static BOOL EnsureDirectoryPathExists(NSString *dirPath) { // Break up the difference into components NSString *diff = [dirPath substringFromIndex:[common length] + 1]; NSArray *components = [diff pathComponents]; - unsigned count = [components count]; + NSUInteger count = [components count]; // Rebuild the path one component at a time NSDictionary *attrs = [NSDictionary dictionaryWithObject:[NSNumber numberWithUnsignedLong:0750] forKey:NSFilePosixPermissions]; path = common; - for (unsigned i = 0; i < count; ++i) { + for (NSUInteger i = 0; i < count; ++i) { path = [path stringByAppendingPathComponent:[components objectAtIndex:i]]; if (![mgr createDirectoryAtPath:path attributes:attrs]) @@ -329,7 +331,6 @@ kern_return_t Inspector::ReadMessages() { // we are expected to read. // Read each key/value pair, one mach message per key/value pair. for (unsigned int i = 0; i < info.parameter_count; ++i) { - MachReceiveMessage message; result = receive_port.WaitForMessage(&message, 1000); if(result == KERN_SUCCESS) { @@ -376,11 +377,11 @@ void Inspector::SetCrashTimeParameters() { if (processStartTimeString) { time_t processStartTime = strtol(processStartTimeString, NULL, 10); time_t processUptime = tv.tv_sec - processStartTime; - sprintf(processUptimeString, "%d", processUptime); + sprintf(processUptimeString, "%zd", processUptime); config_params_.SetKeyValue(BREAKPAD_PROCESS_UP_TIME, processUptimeString); } - sprintf(processCrashtimeString, "%d", tv.tv_sec); + sprintf(processCrashtimeString, "%zd", tv.tv_sec); config_params_.SetKeyValue(BREAKPAD_PROCESS_CRASH_TIME, processCrashtimeString); } diff --git a/src/client/mac/handler/breakpad_nlist_64.cc b/src/client/mac/handler/breakpad_nlist_64.cc index c220d88d..4b655c79 100644 --- a/src/client/mac/handler/breakpad_nlist_64.cc +++ b/src/client/mac/handler/breakpad_nlist_64.cc @@ -137,7 +137,7 @@ __breakpad_fdnlist_64(int fd, breakpad_nlist *list, const char **symbolNames) { breakpad_nlist space[BUFSIZ/sizeof (breakpad_nlist)]; const register char *s1, *s2; - register int n, m; + register register_t n, m; int maxlen, nreq; off_t sa; /* symbol address */ off_t ss; /* start of strings */ @@ -160,14 +160,14 @@ __breakpad_fdnlist_64(int fd, breakpad_nlist *list, const char **symbolNames) { (N_BADMAG(buf) && *((long *)&buf) != MH_MAGIC && NXSwapBigLongToHost(*((long *)&buf)) != FAT_MAGIC) && /* nealsid: The following is the big-endian ppc64 check */ - (*((uint32_t*)&buf)) != FAT_MAGIC) { + (*((long*)&buf)) != FAT_MAGIC) { return (-1); } /* Deal with fat file if necessary */ if (NXSwapBigLongToHost(*((long *)&buf)) == FAT_MAGIC || /* nealsid: The following is the big-endian ppc64 check */ - *((int*)&buf) == FAT_MAGIC) { + *((unsigned int *)&buf) == FAT_MAGIC) { struct host_basic_info hbi; struct fat_header fh; struct fat_arch *fat_archs, *fap; @@ -191,7 +191,7 @@ __breakpad_fdnlist_64(int fd, breakpad_nlist *list, const char **symbolNames) { } /* Convert fat_narchs to host byte order */ - fh.nfat_arch = NXSwapBigLongToHost(fh.nfat_arch); + fh.nfat_arch = NXSwapBigIntToHost(fh.nfat_arch); /* Read in the fat archs */ fat_archs = (struct fat_arch *)malloc(fh.nfat_arch * @@ -201,7 +201,7 @@ __breakpad_fdnlist_64(int fd, breakpad_nlist *list, const char **symbolNames) { } if (read(fd, (char *)fat_archs, sizeof(struct fat_arch) * fh.nfat_arch) != - sizeof(struct fat_arch) * fh.nfat_arch) { + (ssize_t)sizeof(struct fat_arch) * fh.nfat_arch) { free(fat_archs); return (-1); } @@ -212,15 +212,15 @@ __breakpad_fdnlist_64(int fd, breakpad_nlist *list, const char **symbolNames) { */ for (i = 0; i < fh.nfat_arch; i++) { fat_archs[i].cputype = - NXSwapBigLongToHost(fat_archs[i].cputype); + NXSwapBigIntToHost(fat_archs[i].cputype); fat_archs[i].cpusubtype = - NXSwapBigLongToHost(fat_archs[i].cpusubtype); + NXSwapBigIntToHost(fat_archs[i].cpusubtype); fat_archs[i].offset = - NXSwapBigLongToHost(fat_archs[i].offset); + NXSwapBigIntToHost(fat_archs[i].offset); fat_archs[i].size = - NXSwapBigLongToHost(fat_archs[i].size); + NXSwapBigIntToHost(fat_archs[i].size); fat_archs[i].align = - NXSwapBigLongToHost(fat_archs[i].align); + NXSwapBigIntToHost(fat_archs[i].align); } fap = NULL; @@ -257,7 +257,7 @@ __breakpad_fdnlist_64(int fd, breakpad_nlist *list, const char **symbolNames) { } } - if (*((int *)&buf) == MH_MAGIC_64) { + if (*((unsigned int *)&buf) == MH_MAGIC_64) { struct mach_header_64 mh; struct load_command *load_commands, *lcp; struct symtab_command *stp; diff --git a/src/client/mac/handler/dynamic_images.cc b/src/client/mac/handler/dynamic_images.cc index ac1cca40..73c013d4 100644 --- a/src/client/mac/handler/dynamic_images.cc +++ b/src/client/mac/handler/dynamic_images.cc @@ -129,7 +129,7 @@ static void* ReadTaskString(task_port_t target_task, size_to_end > kMaxStringLength ? kMaxStringLength : size_to_end; kern_return_t kr; - return ReadTaskMemory(target_task, address, size_to_read, &kr); + return ReadTaskMemory(target_task, address, (size_t)size_to_read, &kr); } return NULL; @@ -276,13 +276,11 @@ void DynamicImage::Print() { //============================================================================== // Loads information about dynamically loaded code in the given task. DynamicImages::DynamicImages(mach_port_t task) - : task_(task) { + : task_(task), image_list_() { ReadImageInfoForTask(); } -void* DynamicImages::GetDyldAllImageInfosPointer() -{ - +void* DynamicImages::GetDyldAllImageInfosPointer() { const char *imageSymbolName = "_dyld_all_image_infos"; const char *dyldPath = "/usr/lib/dyld"; #ifndef __LP64__ @@ -364,7 +362,7 @@ void DynamicImages::ReadImageInfoForTask() { // Now determine the total amount we really want to read based on the // size of the load commands. We need the header plus all of the // load commands. - unsigned int header_size = + size_t header_size = sizeof(breakpad_mach_header) + header->sizeofcmds; free(header); diff --git a/src/client/mac/handler/dynamic_images.h b/src/client/mac/handler/dynamic_images.h index 85ba8cf9..aa74b746 100644 --- a/src/client/mac/handler/dynamic_images.h +++ b/src/client/mac/handler/dynamic_images.h @@ -103,7 +103,7 @@ class MachHeader { class DynamicImage { public: DynamicImage(breakpad_mach_header *header, // we take ownership - int header_size, // includes load commands + size_t header_size, // includes load commands breakpad_mach_header *load_address, char *inFilePath, uintptr_t image_mod_date, @@ -112,7 +112,12 @@ class DynamicImage { header_size_(header_size), load_address_(load_address), file_mod_date_(image_mod_date), - task_(task) { + task_(task), + vmaddr_(0), + vmsize_(0), + slide_(0), + version_(0), + file_path_(NULL) { InitializeFilePath(inFilePath); CalculateMemoryAndVersionInfo(); } @@ -128,7 +133,7 @@ class DynamicImage { breakpad_mach_header *GetMachHeader() {return header_;} // Size of mach_header plus load commands - int GetHeaderSize() const {return header_size_;} + size_t GetHeaderSize() const {return header_size_;} // Full path to mach-o binary char *GetFilePath() {return file_path_;} @@ -160,6 +165,9 @@ class DynamicImage { void Print(); private: + DynamicImage(const DynamicImage &); + DynamicImage &operator=(const DynamicImage &); + friend class DynamicImages; // Sanity checking @@ -180,7 +188,7 @@ class DynamicImage { void CalculateMemoryAndVersionInfo(); breakpad_mach_header *header_; // our local copy of the header - int header_size_; // mach_header plus load commands + size_t header_size_; // mach_header plus load commands breakpad_mach_header *load_address_; // base address image is mapped into mach_vm_address_t vmaddr_; mach_vm_size_t vmsize_; @@ -231,13 +239,13 @@ class DynamicImages { explicit DynamicImages(mach_port_t task); ~DynamicImages() { - for (int i = 0; i < (int)image_list_.size(); ++i) { + for (int i = 0; i < GetImageCount(); ++i) { delete image_list_[i]; } } // Returns the number of dynamically loaded mach-o images. - int GetImageCount() const {return image_list_.size();} + int GetImageCount() const {return static_cast(image_list_.size());} // Returns an individual image. DynamicImage *GetImage(int i) { @@ -256,14 +264,14 @@ class DynamicImages { // Debugging void Print() { - for (int i = 0; i < (int)image_list_.size(); ++i) { + for (int i = 0; i < GetImageCount(); ++i) { image_list_[i]->Print(); } } void TestPrint() { const breakpad_mach_header *header; - for (int i = 0; i < (int)image_list_.size(); ++i) { + for (int i = 0; i < GetImageCount(); ++i) { printf("dyld: %p: name = %s\n", _dyld_get_image_header(i), _dyld_get_image_name(i) ); diff --git a/src/client/mac/handler/exception_handler_test.cc b/src/client/mac/handler/exception_handler_test.cc index 0a1ecbe7..a8d45387 100644 --- a/src/client/mac/handler/exception_handler_test.cc +++ b/src/client/mac/handler/exception_handler_test.cc @@ -61,8 +61,8 @@ static void SoonToCrash() { Crasher(); } -bool MDCallback(const char *dump_dir, const char *file_name, - void *context, bool success) { +static bool MDCallback(const char *dump_dir, const char *file_name, + void *context, bool success) { string path(dump_dir); string dest(dump_dir); path.append(file_name); diff --git a/src/client/mac/handler/minidump_generator.cc b/src/client/mac/handler/minidump_generator.cc index f6d0638c..ea0ec9ae 100644 --- a/src/client/mac/handler/minidump_generator.cc +++ b/src/client/mac/handler/minidump_generator.cc @@ -57,7 +57,8 @@ namespace google_breakpad { // constructor when generating from within the crashed process MinidumpGenerator::MinidumpGenerator() - : exception_type_(0), + : writer_(), + exception_type_(0), exception_code_(0), exception_subcode_(0), exception_thread_(0), @@ -71,12 +72,14 @@ MinidumpGenerator::MinidumpGenerator() // crashed process MinidumpGenerator::MinidumpGenerator(mach_port_t crashing_task, mach_port_t handler_thread) - : exception_type_(0), + : writer_(), + exception_type_(0), exception_code_(0), exception_subcode_(0), exception_thread_(0), crashing_task_(crashing_task), - handler_thread_(handler_thread) { + handler_thread_(handler_thread), + dynamic_images_(NULL) { if (crashing_task != mach_task_self()) { dynamic_images_ = new DynamicImages(crashing_task_); } else { @@ -488,7 +491,7 @@ bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state, // not used in the flags register. Since the minidump format // specifies 32 bits for the flags register, we can truncate safely // with no loss. - context_ptr->eflags = machine_state->__rflags; + context_ptr->eflags = static_cast(machine_state->__rflags); AddReg(cs); AddReg(fs); AddReg(gs); @@ -727,7 +730,7 @@ bool MinidumpGenerator::WriteModuleStream(unsigned int index, return false; module->base_of_image = image->GetVMAddr() + image->GetVMAddrSlide(); - module->size_of_image = image->GetVMSize(); + module->size_of_image = static_cast(image->GetVMSize()); module->module_name_rva = string_location.rva; // We'll skip the executable module, because they don't have @@ -794,7 +797,7 @@ bool MinidumpGenerator::WriteModuleStream(unsigned int index, return false; module->base_of_image = seg->vmaddr + slide; - module->size_of_image = seg->vmsize; + module->size_of_image = static_cast(seg->vmsize); module->module_name_rva = string_location.rva; if (!WriteCVRecord(module, cpu_type, name)) @@ -943,8 +946,10 @@ bool MinidumpGenerator::WriteMiscInfoStream(MDRawDirectory *misc_info_stream) { struct rusage usage; if (getrusage(RUSAGE_SELF, &usage) != -1) { // Omit the fractional time since the MDRawMiscInfo only wants seconds - info_ptr->process_user_time = usage.ru_utime.tv_sec; - info_ptr->process_kernel_time = usage.ru_stime.tv_sec; + info_ptr->process_user_time = + static_cast(usage.ru_utime.tv_sec); + info_ptr->process_kernel_time = + static_cast(usage.ru_stime.tv_sec); } int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, info_ptr->process_id }; size_t size; @@ -956,20 +961,22 @@ bool MinidumpGenerator::WriteMiscInfoStream(MDRawDirectory *misc_info_stream) { true) == KERN_SUCCESS) { struct kinfo_proc *proc = (struct kinfo_proc *)addr; if (!sysctl(mib, sizeof(mib) / sizeof(mib[0]), proc, &size, NULL, 0)) - info_ptr->process_create_time = proc->kp_proc.p_starttime.tv_sec; + info_ptr->process_create_time = + static_cast(proc->kp_proc.p_starttime.tv_sec); mach_vm_deallocate(mach_task_self(), addr, size); } } // Speed uint64_t speed; + const uint64_t kOneMillion = 1000 * 1000; size = sizeof(speed); sysctlbyname("hw.cpufrequency_max", &speed, &size, NULL, 0); - info_ptr->processor_max_mhz = speed / (1000 * 1000); - info_ptr->processor_mhz_limit = speed / (1000 * 1000); + info_ptr->processor_max_mhz = static_cast(speed / kOneMillion); + info_ptr->processor_mhz_limit = static_cast(speed / kOneMillion); size = sizeof(speed); sysctlbyname("hw.cpufrequency", &speed, &size, NULL, 0); - info_ptr->processor_current_mhz = speed / (1000 * 1000); + info_ptr->processor_current_mhz = static_cast(speed / kOneMillion); return true; } diff --git a/src/client/mac/handler/protected_memory_allocator.cc b/src/client/mac/handler/protected_memory_allocator.cc index 10768541..6142ad12 100644 --- a/src/client/mac/handler/protected_memory_allocator.cc +++ b/src/client/mac/handler/protected_memory_allocator.cc @@ -59,7 +59,7 @@ ProtectedMemoryAllocator::~ProtectedMemoryAllocator() { } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -char *ProtectedMemoryAllocator::Allocate(size_t bytes) { +char *ProtectedMemoryAllocator::Allocate(vm_size_t bytes) { if (valid_ && next_alloc_offset_ + bytes <= pool_size_) { char *p = (char*)base_address_ + next_alloc_offset_; next_alloc_offset_ += bytes; diff --git a/src/client/mac/handler/protected_memory_allocator.h b/src/client/mac/handler/protected_memory_allocator.h index ed4f51d5..7e188db2 100644 --- a/src/client/mac/handler/protected_memory_allocator.h +++ b/src/client/mac/handler/protected_memory_allocator.h @@ -53,7 +53,7 @@ class ProtectedMemoryAllocator { // Fails by returning NULL is no more space is available. // Please note that the pointers returned from this method should not // be freed in any way (for example by calling free() on them ). - char * Allocate(size_t n); + char * Allocate(vm_size_t n); // Returns the base address of the allocation pool. char * GetBaseAddress() { return (char*)base_address_; } @@ -78,7 +78,7 @@ class ProtectedMemoryAllocator { private: vm_size_t pool_size_; vm_address_t base_address_; - int next_alloc_offset_; + vm_size_t next_alloc_offset_; bool valid_; }; diff --git a/src/client/mac/sender/crash_report_sender.h b/src/client/mac/sender/crash_report_sender.h index ca5b3079..c0728ca8 100644 --- a/src/client/mac/sender/crash_report_sender.h +++ b/src/client/mac/sender/crash_report_sender.h @@ -35,6 +35,7 @@ #include #include "client/mac/Framework/Breakpad.h" +#import "GTMDefines.h" #define kClientIdPreferenceKey @"clientid" @@ -53,10 +54,10 @@ extern NSString *const kDefaultServerType; // work in the middle of a validation. @interface LengthLimitingTextField : NSTextField { @private - unsigned int maximumLength_; + NSUInteger maximumLength_; } -- (void) setMaximumLength:(unsigned int)maxLength; +- (void)setMaximumLength:(NSUInteger)maxLength; @end @interface Reporter : NSObject { diff --git a/src/client/mac/sender/crash_report_sender.m b/src/client/mac/sender/crash_report_sender.m index 6aa8887d..cdee262b 100644 --- a/src/client/mac/sender/crash_report_sender.m +++ b/src/client/mac/sender/crash_report_sender.m @@ -56,20 +56,20 @@ NSString *const kDefaultServerType = @"google"; @interface NSView (ResizabilityExtentions) // Shifts the view vertically by the given amount. -- (void)breakpad_shiftVertically:(float)offset; +- (void)breakpad_shiftVertically:(CGFloat)offset; // Shifts the view horizontally by the given amount. -- (void)breakpad_shiftHorizontally:(float)offset; +- (void)breakpad_shiftHorizontally:(CGFloat)offset; @end @implementation NSView (ResizabilityExtentions) -- (void)breakpad_shiftVertically:(float)offset { +- (void)breakpad_shiftVertically:(CGFloat)offset { NSPoint origin = [self frame].origin; origin.y += offset; [self setFrameOrigin:origin]; } -- (void)breakpad_shiftHorizontally:(float)offset { +- (void)breakpad_shiftHorizontally:(CGFloat)offset { NSPoint origin = [self frame].origin; origin.x += offset; [self setFrameOrigin:origin]; @@ -79,11 +79,11 @@ NSString *const kDefaultServerType = @"google"; @interface NSWindow (ResizabilityExtentions) // Adjusts the window height by heightDelta relative to its current height, // keeping all the content at the same size. -- (void)breakpad_adjustHeight:(float)heightDelta; +- (void)breakpad_adjustHeight:(CGFloat)heightDelta; @end @implementation NSWindow (ResizabilityExtentions) -- (void)breakpad_adjustHeight:(float)heightDelta { +- (void)breakpad_adjustHeight:(CGFloat)heightDelta { [[self contentView] setAutoresizesSubviews:NO]; NSRect windowFrame = [self frame]; @@ -101,16 +101,16 @@ NSString *const kDefaultServerType = @"google"; // Grows or shrinks the height of the field to the minimum required to show the // current text, preserving the existing width and origin. // Returns the change in height. -- (float)breakpad_adjustHeightToFit; +- (CGFloat)breakpad_adjustHeightToFit; // Grows or shrinks the width of the field to the minimum required to show the // current text, preserving the existing height and origin. // Returns the change in width. -- (float)breakpad_adjustWidthToFit; +- (CGFloat)breakpad_adjustWidthToFit; @end @implementation NSTextField (ResizabilityExtentions) -- (float)breakpad_adjustHeightToFit { +- (CGFloat)breakpad_adjustHeightToFit { NSRect oldFrame = [self frame]; // Starting with the 10.5 SDK, height won't grow, so make it huge to start. NSRect presizeFrame = oldFrame; @@ -125,7 +125,7 @@ NSString *const kDefaultServerType = @"google"; return newSize.height - NSHeight(oldFrame); } -- (float)breakpad_adjustWidthToFit { +- (CGFloat)breakpad_adjustWidthToFit { NSRect oldFrame = [self frame]; [self sizeToFit]; return NSWidth([self frame]) - NSWidth(oldFrame); @@ -136,11 +136,11 @@ NSString *const kDefaultServerType = @"google"; // Resizes to fit the label using IB-style size-to-fit metrics and enforcing a // minimum width of 70, while preserving the right edge location. // Returns the change in width. -- (float)breakpad_smartSizeToFit; +- (CGFloat)breakpad_smartSizeToFit; @end @implementation NSButton (ResizabilityExtentions) -- (float)breakpad_smartSizeToFit { +- (CGFloat)breakpad_smartSizeToFit { NSRect oldFrame = [self frame]; [self sizeToFit]; NSRect newFrame = [self frame]; @@ -218,7 +218,8 @@ NSString *const kDefaultServerType = @"google"; // Run an alert window with the given timeout. Returns // NSRunStoppedResponse if the timeout is exceeded. A timeout of 0 // queues the message immediately in the modal run loop. -- (int)runModalWindow:(NSWindow*)window withTimeout:(NSTimeInterval)timeout; +- (NSInteger)runModalWindow:(NSWindow*)window + withTimeout:(NSTimeInterval)timeout; // Returns a unique client id (user-specific), creating a persistent // one in the user defaults, if necessary. @@ -386,7 +387,7 @@ NSString *const kDefaultServerType = @"google"; } // Otherwise, if we have no client id, generate one! - srandom([[NSDate date] timeIntervalSince1970]); + srandom((int)[[NSDate date] timeIntervalSince1970]); long clientId1 = random(); long clientId2 = random(); long clientId3 = random(); @@ -403,8 +404,8 @@ NSString *const kDefaultServerType = @"google"; unsigned int logFileCounter = 0; NSString *logPath; - int logFileTailSize = [[parameters_ objectForKey:@BREAKPAD_LOGFILE_UPLOAD_SIZE] - intValue]; + size_t logFileTailSize = + [[parameters_ objectForKey:@BREAKPAD_LOGFILE_UPLOAD_SIZE] intValue]; NSMutableArray *logFilenames; // An array of NSString, one per log file logFilenames = [[NSMutableArray alloc] init]; @@ -544,7 +545,7 @@ NSString *const kDefaultServerType = @"google"; // Get the timeout value for the notification. NSTimeInterval timeout = [self messageTimeout]; - int buttonPressed = NSAlertAlternateReturn; + NSInteger buttonPressed = NSAlertAlternateReturn; // Determine whether we should create a text box for user feedback. if ([self shouldRequestComments]) { BOOL didLoadNib = [NSBundle loadNibNamed:@"Breakpad" owner:self]; @@ -592,7 +593,7 @@ NSString *const kDefaultServerType = @"google"; [commentMessage_ setStringValue:[NSString stringWithFormat:@"%@\n\n%@", [self explanatoryDialogText], NSLocalizedString(@"commentsMsg", @"")]]; - float commentHeightDelta = [commentMessage_ breakpad_adjustHeightToFit]; + CGFloat commentHeightDelta = [commentMessage_ breakpad_adjustHeightToFit]; [headerBox_ breakpad_shiftVertically:commentHeightDelta]; [alertWindow_ breakpad_adjustHeight:commentHeightDelta]; @@ -600,7 +601,7 @@ NSString *const kDefaultServerType = @"google"; // section depending on whether or not we are asking for email. if (includeEmail) { [emailMessage_ setStringValue:NSLocalizedString(@"emailMsg", @"")]; - float emailHeightDelta = [emailMessage_ breakpad_adjustHeightToFit]; + CGFloat emailHeightDelta = [emailMessage_ breakpad_adjustHeightToFit]; [preEmailBox_ breakpad_shiftVertically:emailHeightDelta]; [alertWindow_ breakpad_adjustHeight:emailHeightDelta]; } else { @@ -609,7 +610,7 @@ NSString *const kDefaultServerType = @"google"; // Localize the email label, and shift the associated text field. [emailLabel_ setStringValue:NSLocalizedString(@"emailLabel", @"")]; - float emailLabelWidthDelta = [emailLabel_ breakpad_adjustWidthToFit]; + CGFloat emailLabelWidthDelta = [emailLabel_ breakpad_adjustWidthToFit]; [emailEntryField_ breakpad_shiftHorizontally:emailLabelWidthDelta]; // Localize the placeholder text. @@ -620,12 +621,12 @@ NSString *const kDefaultServerType = @"google"; // Localize the privacy policy label, and keep it right-aligned to the arrow. [privacyLinkLabel_ setStringValue:NSLocalizedString(@"privacyLabel", @"")]; - float privacyLabelWidthDelta = [privacyLinkLabel_ breakpad_adjustWidthToFit]; + CGFloat privacyLabelWidthDelta = [privacyLinkLabel_ breakpad_adjustWidthToFit]; [privacyLinkLabel_ breakpad_shiftHorizontally:(-privacyLabelWidthDelta)]; // Localize the buttons, and keep the cancel button at the right distance. [sendButton_ setTitle:NSLocalizedString(@"sendReportButton", @"")]; - float sendButtonWidthDelta = [sendButton_ breakpad_smartSizeToFit]; + CGFloat sendButtonWidthDelta = [sendButton_ breakpad_smartSizeToFit]; [cancelButton_ breakpad_shiftHorizontally:(-sendButtonWidthDelta)]; [cancelButton_ setTitle:NSLocalizedString(@"cancelButton", @"")]; [cancelButton_ breakpad_smartSizeToFit]; @@ -633,12 +634,13 @@ NSString *const kDefaultServerType = @"google"; - (void)removeEmailPrompt { [emailSectionBox_ setHidden:YES]; - float emailSectionHeight = NSHeight([emailSectionBox_ frame]); + CGFloat emailSectionHeight = NSHeight([emailSectionBox_ frame]); [preEmailBox_ breakpad_shiftVertically:(-emailSectionHeight)]; [alertWindow_ breakpad_adjustHeight:(-emailSectionHeight)]; } -- (int)runModalWindow:(NSWindow*)window withTimeout:(NSTimeInterval)timeout { +- (NSInteger)runModalWindow:(NSWindow*)window + withTimeout:(NSTimeInterval)timeout { // Queue a |stopModal| message to be performed in |timeout| seconds. if (timeout > 0.001) { remainingDialogTime_ = timeout; @@ -653,7 +655,7 @@ NSString *const kDefaultServerType = @"google"; // Run the window modally and wait for either a |stopModal| message or a // button click. [NSApp activateIgnoringOtherApps:YES]; - int returnMethod = [NSApp runModalForWindow:window]; + NSInteger returnMethod = [NSApp runModalForWindow:window]; return returnMethod; } @@ -717,7 +719,7 @@ doCommandBySelector:(SEL)commandSelector { if (remainingDialogTime_ > 59) { // calculate minutes remaining for UI purposes - displayedTimeLeft = (remainingDialogTime_ / 60); + displayedTimeLeft = (int)(remainingDialogTime_ / 60); if (displayedTimeLeft == 1) { formatString = NSLocalizedString(@"countdownMsgMinuteSingular", @""); @@ -725,8 +727,8 @@ doCommandBySelector:(SEL)commandSelector { formatString = NSLocalizedString(@"countdownMsgMinutesPlural", @""); } } else { - displayedTimeLeft = remainingDialogTime_; - if (remainingDialogTime_ == 1) { + displayedTimeLeft = (int)remainingDialogTime_; + if (displayedTimeLeft == 1) { formatString = NSLocalizedString(@"countdownMsgSecondSingular", @""); } else { formatString = NSLocalizedString(@"countdownMsgSecondsPlural", @""); @@ -797,7 +799,8 @@ doCommandBySelector:(SEL)commandSelector { NSTimeInterval now = CFAbsoluteTimeGetCurrent(); NSTimeInterval spanSeconds = (now - lastTime); - [programDict setObject:[NSNumber numberWithFloat:now] forKey:kLastSubmission]; + [programDict setObject:[NSNumber numberWithDouble:now] + forKey:kLastSubmission]; [ud setObject:programDict forKey:program]; [ud synchronize]; @@ -1055,7 +1058,7 @@ doCommandBySelector:(SEL)commandSelector { //============================================================================= @implementation LengthLimitingTextField -- (void) setMaximumLength:(unsigned int)maxLength { +- (void)setMaximumLength:(NSUInteger)maxLength { maximumLength_ = maxLength; } @@ -1072,7 +1075,7 @@ shouldChangeTextInRange:(NSRange)affectedCharRange } // Figure out what the new string length would be, taking into // account user selections. - int newStringLength = + NSUInteger newStringLength = [[textView string] length] - affectedCharRange.length + [replacementString length]; if (newStringLength > maximumLength_) { @@ -1088,7 +1091,7 @@ shouldChangeTextInRange:(NSRange)affectedCharRange NSText* fieldEditor = [self currentEditor]; if (fieldEditor != nil) { // Check for a single "Command" modifier - unsigned int modifiers = [event modifierFlags]; + NSUInteger modifiers = [event modifierFlags]; modifiers &= NSDeviceIndependentModifierFlagsMask; if (modifiers == NSCommandKeyMask) { // Now, check for Select All, Cut, Copy, or Paste key equivalents. diff --git a/src/client/mac/testapp/Controller.m b/src/client/mac/testapp/Controller.m index a324f147..7831a156 100644 --- a/src/client/mac/testapp/Controller.m +++ b/src/client/mac/testapp/Controller.m @@ -31,6 +31,7 @@ #import "Controller.h" #import "TestClass.h" +#import "GTMDefines.h" #include #include @@ -51,7 +52,7 @@ } - (IBAction)forkTestOptions:(id)sender { - int tag = [[sender selectedCell] tag]; + NSInteger tag = [[sender selectedCell] tag]; NSLog(@"sender tag: %d", tag); if (tag <= 2) { bpForkOption = tag; @@ -129,11 +130,11 @@ } - (IBAction)crash:(id)sender { - int tag = [sender tag]; + NSInteger tag = [sender tag]; if (tag == 1) { [NSObject cancelPreviousPerformRequestsWithTarget:self]; - [self performSelector:@selector(causeCrash) withObject:nil afterDelay:10]; + [self performSelector:@selector(causeCrash) withObject:nil afterDelay:10.0]; [sender setState:NSOnState]; return; } diff --git a/src/client/mac/testapp/English.lproj/MainMenu.xib b/src/client/mac/testapp/English.lproj/MainMenu.xib index ebc623c4..840c0db3 100644 --- a/src/client/mac/testapp/English.lproj/MainMenu.xib +++ b/src/client/mac/testapp/English.lproj/MainMenu.xib @@ -3,25 +3,26 @@ 1050 10F569 - 762 + 788 1038.29 461.00 - YES - - YES - - - YES - + com.apple.InterfaceBuilder.CocoaPlugin + 788 YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin - YES - + + YES + YES @@ -52,7 +53,7 @@ {1.79769e+308, 1.79769e+308} {213, 107} - + 256 YES @@ -61,6 +62,7 @@ 301 {{14, 140}, {292, 32}} + YES 67239424 @@ -88,6 +90,7 @@ 301 {{14, 76}, {292, 32}} + 2 YES @@ -113,6 +116,7 @@ 301 {{14, 108}, {292, 32}} + 1 YES @@ -138,6 +142,7 @@ 268 {{14, 44}, {292, 32}} + YES 67239424 @@ -158,6 +163,7 @@ 268 {{14, 12}, {292, 32}} + YES 67239424 @@ -175,6 +181,8 @@ {320, 188} + + {{0, 0}, {1440, 878}} {213, 129} @@ -782,7 +790,7 @@ {1.79769e+308, 1.79769e+308} - + 256 YES @@ -804,7 +812,7 @@ 5 1211912703 - 128 + 0 NSRadioButton @@ -821,7 +829,7 @@ 6 1211912703 - 128 + 0 549453824 {18, 18} @@ -930,7 +938,7 @@ QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA 7 1211912703 - 128 + 0 549453824 {18, 18} @@ -1040,7 +1048,7 @@ AAAAAAAAAAAAAAAAAABtbW9kAAAAAAAAIvAAACaQAAAAAMJtVwAAAAAAAAAAAAAAAAAAAAAAA 5 1211912703 - 128 + 0 @@ -1080,7 +1088,7 @@ AAAAAAAAAAAAAAAAAABtbW9kAAAAAAAAIvAAACaQAAAAAMJtVwAAAAAAAAAAAAAAAAAAAAAAA 1211912703 - 128 + 0 @@ -1095,7 +1103,7 @@ AAAAAAAAAAAAAAAAAABtbW9kAAAAAAAAIvAAACaQAAAAAMJtVwAAAAAAAAAAAAAAAAAAAAAAA 1 1211912703 - 128 + 0 549453824 {18, 18} @@ -1201,7 +1209,7 @@ QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA 2 1211912703 - 128 + 0 549453824 {18, 18} @@ -1309,7 +1317,7 @@ AAAAAAAAAAAAAAAAAABtbW9kAAAAAAAAIvAAACaQAAAAAMJtVwAAAAAAAAAAAAAAAAAAAAAAARadio 1211912703 - 128 + 0 549453824 {18, 18} @@ -1378,7 +1386,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 3 1211912703 - 128 + 0 @@ -1393,7 +1401,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 4 1211912703 - 128 + 0 549453824 {18, 18} @@ -1502,7 +1510,7 @@ QXBwbGUgQ29tcHV0ZXIsIEluYy4sIDIwMDUAAAAAA Radio 1211912703 - 128 + 0 549453824 {18, 18} @@ -1579,6 +1587,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {787, 260} + {{0, 0}, {1440, 878}} {1.79769e+308, 1.79769e+308} @@ -2614,194 +2623,382 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA YES YES + -3.IBPluginDependency -3.ImportedFromIB2 + 103.IBPluginDependency 103.ImportedFromIB2 + 106.IBPluginDependency 106.ImportedFromIB2 + 111.IBPluginDependency 111.ImportedFromIB2 + 112.IBPluginDependency 112.ImportedFromIB2 + 124.IBPluginDependency 124.ImportedFromIB2 + 125.IBPluginDependency 125.ImportedFromIB2 + 126.IBPluginDependency 126.ImportedFromIB2 + 129.IBPluginDependency 129.ImportedFromIB2 + 130.IBPluginDependency 130.ImportedFromIB2 + 131.IBPluginDependency 131.ImportedFromIB2 + 134.IBPluginDependency 134.ImportedFromIB2 + 136.IBPluginDependency 136.ImportedFromIB2 + 143.IBPluginDependency 143.ImportedFromIB2 + 144.IBPluginDependency 144.ImportedFromIB2 + 145.IBPluginDependency 145.ImportedFromIB2 + 149.IBPluginDependency 149.ImportedFromIB2 + 150.IBPluginDependency 150.ImportedFromIB2 + 154.IBPluginDependency 154.ImportedFromIB2 + 155.IBPluginDependency 155.ImportedFromIB2 + 156.IBPluginDependency 156.ImportedFromIB2 + 157.IBPluginDependency 157.ImportedFromIB2 + 158.IBPluginDependency 158.ImportedFromIB2 + 159.IBPluginDependency 159.ImportedFromIB2 + 160.IBPluginDependency 160.ImportedFromIB2 + 161.IBPluginDependency 161.ImportedFromIB2 + 162.IBPluginDependency 162.ImportedFromIB2 + 163.IBPluginDependency 163.ImportedFromIB2 + 164.IBPluginDependency 164.ImportedFromIB2 + 167.IBPluginDependency 167.ImportedFromIB2 + 168.IBPluginDependency 168.ImportedFromIB2 + 169.IBPluginDependency 169.ImportedFromIB2 + 171.IBPluginDependency 171.ImportedFromIB2 + 172.IBPluginDependency 172.ImportedFromIB2 + 173.IBPluginDependency 173.ImportedFromIB2 + 174.IBPluginDependency 174.ImportedFromIB2 + 184.IBPluginDependency 184.ImportedFromIB2 + 185.IBPluginDependency 185.ImportedFromIB2 + 187.IBPluginDependency 187.ImportedFromIB2 + 189.IBPluginDependency 189.ImportedFromIB2 + 19.IBPluginDependency 19.ImportedFromIB2 + 191.IBPluginDependency 191.ImportedFromIB2 + 196.IBPluginDependency 196.ImportedFromIB2 + 197.IBPluginDependency 197.ImportedFromIB2 + 2.IBPluginDependency 2.ImportedFromIB2 + 204.IBPluginDependency 204.ImportedFromIB2 + 206.IBPluginDependency 206.ImportedFromIB2 207.ImportedFromIB2 21.IBEditorWindowLastContentRect + 21.IBPluginDependency 21.IBWindowTemplateEditedContentRect 21.ImportedFromIB2 21.windowTemplate.hasMinSize 21.windowTemplate.minSize + 210.IBPluginDependency 210.ImportedFromIB2 + 212.IBPluginDependency 212.ImportedFromIB2 + 218.IBPluginDependency 218.ImportedFromIB2 220.IBEditorWindowLastContentRect + 220.IBPluginDependency 220.IBWindowTemplateEditedContentRect 220.ImportedFromIB2 + 221.IBPluginDependency 221.ImportedFromIB2 + 226.IBPluginDependency 226.ImportedFromIB2 + 227.IBPluginDependency 227.ImportedFromIB2 + 228.IBPluginDependency 228.ImportedFromIB2 + 23.IBPluginDependency 23.ImportedFromIB2 + 232.IBPluginDependency 232.ImportedFromIB2 + 233.IBPluginDependency 233.ImportedFromIB2 + 234.IBPluginDependency 234.ImportedFromIB2 + 236.IBPluginDependency 236.ImportedFromIB2 + 237.IBPluginDependency 237.ImportedFromIB2 + 238.IBPluginDependency 238.ImportedFromIB2 + 239.IBPluginDependency 239.ImportedFromIB2 + 24.IBPluginDependency 24.ImportedFromIB2 + 248.IBPluginDependency 248.ImportedFromIB2 + 272.IBPluginDependency 272.ImportedFromIB2 29.IBEditorWindowLastContentRect + 29.IBPluginDependency 29.ImportedFromIB2 + 325.IBPluginDependency 325.ImportedFromIB2 + 329.IBPluginDependency + 330.IBPluginDependency + 331.IBPluginDependency + 332.IBPluginDependency + 333.IBPluginDependency + 334.IBPluginDependency + 335.IBPluginDependency + 336.IBPluginDependency + 337.IBPluginDependency + 5.IBPluginDependency 5.ImportedFromIB2 + 56.IBPluginDependency 56.ImportedFromIB2 + 57.IBPluginDependency 57.ImportedFromIB2 + 58.IBPluginDependency 58.ImportedFromIB2 + 72.IBPluginDependency 72.ImportedFromIB2 + 73.IBPluginDependency 73.ImportedFromIB2 + 74.IBPluginDependency 74.ImportedFromIB2 + 75.IBPluginDependency 75.ImportedFromIB2 + 77.IBPluginDependency 77.ImportedFromIB2 + 78.IBPluginDependency 78.ImportedFromIB2 + 79.IBPluginDependency 79.ImportedFromIB2 + 80.IBPluginDependency 80.ImportedFromIB2 + 81.IBPluginDependency 81.ImportedFromIB2 + 82.IBPluginDependency 82.ImportedFromIB2 + 83.IBPluginDependency 83.ImportedFromIB2 + 92.IBPluginDependency 92.ImportedFromIB2 YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - {{42, 911}, {320, 188}} - {{42, 911}, {320, 188}} + {{510, 1250}, {320, 188}} + com.apple.InterfaceBuilder.CocoaPlugin + {{510, 1250}, {320, 188}} {213, 107} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - {{21, 862}, {787, 260}} - {{21, 862}, {787, 260}} + {{-55, 1287}, {787, 260}} + com.apple.InterfaceBuilder.CocoaPlugin + {{-55, 1287}, {787, 260}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin {{0, 1114}, {362, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -2848,6 +3045,40 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA id + + YES + + YES + crash: + forkTestGo: + forkTestOptions: + generateReportWithoutCrash: + showForkTestWindow: + + + YES + + crash: + id + + + forkTestGo: + id + + + forkTestOptions: + id + + + generateReportWithoutCrash: + id + + + showForkTestWindow: + id + + + YES @@ -2861,6 +3092,33 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA NSWindow + + YES + + YES + forkTestOptions_ + window_ + + + YES + + forkTestOptions_ + NSWindow + + + window_ + NSWindow + + + + + IBProjectSource + testapp/Controller.h + + + + Controller + NSObject IBUserSource @@ -2875,6 +3133,586 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA + + YES + + NSActionCell + NSCell + + IBFrameworkSource + AppKit.framework/Headers/NSActionCell.h + + + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSBrowser + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSBrowser.h + + + + NSButton + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSButton.h + + + + NSButtonCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSButtonCell.h + + + + NSCell + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSCell.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSDocument + NSObject + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocument.h + + + + NSDocument + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentScripting.h + + + + NSDocumentController + NSObject + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + id + id + id + id + + + + YES + + YES + clearRecentDocuments: + newDocument: + openDocument: + saveAllDocuments: + + + YES + + clearRecentDocuments: + id + + + newDocument: + id + + + openDocument: + id + + + saveAllDocuments: + id + + + + + IBFrameworkSource + AppKit.framework/Headers/NSDocumentController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMatrix + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSMatrix.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMovieView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSMovieView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + 0 IBCocoaFramework @@ -2882,12 +3720,16 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA com.apple.InterfaceBuilder.CocoaPlugin.macosx + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 YES - ../GoogleBreakpadTest.xcodeproj + ../../Breakpad.xcodeproj 3 YES diff --git a/src/client/mac/testapp/TestClass.mm b/src/client/mac/testapp/TestClass.mm index cade633e..6e6a8833 100644 --- a/src/client/mac/testapp/TestClass.mm +++ b/src/client/mac/testapp/TestClass.mm @@ -78,7 +78,7 @@ void InternalTestClass::InternalFunction(AStruct &s) { float InternalTestClass::kStaticFloatValue = 42; static float PlainOldFunction() { - return 3.14145; + return 3.14145f; } @implementation TestClass diff --git a/src/client/mac/tests/SimpleStringDictionaryTest.h b/src/client/mac/tests/SimpleStringDictionaryTest.h index 1f48517f..53f6ae42 100644 --- a/src/client/mac/tests/SimpleStringDictionaryTest.h +++ b/src/client/mac/tests/SimpleStringDictionaryTest.h @@ -27,7 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#import +#import "GTMSenTestCase.h" #import "SimpleStringDictionary.h" @interface SimpleStringDictionaryTest : GTMTestCase { diff --git a/src/client/minidump_file_writer-inl.h b/src/client/minidump_file_writer-inl.h index 7c556a27..0e12e00b 100644 --- a/src/client/minidump_file_writer-inl.h +++ b/src/client/minidump_file_writer-inl.h @@ -61,27 +61,30 @@ inline bool TypedMDRVA::AllocateArray(size_t count) { } template -inline bool TypedMDRVA::AllocateObjectAndArray(unsigned int count, - size_t size) { - assert(count && size); +inline bool TypedMDRVA::AllocateObjectAndArray(size_t count, + size_t length) { + assert(count && length); allocation_state_ = SINGLE_OBJECT_WITH_ARRAY; - return UntypedMDRVA::Allocate(minidump_size::size() + count * size); + return UntypedMDRVA::Allocate(minidump_size::size() + count * length); } template inline bool TypedMDRVA::CopyIndex(unsigned int index, MDType *item) { assert(allocation_state_ == ARRAY); - return writer_->Copy(position_ + index * minidump_size::size(), item, - minidump_size::size()); + return writer_->Copy( + static_cast(position_ + index * minidump_size::size()), + item, minidump_size::size()); } template inline bool TypedMDRVA::CopyIndexAfterObject(unsigned int index, const void *src, - size_t size) { + size_t length) { assert(allocation_state_ == SINGLE_OBJECT_WITH_ARRAY); - return writer_->Copy(position_ + minidump_size::size() + index * size, - src, size); + return writer_->Copy( + static_cast(position_ + minidump_size::size() + + index * length), + src, length); } template diff --git a/src/client/minidump_file_writer.cc b/src/client/minidump_file_writer.cc index 1be3f504..66d4c690 100644 --- a/src/client/minidump_file_writer.cc +++ b/src/client/minidump_file_writer.cc @@ -107,7 +107,7 @@ bool MinidumpFileWriter::CopyStringToMDString(const wchar_t *str, // zero, but the second one may be zero, depending on the conversion from // UTF-32. int out_count = out[1] ? 2 : 1; - int out_size = sizeof(u_int16_t) * out_count; + size_t out_size = sizeof(u_int16_t) * out_count; result = mdstring->CopyIndexAfterObject(out_idx, out, out_size); out_idx += out_count; } @@ -134,7 +134,7 @@ bool MinidumpFileWriter::CopyStringToMDString(const char *str, // Append the one or two UTF-16 characters int out_count = out[1] ? 2 : 1; - int out_size = sizeof(u_int16_t) * out_count; + size_t out_size = sizeof(u_int16_t) * out_count; result = mdstring->CopyIndexAfterObject(out_idx, out, out_size); out_idx += out_count; } @@ -161,7 +161,8 @@ bool MinidumpFileWriter::WriteStringCore(const CharType *str, return false; // Set length excluding the NULL and copy the string - mdstring.get()->length = mdstring_length * sizeof(u_int16_t); + mdstring.get()->length = + static_cast(mdstring_length * sizeof(u_int16_t)); bool result = CopyStringToMDString(str, mdstring_length, &mdstring); // NULL terminate @@ -235,15 +236,15 @@ bool MinidumpFileWriter::Copy(MDRVA position, const void *src, ssize_t size) { assert(file_ != -1); // Ensure that the data will fit in the allocated space - if (size + position > size_) + if (static_cast(size + position) > size_) return false; // Seek and write the data #if __linux__ - if (sys_lseek(file_, position, SEEK_SET) == static_cast(position)) { + if (sys_lseek(file_, position, SEEK_SET) == position) { if (sys_write(file_, src, size) == size) { #else - if (lseek(file_, position, SEEK_SET) == static_cast(position)) { + if (lseek(file_, position, SEEK_SET) == position) { if (write(file_, src, size) == size) { #endif return true; @@ -260,11 +261,11 @@ bool UntypedMDRVA::Allocate(size_t size) { return position_ != MinidumpFileWriter::kInvalidMDRVA; } -bool UntypedMDRVA::Copy(MDRVA position, const void *src, size_t size) { +bool UntypedMDRVA::Copy(MDRVA pos, const void *src, size_t size) { assert(src); assert(size); - assert(position + size <= position_ + size_); - return writer_->Copy(position, src, size); + assert(pos + size <= position_ + size_); + return writer_->Copy(pos, src, size); } } // namespace google_breakpad diff --git a/src/client/minidump_file_writer.h b/src/client/minidump_file_writer.h index f569a553..cded3585 100644 --- a/src/client/minidump_file_writer.h +++ b/src/client/minidump_file_writer.h @@ -151,7 +151,7 @@ class UntypedMDRVA { // Return size and position inline MDLocationDescriptor location() const { - MDLocationDescriptor location = { size_, position_ }; + MDLocationDescriptor location = { static_cast(size_), position_ }; return location; } @@ -218,7 +218,7 @@ class TypedMDRVA : public UntypedMDRVA { // Allocate an array of |count| elements of |size| after object of MDType // Must not call more than once. // Return true on success, or false on failure - bool AllocateObjectAndArray(unsigned int count, size_t size); + bool AllocateObjectAndArray(size_t count, size_t size); // Copy |item| to |index| // Must have been allocated using AllocateArray(). diff --git a/src/client/minidump_file_writer_unittest.cc b/src/client/minidump_file_writer_unittest.cc index a83307d9..08522fb2 100644 --- a/src/client/minidump_file_writer_unittest.cc +++ b/src/client/minidump_file_writer_unittest.cc @@ -144,22 +144,23 @@ static bool CompareFile(const char *path) { 0x0000000a, 0x000a1c09, 0x0000000b, 0x00000000, #endif }; - unsigned int expected_byte_count = sizeof(expected); + size_t expected_byte_count = sizeof(expected); int fd = open(path, O_RDONLY, 0600); void *buffer = malloc(expected_byte_count); ASSERT_NE(fd, -1); ASSERT_TRUE(buffer); - ASSERT_EQ(read(fd, buffer, expected_byte_count), expected_byte_count); + ASSERT_EQ(read(fd, buffer, expected_byte_count), + static_cast(expected_byte_count)); char *b1, *b2; - b1 = (char*)buffer; - b2 = (char*)expected; + b1 = reinterpret_cast(buffer); + b2 = reinterpret_cast(expected); while (*b1 == *b2) { b1++; b2++; } - printf("%d\n",b1 - (char*)buffer); + printf("%p\n", reinterpret_cast(b1 - (char*)buffer)); ASSERT_EQ(memcmp(buffer, expected, expected_byte_count), 0); return true; -- cgit v1.2.1