diff options
author | nealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-04-23 07:56:16 +0000 |
---|---|---|
committer | nealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2009-04-23 07:56:16 +0000 |
commit | ed1f6e754a876f435507f5b5267341051ed3adf6 (patch) | |
tree | 89ae4211688de7fe0b0c1b3b7ee09bd76e08e401 /src/client/mac/crash_generation | |
parent | Add a parameter to control the Mac reporter timeout. (diff) | |
download | breakpad-ed1f6e754a876f435507f5b5267341051ed3adf6.tar.xz |
Code review issue 9002: Add paranoid logging to Inspector & Reporter
A=jeremy moskovich
R=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@333 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/crash_generation')
-rw-r--r-- | src/client/mac/crash_generation/Inspector.mm | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/client/mac/crash_generation/Inspector.mm b/src/client/mac/crash_generation/Inspector.mm index 9ba38538..c61706ca 100644 --- a/src/client/mac/crash_generation/Inspector.mm +++ b/src/client/mac/crash_generation/Inspector.mm @@ -160,8 +160,15 @@ void ConfigFile::WriteFile(const SimpleStringDictionary *configurationParameters sizeof(config_file_path_)); config_file_ = mkstemp(config_file_path_); - if (config_file_ == -1) + if (config_file_ == -1) { + DEBUGLOG(stderr, + "mkstemp(config_file_path_) == -1 (%s)\n", + strerror(errno)); return; + } + else { + DEBUGLOG(stderr, "Writing config file to (%s)\n", config_file_path_); + } has_created_file_ = true; @@ -177,6 +184,10 @@ void ConfigFile::WriteFile(const SimpleStringDictionary *configurationParameters SimpleStringDictionaryIterator iter(dictionary); while ((entry = iter.Next())) { + DEBUGLOG(stderr, + "config: (%s) -> (%s)\n", + entry->GetKey(), + entry->GetValue()); result = AppendConfigString(entry->GetKey(), entry->GetValue()); if (!result) @@ -348,6 +359,7 @@ void Inspector::SetCrashTimeParameters() { bool Inspector::InspectTask() { // keep the task quiet while we're looking at it task_suspend(remote_task_); + DEBUGLOG(stderr, "Suspsended Remote task\n"); NSString *minidumpDir; @@ -375,6 +387,9 @@ bool Inspector::InspectTask() { minidumpDir = [[NSString stringWithUTF8String:minidumpDirectory] stringByExpandingTildeInPath]; } + DEBUGLOG(stderr, + "Writing minidump to directory (%s)\n", + [minidumpDir UTF8String]); MinidumpLocation minidumpLocation(minidumpDir); @@ -393,14 +408,18 @@ bool Inspector::InspectTask() { NSString *minidumpPath = [NSString stringWithFormat:@"%s/%s.dmp", minidumpLocation.GetPath(), minidumpLocation.GetID()]; + DEBUGLOG(stderr, + "minidump path (%s)\n", + [minidumpPath UTF8String]); + bool result = generator.Write([minidumpPath fileSystemRepresentation]); - DEBUGLOG(stderr, "Inspector: finished writing minidump file: %s\n", - [minidumpPath fileSystemRepresentation]); + DEBUGLOG(stderr, "Wrote minidump - %s\n", result ? "OK" : "FAILED"); // let the task continue task_resume(remote_task_); + DEBUGLOG(stderr, "Resumed remote task\n"); return result; } |