aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/Framework/Breakpad.mm
diff options
context:
space:
mode:
authornealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-04-22 06:25:21 +0000
committernealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-04-22 06:25:21 +0000
commit1cb4ad73a6b77f47dbec69dcb5551c16e37d267d (patch)
tree4c6eb90b067656001659b7c4d3a8ec27d1166a4e /src/client/mac/Framework/Breakpad.mm
parentGive the Mac reporter app a localized name of 'Crash Reporter' (diff)
downloadbreakpad-1cb4ad73a6b77f47dbec69dcb5551c16e37d267d.tar.xz
Fix to support extensible parameter handling, and add process crashtime/uptime support
R=stuart morgan A=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@331 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/Framework/Breakpad.mm')
-rw-r--r--src/client/mac/Framework/Breakpad.mm16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/client/mac/Framework/Breakpad.mm b/src/client/mac/Framework/Breakpad.mm
index 65678807..30b8eeab 100644
--- a/src/client/mac/Framework/Breakpad.mm
+++ b/src/client/mac/Framework/Breakpad.mm
@@ -369,7 +369,6 @@ bool Breakpad::Initialize(NSDictionary *parameters) {
new (gBreakpadAllocator->Allocate(sizeof(google_breakpad::ExceptionHandler)))
google_breakpad::ExceptionHandler(
Breakpad::ExceptionHandlerDirectCallback, this, true);
-
return true;
}
@@ -409,6 +408,8 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) {
[parameters objectForKey:@BREAKPAD_VENDOR];
NSString *dumpSubdirectory =
[parameters objectForKey:@BREAKPAD_DUMP_DIRECTORY];
+ NSString *buildId =
+ [parameters objectForKey:@BREAKPAD_BUILD_ID];
// If these two are not already set(skipConfirm and sendAndExit can
// come from user defaults and take priority)
@@ -547,11 +548,22 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) {
dictionary.SetKeyValue(BREAKPAD_DUMP_DIRECTORY,
[dumpSubdirectory UTF8String]);
+ dictionary.SetKeyValue(BREAKPAD_BUILD_ID,
+ [buildId UTF8String]);
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ char timeStartedString[32];
+ sprintf(timeStartedString, "%d", tv.tv_sec);
+ dictionary.SetKeyValue(BREAKPAD_PROCESS_START_TIME,
+ timeStartedString);
+
if (logFilePaths) {
char logFileKey[255];
for(unsigned int i = 0; i < [logFilePaths count]; i++) {
sprintf(logFileKey,"%s%d", BREAKPAD_LOGFILE_KEY_PREFIX, i);
- dictionary.SetKeyValue(logFileKey, [[logFilePaths objectAtIndex:i] fileSystemRepresentation]);
+ dictionary.SetKeyValue(logFileKey,
+ [[logFilePaths objectAtIndex:i]
+ fileSystemRepresentation]);
}
}