OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |