| Index: client/mac/crash_generation/Inspector.mm
|
| ===================================================================
|
| --- client/mac/crash_generation/Inspector.mm (revision 328)
|
| +++ client/mac/crash_generation/Inspector.mm (working copy)
|
| @@ -160,8 +160,15 @@
|
| 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 @@
|
| 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)
|
| @@ -324,6 +335,7 @@
|
| 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;
|
|
|
| @@ -350,6 +362,9 @@
|
| minidumpDir = [[NSString stringWithUTF8String:minidumpDirectory]
|
| stringByExpandingTildeInPath];
|
| }
|
| + DEBUGLOG(stderr,
|
| + "Writing minidump to directory (%s)\n",
|
| + [minidumpDir UTF8String]);
|
|
|
| MinidumpLocation minidumpLocation(minidumpDir);
|
|
|
| @@ -368,14 +383,18 @@
|
|
|
| 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;
|
| }
|
|
|