diff --git a/src/client/mac/Breakpad.xcodeproj/project.pbxproj b/src/client/mac/Breakpad.xcodeproj/project.pbxproj index 1794529a..f532d99a 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 = 44; + objectVersion = 42; objects = { /* Begin PBXAggregateTarget section */ @@ -26,8 +26,9 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ - 4084699D0F5D9CF900FDCA37 /* ReporterIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4084699C0F5D9CF900FDCA37 /* ReporterIcon.icns */; }; + 4084699D0F5D9CF900FDCA37 /* crash_report_sender.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4084699C0F5D9CF900FDCA37 /* crash_report_sender.icns */; }; 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; }; + F9267CB30F844BDD00A827EC /* Breakpad.nib in Resources */ = {isa = PBXBuildFile; fileRef = F9267CB10F844BDD00A827EC /* Breakpad.nib */; }; F9286B3A0F7EB25800A4DCC8 /* InspectorMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = F9286B390F7EB25800A4DCC8 /* InspectorMain.mm */; }; F92C53B80ECCE7B3009BE4BA /* Inspector.mm in Sources */ = {isa = PBXBuildFile; fileRef = F92C53B70ECCE7B3009BE4BA /* Inspector.mm */; }; F92C554C0ECCF534009BE4BA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; }; @@ -84,7 +85,6 @@ F93DE33F0F82C66B00608B94 /* string_utilities.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C53820ECCE635009BE4BA /* string_utilities.cc */; }; F93DE3410F82C68300608B94 /* exception_handler_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = F93DE3400F82C68300608B94 /* exception_handler_test.cc */; }; F945849E0F280E3C009A47BF /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F945849C0F280E3C009A47BF /* Localizable.strings */; }; - F94586220F7842CF009A47BF /* Breakpad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 40F2AEEB0F4F2F55004510E8 /* Breakpad.xib */; }; F9C444530F7981E600991B96 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F9C444510F7981E600991B96 /* InfoPlist.strings */; }; F9C44DB20EF07288003AEBAA /* Controller.m in Sources */ = {isa = PBXBuildFile; fileRef = F9C44DAC0EF07288003AEBAA /* Controller.m */; }; F9C44DB30EF07288003AEBAA /* crashduringload in Resources */ = {isa = PBXBuildFile; fileRef = F9C44DAD0EF07288003AEBAA /* crashduringload */; }; @@ -130,28 +130,28 @@ isa = PBXContainerItemProxy; containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; proxyType = 1; - remoteGlobalIDString = F93803BD0F80820F004D428B /* generator_test */; + remoteGlobalIDString = F93803BD0F80820F004D428B; remoteInfo = generator_test; }; F93DE2FD0F82C3C900608B94 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; proxyType = 1; - remoteGlobalIDString = F93DE2D00F82A67300608B94 /* minidump_file_writer_unittest */; + remoteGlobalIDString = F93DE2D00F82A67300608B94; remoteInfo = minidump_file_writer_unittest; }; F93DE36F0F82CC1300608B94 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; proxyType = 1; - remoteGlobalIDString = F93DE32B0F82C55600608B94 /* handler_test */; + remoteGlobalIDString = F93DE32B0F82C55600608B94; remoteInfo = handler_test; }; F93DE3A60F830D1D00608B94 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; proxyType = 1; - remoteGlobalIDString = F9C77DD90F7DD5CF0045F7DB /* UnitTests */; + remoteGlobalIDString = F9C77DD90F7DD5CF0045F7DB; remoteInfo = UnitTests; }; F94585870F78232B009A47BF /* PBXContainerItemProxy */ = { @@ -224,9 +224,9 @@ 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 32DBCF5E0370ADEE00C91783 /* Breakpad_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Breakpad_Prefix.pch; path = Framework/Breakpad_Prefix.pch; sourceTree = ""; }; - 4084699C0F5D9CF900FDCA37 /* ReporterIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = ReporterIcon.icns; path = sender/ReporterIcon.icns; sourceTree = ""; }; - 40F2AEEC0F4F2F55004510E8 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = sender/English.lproj/Breakpad.xib; sourceTree = ""; }; + 4084699C0F5D9CF900FDCA37 /* crash_report_sender.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = crash_report_sender.icns; path = sender/crash_report_sender.icns; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* Breakpad.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Breakpad.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F9267CB20F844BDD00A827EC /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = sender/English.lproj/Breakpad.nib; sourceTree = ""; }; F9286B380F7EB25800A4DCC8 /* Inspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Inspector.h; path = crash_generation/Inspector.h; sourceTree = ""; }; F9286B390F7EB25800A4DCC8 /* InspectorMain.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = InspectorMain.mm; path = crash_generation/InspectorMain.mm; sourceTree = ""; }; F92C53540ECCE349009BE4BA /* Inspector */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Inspector; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -405,7 +405,6 @@ F92C53600ECCE3D6009BE4BA /* common */, 0867D69AFE84028FC02AAC07 /* Frameworks */, 034768DFFF38A50411DB9C8B /* Products */, - F92C56A20ECE04A7009BE4BA /* crash_report_sender-Info.plist */, F9C77DDB0F7DD5CF0045F7DB /* UnitTests-Info.plist */, ); name = Breakpad; @@ -533,9 +532,10 @@ F92C56A60ECE04B6009BE4BA /* sender */ = { isa = PBXGroup; children = ( - 4084699C0F5D9CF900FDCA37 /* ReporterIcon.icns */, - 40F2AEEB0F4F2F55004510E8 /* Breakpad.xib */, F945849C0F280E3C009A47BF /* Localizable.strings */, + 4084699C0F5D9CF900FDCA37 /* crash_report_sender.icns */, + F92C56A20ECE04A7009BE4BA /* crash_report_sender-Info.plist */, + F9267CB10F844BDD00A827EC /* Breakpad.nib */, F92C56A70ECE04C5009BE4BA /* crash_report_sender.h */, F92C56A80ECE04C5009BE4BA /* crash_report_sender.m */, ); @@ -768,7 +768,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Breakpad" */; - compatibilityVersion = "Xcode 3.0"; + compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; mainGroup = 0867D691FE84028FC02AAC07 /* Breakpad */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -805,9 +805,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - F94586220F7842CF009A47BF /* Breakpad.xib in Resources */, F945849E0F280E3C009A47BF /* Localizable.strings in Resources */, - 4084699D0F5D9CF900FDCA37 /* ReporterIcon.icns in Resources */, + 4084699D0F5D9CF900FDCA37 /* crash_report_sender.icns in Resources */, + F9267CB30F844BDD00A827EC /* Breakpad.nib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -844,7 +844,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "install_name_tool -id \"@executable_path/../Resources/breakpadUtilities.dylib\" ${BUILT_PRODUCTS_DIR}/breakpadUtilities.dylib\n"; + shellScript = "install_name_tool -id \"@executable_path/../Resources/breakpadUtilities.dylib\" \"${BUILT_PRODUCTS_DIR}/breakpadUtilities.dylib\"\n"; }; F97A0E850ED4EC15008784D3 /* Change install name of breakpadUtilities */ = { isa = PBXShellScriptBuildPhase; @@ -858,7 +858,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#!/bin/bash\ninstall_name_tool -id \"@executable_path/../Frameworks/Breakpad.framework/Resources/breakpadUtilities.dylib\" ${BUILT_PRODUCTS_DIR}/breakpadUtilities.dylib\n"; + shellScript = "#!/bin/bash\ninstall_name_tool -id \"@executable_path/../Frameworks/Breakpad.framework/Resources/breakpadUtilities.dylib\" \"${BUILT_PRODUCTS_DIR}/breakpadUtilities.dylib\"\n"; }; F9C77DD80F7DD5CF0045F7DB /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -1070,12 +1070,12 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - 40F2AEEB0F4F2F55004510E8 /* Breakpad.xib */ = { + F9267CB10F844BDD00A827EC /* Breakpad.nib */ = { isa = PBXVariantGroup; children = ( - 40F2AEEC0F4F2F55004510E8 /* English */, + F9267CB20F844BDD00A827EC /* English */, ); - name = Breakpad.xib; + name = Breakpad.nib; sourceTree = ""; }; F945849C0F280E3C009A47BF /* Localizable.strings */ = { @@ -1149,7 +1149,6 @@ INFOPLIST_FILE = Framework/Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; PRODUCT_NAME = Breakpad; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; WRAPPER_EXTENSION = framework; }; name = Release; @@ -1164,7 +1163,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH)"; PREBINDING = NO; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; }; name = Debug; }; @@ -1178,7 +1177,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = "../..//**"; PREBINDING = NO; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; }; name = Release; }; @@ -1191,7 +1190,6 @@ 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/bin; OTHER_LDFLAGS = ( @@ -1200,7 +1198,6 @@ ); PREBINDING = NO; PRODUCT_NAME = Inspector; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; name = Debug; }; @@ -1212,7 +1209,6 @@ DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; HEADER_SEARCH_PATHS = "../..//**"; INSTALL_PATH = /usr/local/bin; LD_GENERATE_MAP_FILE = YES; @@ -1222,7 +1218,6 @@ ); PREBINDING = NO; PRODUCT_NAME = Inspector; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; ZERO_LINK = NO; }; name = Release; @@ -1249,7 +1244,6 @@ ); PREBINDING = NO; PRODUCT_NAME = breakpadUtilities; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; name = Debug; }; @@ -1273,7 +1267,6 @@ ); PREBINDING = NO; PRODUCT_NAME = breakpadUtilities; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; ZERO_LINK = NO; }; name = Release; @@ -1461,7 +1454,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH)"; PREBINDING = NO; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; }; name = "Debug With Code Coverage"; }; @@ -1496,7 +1489,6 @@ 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/bin; OTHER_LDFLAGS = ( @@ -1505,7 +1497,6 @@ ); PREBINDING = NO; PRODUCT_NAME = Inspector; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; name = "Debug With Code Coverage"; }; @@ -1531,7 +1522,6 @@ ); PREBINDING = NO; PRODUCT_NAME = breakpadUtilities; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; name = "Debug With Code Coverage"; }; diff --git a/src/client/mac/Framework/Breakpad.h b/src/client/mac/Framework/Breakpad.h index 05005a99..5c6c2154 100644 --- a/src/client/mac/Framework/Breakpad.h +++ b/src/client/mac/Framework/Breakpad.h @@ -54,6 +54,11 @@ extern "C" { #define kReporterMinidumpDirectoryKey "MinidumpDir" #define kReporterMinidumpIDKey "MinidumpID" +// The default subdirectory of the Library to put crash dumps in +// The subdirectory is +// ~/Library// +#define kDefaultLibrarySubdirectory "Breakpad" + // Specify some special keys to be used in the configuration file that is // generated by Breakpad and consumed by the crash_sender. #define BREAKPAD_PRODUCT_DISPLAY "BreakpadProductDisplay" @@ -64,6 +69,7 @@ extern "C" { #define BREAKPAD_REPORT_INTERVAL "BreakpadReportInterval" #define BREAKPAD_SKIP_CONFIRM "BreakpadSkipConfirm" #define BREAKPAD_SEND_AND_EXIT "BreakpadSendAndExit" +#define BREAKPAD_DUMP_DIRECTORY "BreakpadMinidumpLocation" #define BREAKPAD_INSPECTOR_LOCATION "BreakpadInspectorLocation" #define BREAKPAD_REPORTER_EXE_LOCATION \ @@ -94,41 +100,66 @@ typedef bool (*BreakpadFilterCallback)(int exception_type, // BREAKPAD_PRODUCT Product name (e.g., "MyAwesomeProduct") // This one is used as the key to identify // the product when uploading +// REQUIRED +// // BREAKPAD_PRODUCT_DISPLAY This is the display name, e.g. a pretty // name for the product when the crash_sender // pops up UI for the user. Falls back to // BREAKPAD_PRODUCT if not specified. +// // BREAKPAD_VERSION Product version (e.g., 1.2.3), used // as metadata for crash report +// REQUIRED +// // BREAKPAD_VENDOR Vendor named, used in UI (e.g. the Xxxx // foo bar company product widget has crashed) +// // BREAKPAD_URL URL destination for reporting +// REQUIRED +// // BREAKPAD_REPORT_INTERVAL # of seconds between sending // reports. If an additional report is // generated within this time, it will // be ignored. Default: 3600sec. // Specify 0 to send all reports. +// // BREAKPAD_SKIP_CONFIRM If true, the reporter will send the report // without any user intervention. +// Defaults to NO +// // BREAKPAD_SEND_AND_EXIT If true, the handler will exit after sending. // This will prevent any other handler (e.g., // CrashReporter) from getting the crash. +// Defaults TO YES +// +// BREAKPAD_DUMP_DIRECTORY The directory to store crash-dumps +// in. By default, we use +// ~/Library/Breakpad/ +// The path you specify here is tilde-expanded. +// // BREAKPAD_INSPECTOR_LOCATION The full path to the Inspector executable. +// Defaults to /Inspector +// // BREAKPAD_REPORTER_EXE_LOCATION The full path to the Reporter/sender // executable. +// Default: +// /crash_report_sender.app +// // BREAKPAD_LOGFILES Indicates an array of log file paths that -// should be uploaded at crash time +// should be uploaded at crash time. +// // BREAKPAD_REQUEST_COMMENTS If true, the message dialog will have a // text box for the user to enter comments as // well as a name and email address. -// BREAKPAD_COMMENTS The text the user provided as comments. +// Default: NO // -// The BREAKPAD_PRODUCT and BREAKPAD_VERSION are required to have non- -// NULL values. By default, the BREAKPAD_PRODUCT will be the -// CFBundleName and the BREAKPAD_VERSION will be the CFBundleVersion -// when these keys are present in the bundle's Info.plist. If the -// BREAKPAD_PRODUCT or BREAKPAD_VERSION are ultimately undefined, -// BreakpadCreate() will fail. You have been warned. +// The BREAKPAD_PRODUCT, BREAKPAD_VERSION, and BREAKPAD_URL are +// required to have non-NULL values. By default, the BREAKPAD_PRODUCT +// will be the CFBundleName and the BREAKPAD_VERSION will be the +// CFBundleVersion when these keys are present in the bundle's +// Info.plist. If the BREAKPAD_PRODUCT or BREAKPAD_VERSION are +// ultimately undefined, BreakpadCreate() will fail. You have been +// warned. // // If you are running in a debugger, breakpad will not install, unless the // BREAKPAD_IGNORE_DEBUGGER envionment variable is set and/or non-zero. diff --git a/src/client/mac/Framework/Breakpad.mm b/src/client/mac/Framework/Breakpad.mm index 52301c72..9de0a94b 100644 --- a/src/client/mac/Framework/Breakpad.mm +++ b/src/client/mac/Framework/Breakpad.mm @@ -407,7 +407,9 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) { [parameters objectForKey:@BREAKPAD_REQUEST_COMMENTS]; NSString *vendor = [parameters objectForKey:@BREAKPAD_VENDOR]; - + NSString *dumpSubdirectory = + [parameters objectForKey:@BREAKPAD_DUMP_DIRECTORY]; + // If these two are not already set(skipConfirm and sendAndExit can // come from user defaults and take priority) if (!skipConfirm) { @@ -509,9 +511,14 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) { return false; } - // The product and version are required values + if (!dumpSubdirectory) { + dumpSubdirectory = @""; + } + + // The product and version are required values. if (![product length] || ![version length]) { - DEBUGLOG(stderr, "Missing required product and/or version keys\n"); + DEBUGLOG(stderr, + "Missing required product or version subdirectory keys\n"); return false; } @@ -537,7 +544,9 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) { [requestUserText UTF8String]); dictionary.SetKeyValue(BREAKPAD_VENDOR, [vendor UTF8String]); - + dictionary.SetKeyValue(BREAKPAD_DUMP_DIRECTORY, + [dumpSubdirectory UTF8String]); + if (logFilePaths) { char logFileKey[255]; for(unsigned int i = 0; i < [logFilePaths count]; i++) { @@ -550,12 +559,6 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) { dictionary.SetKeyValue(BREAKPAD_EMAIL, [reportEmail UTF8String]); } -#if 0 // for testing - BreakpadSetKeyValue(this, @"UserKey1", @"User Value 1"); - BreakpadSetKeyValue(this, @"UserKey2", @"User Value 2"); - BreakpadSetKeyValue(this, @"UserKey3", @"User Value 3"); - BreakpadSetKeyValue(this, @"UserKey4", @"User Value 4"); -#endif return true; } diff --git a/src/client/mac/crash_generation/Inspector.h b/src/client/mac/crash_generation/Inspector.h index 38d441fb..098c56e8 100644 --- a/src/client/mac/crash_generation/Inspector.h +++ b/src/client/mac/crash_generation/Inspector.h @@ -122,18 +122,9 @@ class ConfigFile { //============================================================================= class MinidumpLocation { public: - MinidumpLocation() { - NSString *minidumpDirBase = NSHomeDirectory(); - NSString *minidumpDir; - - // Put root processes at root - if (geteuid() == 0) - minidumpDirBase = @"/"; - - minidumpDir = - [minidumpDirBase stringByAppendingPathComponent:@"Library/Logs/Google"]; - + MinidumpLocation(const NSString *minidumpDir) { // Ensure that the path exists. Fallback to /tmp if unable to locate path. + assert(minidumpDir); if (!EnsureDirectoryPathExists(minidumpDir)) { DEBUGLOG(stderr, "Unable to create: %s\n", [minidumpDir UTF8String]); minidumpDir = @"/tmp"; @@ -196,5 +187,3 @@ class Inspector { } // namespace google_breakpad - - diff --git a/src/client/mac/crash_generation/Inspector.mm b/src/client/mac/crash_generation/Inspector.mm index f659b669..2508289c 100644 --- a/src/client/mac/crash_generation/Inspector.mm +++ b/src/client/mac/crash_generation/Inspector.mm @@ -325,7 +325,33 @@ bool Inspector::InspectTask() { // keep the task quiet while we're looking at it task_suspend(remote_task_); - MinidumpLocation minidumpLocation; + NSString *minidumpDir; + + const char *minidumpDirectory = + config_params_.GetValueForKey(BREAKPAD_DUMP_DIRECTORY); + + // If the client app has not specified a minidump directory, + // use a default of Library// + if (0 == strlen(minidumpDirectory)) { + NSArray *libraryDirectories = + NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, + NSUserDomainMask, + YES); + + NSString *applicationSupportDirectory = + [libraryDirectories objectAtIndex:0]; + + minidumpDir = + [NSString stringWithFormat:@"%@/%s/%s", + applicationSupportDirectory, + kDefaultLibrarySubdirectory, + config_params_.GetValueForKey(GOOGLE_BREAKPAD_PRODUCT)]; + } else { + minidumpDir = [[NSString stringWithUTF8String:minidumpDirectory] + stringByExpandingTildeInPath]; + } + + MinidumpLocation minidumpLocation(minidumpDir); config_file_.WriteFile( &config_params_, minidumpLocation.GetPath(), diff --git a/src/client/mac/sender/English.lproj/Breakpad.nib/classes.nib b/src/client/mac/sender/English.lproj/Breakpad.nib/classes.nib new file mode 100644 index 00000000..2636d457 --- /dev/null +++ b/src/client/mac/sender/English.lproj/Breakpad.nib/classes.nib @@ -0,0 +1,33 @@ + + + + + IBClasses + + + ACTIONS + + cancel + id + sendReport + id + showPrivacyPolicy + id + + CLASS + Reporter + LANGUAGE + ObjC + OUTLETS + + alertWindow + NSWindow + + SUPERCLASS + NSObject + + + IBVersion + 1 + + diff --git a/src/client/mac/sender/English.lproj/Breakpad.nib/info.nib b/src/client/mac/sender/English.lproj/Breakpad.nib/info.nib new file mode 100644 index 00000000..55565cda --- /dev/null +++ b/src/client/mac/sender/English.lproj/Breakpad.nib/info.nib @@ -0,0 +1,20 @@ + + + + + IBFramework Version + 670 + IBLastKnownRelativeProjectPath + ../../Breakpad.xcodeproj + IBOldestOS + 5 + IBOpenObjects + + 2 + + IBSystem Version + 9F33 + targetFramework + IBCocoaFramework + + diff --git a/src/client/mac/sender/English.lproj/Breakpad.nib/keyedobjects.nib b/src/client/mac/sender/English.lproj/Breakpad.nib/keyedobjects.nib new file mode 100644 index 00000000..50dff43d Binary files /dev/null and b/src/client/mac/sender/English.lproj/Breakpad.nib/keyedobjects.nib differ diff --git a/src/client/mac/sender/English.lproj/Breakpad.xib b/src/client/mac/sender/English.lproj/Breakpad.xib deleted file mode 100644 index 7b5053a5..00000000 --- a/src/client/mac/sender/English.lproj/Breakpad.xib +++ /dev/null @@ -1,834 +0,0 @@ - - - - 1050 - 9F33 - 670 - 949.34 - 352.00 - - YES - - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - Reporter - - - FirstResponder - - - NSApplication - - - 1 - 2 - {{196, 157}, {484, 353}} - 536871936 - - NSWindow - - {3.40282e+38, 3.40282e+38} - - - 264 - - YES - - - 266 - {{89, 279}, {378, 54}} - - YES - - 67239424 - 272629760 - RE8gTk9UIExPQ0FMSVpFLiBUaGUgPFJlYWxseSBMb25nIENvbXBhbnkgTmFtZT4gcHJvZ3JhbSA8UmVh -bGx5IExvbmcgQXBwIE5hbWUgSGVyZT4gaGFzIHVuZXhwZWN0ZWRseSBxdWl0LiA - - LucidaGrande-Bold - 1.400000e+01 - 16 - - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2OQA - - - - 6 - System - controlTextColor - - 3 - MAA - - - - - - - 268 - - YES - - YES - Apple PDF pasteboard type - Apple PICT pasteboard type - Apple PNG pasteboard type - NSFilenamesPboardType - NeXT Encapsulated PostScript v1.2 pasteboard type - NeXT TIFF v4.0 pasteboard type - - - {{20, 269}, {64, 64}} - - YES - - 130560 - 33554432 - - NSImage - NSApplicationIcon - - 0 - 0 - 0 - NO - - YES - - - - 266 - {{17, 191}, {450, 70}} - - YES - - 67239424 - 272760832 - RE8gTk9UIExPQ0FMSVpFLiBUaGUgc3lzdGVtIGFuZCBvdGhlciBhcHBsaWNhdGlvbnMgaGF2ZSBub3Qg -YmVlbiBhZmZlY3RlZC4gQSByZXBvcnQgaGFzIGJlZW4gY3JlYXRlZCB0aGF0IHlvdSBjYW4gc2VuZCB0 -byA8UmVhbGx5IExvbmcgQ29tcGFueSBOYW1lPiB0byBoZWxwIGlkZW50aWZ5IHRoZSBwcm9ibGVtLgoK -UGxlYXNlIGhlbHAgdXMgZml4IHRoZSBwcm9ibGVtIGJ5IGRlc2NyaWJpbmcgd2hhdCBoYXBwZW5lZCBi -ZWZvcmUgdGhlIGNyYXNoLg - - LucidaGrande - 1.100000e+01 - 3100 - - - - - - - - - 290 - {{17, 85}, {450, 28}} - - YES - - 67239424 - 272760832 - DO NOT LOCALIZE. Providing your email address is optional and will allow us contact you in case we need more details. - - - - - - - - - 289 - {{353, 12}, {117, 32}} - - YES - - 67239424 - 134217728 - Send Report - - LucidaGrande - 1.300000e+01 - 1044 - - - -2038284033 - 129 - - - DQ - 200 - 25 - - - - - 289 - {{243, 12}, {110, 32}} - - YES - - 67239424 - 134217728 - Cancel - - - -2038284033 - 129 - - - Gw - 200 - 25 - - - - - 290 - {{59, 58}, {195, 19}} - - YES - - -1804468671 - 272761856 - preston.jackson@gmail.com - - optional - - YES - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 6 - System - textColor - - - - - - - 292 - {{17, 60}, {37, 14}} - - YES - - 68288064 - 71435264 - Email: - - - - - - - - - 289 - {{352, 59}, {16, 17}} - - YES - - -2080244224 - 262144 - Privacy Policy - - LucidaGrande - 9.000000e+00 - 3614 - - - -2040250113 - 36 - - NSImage - NSFollowLinkFreestandingTemplate - - - - 400 - 75 - - - - - 289 - {{259, 60}, {89, 14}} - - YES - - 68288064 - 71435264 - Privacy Policy - - - - - - - - - 274 - {{20, 124}, {444, 61}} - - YES - - 341966337 - 272760832 - DO NOT LOCALIZE: Line 1 Line 1 Line 1 Line 1 Line 1 Line 1 Line 1 Line 1 Line Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 2 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 3 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 Line 4 - - - YES - - - - - - {484, 353} - - - {{0, 0}, {1680, 1028}} - {3.40282e+38, 3.40282e+38} - - - - - YES - - - alertWindow - - - - 42 - - - - sendReport: - - - - 45 - - - - cancel: - - - - 46 - - - - showPrivacyPolicy: - - - - 53 - - - - value: headerMessage - - - - - - value: headerMessage - value - headerMessage - 2 - - - 85 - - - - value: reportMessage - - - - - - value: reportMessage - value - reportMessage - 2 - - - 86 - - - - value: emailMessage - - - - - - value: emailMessage - value - emailMessage - 2 - - - 87 - - - - value: emailValue - - - - - - value: emailValue - value - emailValue - - NSNullPlaceholder - optional - - 2 - - - 90 - - - - initialFirstResponder - - - - 91 - - - - value: commentsValue - - - - - - value: commentsValue - value - commentsValue - - NSNullPlaceholder - optional comments - - 2 - - - 124 - - - - nextKeyView - - - - 125 - - - - nextKeyView - - - - 126 - - - - nextKeyView - - - - 127 - - - - delegate - - - - 128 - - - - - YES - - 0 - - YES - - - - - - -2 - - - RmlsZSdzIE93bmVyA - - - -1 - - - First Responder - - - -3 - - - Application - - - 1 - - - YES - - - - - - 2 - - - YES - - - - - - - - - - - - - - - - 3 - - - YES - - - - - - 4 - - - - - 6 - - - YES - - - - - - 7 - - - - - 8 - - - YES - - - - - - 9 - - - - - 12 - - - YES - - - - - - 13 - - - - - 14 - - - YES - - - - - - 15 - - - - - 18 - - - YES - - - - - - 19 - - - - - 20 - - - YES - - - - - - 21 - - - - - 48 - - - YES - - - - - - 49 - - - - - 58 - - - YES - - - - - - 59 - - - - - 66 - - - YES - - - - - - 67 - - - - - 116 - - - YES - - - - - - 117 - - - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 1.IBViewEditorWindowController.showingBoundsRectangles - 1.IBViewEditorWindowController.showingLayoutRectangles - 1.IBWindowTemplateEditedContentRect - 1.NSWindowTemplate.visibleAtLaunch - 1.WindowOrigin - 1.editorWindowContentRectSynchronizationRect - 116.IBPluginDependency - 117.IBPluginDependency - 12.IBPluginDependency - 13.IBPluginDependency - 14.IBPluginDependency - 15.IBPluginDependency - 18.IBPluginDependency - 19.IBPluginDependency - 2.IBPluginDependency - 2.IBUserGuides - 20.IBPluginDependency - 21.IBPluginDependency - 3.IBPluginDependency - 4.IBPluginDependency - 48.IBPluginDependency - 49.IBPluginDependency - 58.IBPluginDependency - 59.IBPluginDependency - 6.IBPluginDependency - 66.IBPluginDependency - 67.IBPluginDependency - 7.IBPluginDependency - 8.IBPluginDependency - 9.IBPluginDependency - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{641, 409}, {484, 353}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{641, 409}, {484, 353}} - - {196, 240} - {{357, 418}, {480, 270}} - 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 - - YES - - - 1.120000e+02 - 1 - - - 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 - - - - YES - - YES - - - YES - - - - - YES - - YES - - - YES - - - - 128 - - - - YES - - Reporter - NSObject - - YES - - YES - cancel: - sendReport: - showPrivacyPolicy: - - - YES - id - id - id - - - - alertWindow - NSWindow - - - IBProjectSource - sender/crash_report_sender.h - - - - - 0 - ../../Breakpad.xcodeproj - 3 - - diff --git a/src/client/mac/sender/ReporterIcon.graffle b/src/client/mac/sender/ReporterIcon.graffle index 62cee85a..14a0e7c4 100644 --- a/src/client/mac/sender/ReporterIcon.graffle +++ b/src/client/mac/sender/ReporterIcon.graffle @@ -65,7 +65,7 @@ CreationDate 2008-11-14 16:58:15 -0700 Creator - Preston Jackson + John P. Developer DisplayScale 1 pt = 1 px FileType diff --git a/src/client/mac/sender/crash_report_sender-Info.plist b/src/client/mac/sender/crash_report_sender-Info.plist index 1ded1261..445926dd 100644 --- a/src/client/mac/sender/crash_report_sender-Info.plist +++ b/src/client/mac/sender/crash_report_sender-Info.plist @@ -6,6 +6,8 @@ English CFBundleExecutable ${EXECUTABLE_NAME} + CFBundleIconFile + crash_report_sender CFBundleIdentifier com.Breakpad.${PRODUCT_NAME:identifier} CFBundleInfoDictionaryVersion diff --git a/src/client/mac/sender/ReporterIcon.icns b/src/client/mac/sender/crash_report_sender.icns similarity index 100% rename from src/client/mac/sender/ReporterIcon.icns rename to src/client/mac/sender/crash_report_sender.icns diff --git a/src/client/mac/testapp/Info.plist b/src/client/mac/testapp/Info.plist index 76d70f21..84755c5d 100644 --- a/src/client/mac/testapp/Info.plist +++ b/src/client/mac/testapp/Info.plist @@ -1,46 +1,48 @@ - + - CFBundleDevelopmentRegion - English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - bomb - CFBundleIdentifier - com.Google.BreakpadTest - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - BreakpadProductDisplay - Google Breakpad Tester - BreakpadProduct - Breakpad_Tester - BreakpadVersion - 1.2.3.4 - BreakpadReportInterval - 10 - BreakpadSkipConfirm - NO - BreakpadSendAndExit - YES - BreakpadRequestComments - YES - BreakpadVendor - Foo Bar Corp, Incorporated, LTD, LLC - LSUIElement - 1 + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + bomb + CFBundleIdentifier + com.Google.BreakpadTest + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + BreakpadProductDisplay + Google Breakpad Tester + BreakpadProduct + Breakpad_Tester + BreakpadVersion + 1.2.3.4 + BreakpadReportInterval + 10 + BreakpadSkipConfirm + NO + BreakpadSendAndExit + YES + BreakpadRequestComments + YES + BreakpadVendor + Foo Bar Corp, Incorporated, LTD, LLC + BreakpadMinidumpLocation + Breakpad Test Application/Crash Dumps + LSUIElement + 1 diff --git a/src/common/mac/GTMLogger.h b/src/common/mac/GTMLogger.h index 1626b1b6..7d52f01e 100644 --- a/src/common/mac/GTMLogger.h +++ b/src/common/mac/GTMLogger.h @@ -50,6 +50,7 @@ // called from multiple threads, so it must be thread-safe. #import +#import "GTMDefines.h" // Predeclaration of used protocols that are declared later in this file. @protocol GTMLogWriter, GTMLogFormatter, GTMLogFilter; @@ -455,4 +456,3 @@ typedef enum { // way to enable debug-level logging in release builds (if you so desire). @interface GTMLogNoFilter : NSObject @end // GTMLogNoFilter -