Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: components/crash/app/breakpad_linux.cc

Issue 583873003: Breakpad Linux: Add some debug logging for crash id generation failures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rephrase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // For linux_syscall_support.h. This makes it safe to call embedded system 5 // For linux_syscall_support.h. This makes it safe to call embedded system
6 // calls when in seccomp mode. 6 // calls when in seccomp mode.
7 7
8 #include "components/crash/app/breakpad_linux.h" 8 #include "components/crash/app/breakpad_linux.h"
9 9
10 #include <fcntl.h> 10 #include <fcntl.h>
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 return true; 1075 return true;
1076 #endif 1076 #endif
1077 } 1077 }
1078 1078
1079 // |buf| should be |expected_len| + 1 characters in size and NULL terminated. 1079 // |buf| should be |expected_len| + 1 characters in size and NULL terminated.
1080 void HandleCrashReportId(const char* buf, size_t bytes_read, 1080 void HandleCrashReportId(const char* buf, size_t bytes_read,
1081 size_t expected_len) { 1081 size_t expected_len) {
1082 WriteNewline(); 1082 WriteNewline();
1083 if (!IsValidCrashReportId(buf, bytes_read, expected_len)) { 1083 if (!IsValidCrashReportId(buf, bytes_read, expected_len)) {
1084 #if defined(OS_CHROMEOS) 1084 #if defined(OS_CHROMEOS)
1085 static const char msg[] = "Crash_reporter failed to process crash report"; 1085 static const char msg[] =
1086 "System crash-reporter failed to process crash report.";
1086 #else 1087 #else
1087 static const char msg[] = "Failed to get crash dump id."; 1088 static const char msg[] = "Failed to get crash dump id.";
1088 #endif 1089 #endif
1089 WriteLog(msg, sizeof(msg) - 1); 1090 WriteLog(msg, sizeof(msg) - 1);
1090 WriteNewline(); 1091 WriteNewline();
1092
1093 static const char id_msg[] = "Report Id: ";
1094 WriteLog(id_msg, sizeof(id_msg) - 1);
1095 WriteLog(buf, bytes_read);
1096 WriteNewline();
1091 return; 1097 return;
1092 } 1098 }
1093 1099
1094 #if defined(OS_CHROMEOS) 1100 #if defined(OS_CHROMEOS)
1095 static const char msg[] = "Crash dump received by crash_reporter\n"; 1101 static const char msg[] = "Crash dump received by crash_reporter\n";
1096 WriteLog(msg, sizeof(msg) - 1); 1102 WriteLog(msg, sizeof(msg) - 1);
1097 #else 1103 #else
1098 // Write crash dump id to stderr. 1104 // Write crash dump id to stderr.
1099 static const char msg[] = "Crash dump id: "; 1105 static const char msg[] = "Crash dump id: ";
1100 WriteLog(msg, sizeof(msg) - 1); 1106 WriteLog(msg, sizeof(msg) - 1);
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 } 1614 }
1609 } 1615 }
1610 } 1616 }
1611 #endif // OS_ANDROID 1617 #endif // OS_ANDROID
1612 1618
1613 bool IsCrashReporterEnabled() { 1619 bool IsCrashReporterEnabled() {
1614 return g_is_crash_reporter_enabled; 1620 return g_is_crash_reporter_enabled;
1615 } 1621 }
1616 1622
1617 } // namespace breakpad 1623 } // namespace breakpad
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698