OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ELF_CRASH_CRASH_HELPER_H_ | 5 #ifndef CHROME_ELF_CRASH_CRASH_HELPER_H_ |
6 #define CHROME_ELF_CRASH_CRASH_HELPER_H_ | 6 #define CHROME_ELF_CRASH_CRASH_HELPER_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 // Keep all crash-related APIs here. All other chrome_elf code should call here | 10 // Keep all crash-related APIs here. All other chrome_elf code should call here |
11 // for crash support. | 11 // for crash support. |
12 namespace elf_crash { | 12 namespace elf_crash { |
13 | 13 |
14 // Init the crash handling system for entire process. | 14 // Init the crash handling system for entire process. |
15 bool InitializeCrashReporting(); | 15 bool InitializeCrashReporting(); |
16 | 16 |
17 // Any late cleanup of the crash handling system. | 17 // Any late cleanup of the crash handling system. |
18 void ShutdownCrashReporting(); | 18 void ShutdownCrashReporting(); |
19 | 19 |
20 // Permanently disables subsequent calls to | 20 // Permanently disables subsequent calls to |
21 // kernel32!SetUnhandledExceptionFilter(), see comment in .cc for why this is | 21 // kernel32!SetUnhandledExceptionFilter(), see comment in .cc for why this is |
22 // needed. | 22 // needed. |
23 void DisableSetUnhandledExceptionFilter(); | 23 void DisableSetUnhandledExceptionFilter(); |
24 | 24 |
25 // Exception handler for exceptions in chrome_elf which need to be passed on to | 25 // Exception handler for exceptions in chrome_elf which need to be passed on to |
26 // the next handler in the chain. Examples include exceptions in DllMain, | 26 // the next handler in the chain. Examples include exceptions in DllMain, |
27 // blacklist interception code, etc. | 27 // blacklist interception code, etc. |
28 // Note: the handler takes a minidump. | 28 // Note: the handler takes a minidump. |
29 int GenerateCrashDump(EXCEPTION_POINTERS* exception_pointers); | 29 int GenerateCrashDump(EXCEPTION_POINTERS* exception_pointers); |
30 } | 30 |
| 31 // Generate a crash dump by calling into crashpad. |
| 32 void DumpWithoutCrashing(); |
| 33 |
| 34 } // namespace elf_crash |
31 | 35 |
32 #endif // CHROME_ELF_CRASH_CRASH_HELPER_H_ | 36 #endif // CHROME_ELF_CRASH_CRASH_HELPER_H_ |
OLD | NEW |