aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/crash_generation
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/mac/crash_generation')
-rw-r--r--src/client/mac/crash_generation/Inspector.mm25
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;
}