git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@634 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
dmaclach 2010-07-28 19:06:30 +00:00
parent 6e3869c19f
commit 97918069d8
3 changed files with 55 additions and 46 deletions

View file

@ -110,16 +110,19 @@ typedef bool (*BreakpadFilterCallback)(int exception_type,
// Key: Value: // Key: Value:
// BREAKPAD_PRODUCT Product name (e.g., "MyAwesomeProduct") // BREAKPAD_PRODUCT Product name (e.g., "MyAwesomeProduct")
// This one is used as the key to identify // This one is used as the key to identify
// the product when uploading // the product when uploading. Falls back to
// CFBundleName if not specified.
// REQUIRED // REQUIRED
// //
// BREAKPAD_PRODUCT_DISPLAY This is the display name, e.g. a pretty // BREAKPAD_PRODUCT_DISPLAY This is the display name, e.g. a pretty
// name for the product when the crash_sender // name for the product when the crash_sender
// pops up UI for the user. Falls back to // pops up UI for the user. Falls back first to
// CFBundleDisplayName and then to
// BREAKPAD_PRODUCT if not specified. // BREAKPAD_PRODUCT if not specified.
// //
// BREAKPAD_VERSION Product version (e.g., 1.2.3), used // BREAKPAD_VERSION Product version (e.g., 1.2.3), used
// as metadata for crash report // as metadata for crash report. Falls back to
// CFBundleVersion if not specified.
// REQUIRED // REQUIRED
// //
// BREAKPAD_VENDOR Vendor name, used in UI (e.g. "A report has // BREAKPAD_VENDOR Vendor name, used in UI (e.g. "A report has

View file

@ -289,8 +289,8 @@ NSString * GetResourcePath() {
Dl_info info; Dl_info info;
if (dladdr((const void*)GetResourcePath, &info) != 0) { if (dladdr((const void*)GetResourcePath, &info) != 0) {
NSFileManager *filemgr = [NSFileManager defaultManager]; NSFileManager *filemgr = [NSFileManager defaultManager];
NSString *filePath NSString *filePath =
= [filemgr stringWithFileSystemRepresentation:info.dli_fname [filemgr stringWithFileSystemRepresentation:info.dli_fname
length:strlen(info.dli_fname)]; length:strlen(info.dli_fname)];
NSString *bundlePath = [filePath stringByDeletingLastPathComponent]; NSString *bundlePath = [filePath stringByDeletingLastPathComponent];
// The "Resources" directory should be in the same directory as the // The "Resources" directory should be in the same directory as the
@ -364,7 +364,8 @@ bool Breakpad::Initialize(NSDictionary *parameters) {
// Create the handler (allocating it in our special protected pool) // Create the handler (allocating it in our special protected pool)
handler_ = handler_ =
new (gBreakpadAllocator->Allocate(sizeof(google_breakpad::ExceptionHandler))) new (gBreakpadAllocator->Allocate(
sizeof(google_breakpad::ExceptionHandler)))
google_breakpad::ExceptionHandler( google_breakpad::ExceptionHandler(
Breakpad::ExceptionHandlerDirectCallback, this, true); Breakpad::ExceptionHandlerDirectCallback, this, true);
return true; return true;
@ -401,7 +402,8 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) {
[parameters objectForKey:@BREAKPAD_REPORTER_EXE_LOCATION]; [parameters objectForKey:@BREAKPAD_REPORTER_EXE_LOCATION];
NSString *timeout = [parameters objectForKey:@BREAKPAD_CONFIRM_TIMEOUT]; NSString *timeout = [parameters objectForKey:@BREAKPAD_CONFIRM_TIMEOUT];
NSArray *logFilePaths = [parameters objectForKey:@BREAKPAD_LOGFILES]; NSArray *logFilePaths = [parameters objectForKey:@BREAKPAD_LOGFILES];
NSString *logFileTailSize = [parameters objectForKey:@BREAKPAD_LOGFILE_UPLOAD_SIZE]; NSString *logFileTailSize =
[parameters objectForKey:@BREAKPAD_LOGFILE_UPLOAD_SIZE];
NSString *requestUserText = NSString *requestUserText =
[parameters objectForKey:@BREAKPAD_REQUEST_COMMENTS]; [parameters objectForKey:@BREAKPAD_REQUEST_COMMENTS];
NSString *requestEmail = [parameters objectForKey:@BREAKPAD_REQUEST_EMAIL]; NSString *requestEmail = [parameters objectForKey:@BREAKPAD_REQUEST_EMAIL];
@ -424,8 +426,12 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) {
if (!product) if (!product)
product = [parameters objectForKey:@"CFBundleName"]; product = [parameters objectForKey:@"CFBundleName"];
if (!display) if (!display) {
display = [parameters objectForKey:@"CFBundleDisplayName"];
if (!display) {
display = product; display = product;
}
}
if (!version) if (!version)
version = [parameters objectForKey:@"CFBundleVersion"]; version = [parameters objectForKey:@"CFBundleVersion"];
@ -505,8 +511,10 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) {
// Find Reporter. // Find Reporter.
if (!reporterPathString) { if (!reporterPathString) {
reporterPathString = reporterPathString =
[resourcePath stringByAppendingPathComponent:@"crash_report_sender.app"]; [resourcePath
reporterPathString = [[NSBundle bundleWithPath:reporterPathString] executablePath]; stringByAppendingPathComponent:@"crash_report_sender.app"];
reporterPathString =
[[NSBundle bundleWithPath:reporterPathString] executablePath];
} }
// Verify that there is a Reporter application. // Verify that there is a Reporter application.
@ -612,8 +620,7 @@ NSString * Breakpad::KeyValue(NSString *key) {
//============================================================================= //=============================================================================
void Breakpad::RemoveKeyValue(NSString *key) { void Breakpad::RemoveKeyValue(NSString *key) {
if (!config_params_ || !key) if (!config_params_ || !key) return;
return;
config_params_->RemoveKey([key UTF8String]); config_params_->RemoveKey([key UTF8String]);
} }
@ -705,8 +712,7 @@ bool Breakpad::HandleException(int exception_type,
// If we don't want any forwarding, return true here to indicate that we've // If we don't want any forwarding, return true here to indicate that we've
// processed things as much as we want. // processed things as much as we want.
if (send_and_exit_) if (send_and_exit_) return true;
return true;
return false; return false;
} }

View file

@ -1210,7 +1210,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 8B3102D411F0D60300FCF3E4 /* BreakpadDebug.xcconfig */; baseConfigurationReference = 8B3102D411F0D60300FCF3E4 /* BreakpadDebug.xcconfig */;
buildSettings = { buildSettings = {
HEADER_SEARCH_PATHS = "\"../../../**\""; HEADER_SEARCH_PATHS = ../../..;
}; };
name = Debug; name = Debug;
}; };
@ -1218,7 +1218,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 8B3102D511F0D60300FCF3E4 /* BreakpadRelease.xcconfig */; baseConfigurationReference = 8B3102D511F0D60300FCF3E4 /* BreakpadRelease.xcconfig */;
buildSettings = { buildSettings = {
HEADER_SEARCH_PATHS = "\"../../../**\""; HEADER_SEARCH_PATHS = ../../..;
}; };
name = Release; name = Release;
}; };