OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_APP_BREAKPAD_LINUX_H_ | 5 #ifndef CHROME_APP_BREAKPAD_LINUX_H_ |
6 #define CHROME_APP_BREAKPAD_LINUX_H_ | 6 #define CHROME_APP_BREAKPAD_LINUX_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
10 extern void InitCrashReporter(); | 10 extern void InitCrashReporter(); |
11 bool IsCrashReporterEnabled(); | 11 bool IsCrashReporterEnabled(); |
12 | 12 |
13 static const size_t kMaxActiveURLSize = 1024; | 13 static const size_t kMaxActiveURLSize = 1024; |
14 static const size_t kGuidSize = 32; // 128 bits = 32 chars in hex. | 14 static const size_t kGuidSize = 32; // 128 bits = 32 chars in hex. |
15 static const size_t kDistroSize = 128; | 15 static const size_t kDistroSize = 128; |
| 16 #if defined(ADDRESS_SANITIZER) |
| 17 static const size_t kMaxAsanReportSize = 1 << 16; |
| 18 #endif |
16 | 19 |
17 struct BreakpadInfo { | 20 struct BreakpadInfo { |
18 const char* filename; // Path to the Breakpad dump data. | 21 const char* filename; // Path to the Breakpad dump data. |
| 22 #if defined(ADDRESS_SANITIZER) |
| 23 const char* log_filename; // Path to the ASan log file. |
| 24 const char* asan_report_str; // ASan report. |
| 25 unsigned asan_report_length; // Length of |asan_report_length|. |
| 26 #endif |
19 const char* process_type; // Process type, e.g. "renderer". | 27 const char* process_type; // Process type, e.g. "renderer". |
20 unsigned process_type_length; // Length of |process_type|. | 28 unsigned process_type_length; // Length of |process_type|. |
21 const char* crash_url; // Active URL in the crashing process. | 29 const char* crash_url; // Active URL in the crashing process. |
22 unsigned crash_url_length; // Length of |crash_url|. | 30 unsigned crash_url_length; // Length of |crash_url|. |
23 const char* guid; // Client ID. | 31 const char* guid; // Client ID. |
24 unsigned guid_length; // Length of |guid|. | 32 unsigned guid_length; // Length of |guid|. |
25 const char* distro; // Linux distro string. | 33 const char* distro; // Linux distro string. |
26 unsigned distro_length; // Length of |distro|. | 34 unsigned distro_length; // Length of |distro|. |
27 bool upload; // Whether to upload or save crash dump. | 35 bool upload; // Whether to upload or save crash dump. |
28 uint64_t process_start_time; // Uptime of the crashing process. | 36 uint64_t process_start_time; // Uptime of the crashing process. |
29 size_t oom_size; // Amount of memory requested if OOM. | 37 size_t oom_size; // Amount of memory requested if OOM. |
30 uint64_t pid; // PID where applicable. | 38 uint64_t pid; // PID where applicable. |
31 }; | 39 }; |
32 | 40 |
33 extern void HandleCrashDump(const BreakpadInfo& info); | 41 extern void HandleCrashDump(const BreakpadInfo& info); |
34 | 42 |
35 #endif // CHROME_APP_BREAKPAD_LINUX_H_ | 43 #endif // CHROME_APP_BREAKPAD_LINUX_H_ |
OLD | NEW |