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 | |
19 | 16 |
20 struct BreakpadInfo { | 17 struct BreakpadInfo { |
21 const char* filename; // Path to the Breakpad dump data. | 18 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 | |
27 const char* process_type; // Process type, e.g. "renderer". | 19 const char* process_type; // Process type, e.g. "renderer". |
28 unsigned process_type_length; // Length of |process_type|. | 20 unsigned process_type_length; // Length of |process_type|. |
29 const char* crash_url; // Active URL in the crashing process. | 21 const char* crash_url; // Active URL in the crashing process. |
30 unsigned crash_url_length; // Length of |crash_url|. | 22 unsigned crash_url_length; // Length of |crash_url|. |
31 const char* guid; // Client ID. | 23 const char* guid; // Client ID. |
32 unsigned guid_length; // Length of |guid|. | 24 unsigned guid_length; // Length of |guid|. |
33 const char* distro; // Linux distro string. | 25 const char* distro; // Linux distro string. |
34 unsigned distro_length; // Length of |distro|. | 26 unsigned distro_length; // Length of |distro|. |
35 bool upload; // Whether to upload or save crash dump. | 27 bool upload; // Whether to upload or save crash dump. |
36 uint64_t process_start_time; // Uptime of the crashing process. | 28 uint64_t process_start_time; // Uptime of the crashing process. |
37 size_t oom_size; // Amount of memory requested if OOM. | 29 size_t oom_size; // Amount of memory requested if OOM. |
38 uint64_t pid; // PID where applicable. | 30 uint64_t pid; // PID where applicable. |
39 }; | 31 }; |
40 | 32 |
41 extern void HandleCrashDump(const BreakpadInfo& info); | 33 extern void HandleCrashDump(const BreakpadInfo& info); |
42 | 34 |
43 #endif // CHROME_APP_BREAKPAD_LINUX_H_ | 35 #endif // CHROME_APP_BREAKPAD_LINUX_H_ |
OLD | NEW |