OLD | NEW |
1 // Copyright (c) 2006, Google Inc. | 1 // Copyright (c) 2006, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 // execution state independently of a crash. Returns true on success. | 231 // execution state independently of a crash. Returns true on success. |
232 bool WriteMinidump(); | 232 bool WriteMinidump(); |
233 | 233 |
234 // Writes a minidump immediately, with the user-supplied exception | 234 // Writes a minidump immediately, with the user-supplied exception |
235 // information. | 235 // information. |
236 bool WriteMinidumpForException(EXCEPTION_POINTERS* exinfo); | 236 bool WriteMinidumpForException(EXCEPTION_POINTERS* exinfo); |
237 | 237 |
238 // Convenience form of WriteMinidump which does not require an | 238 // Convenience form of WriteMinidump which does not require an |
239 // ExceptionHandler instance. | 239 // ExceptionHandler instance. |
240 static bool WriteMinidump(const wstring &dump_path, | 240 static bool WriteMinidump(const wstring &dump_path, |
241 MinidumpCallback callback, void* callback_context); | 241 MinidumpCallback callback, void* callback_context, |
| 242 MINIDUMP_TYPE dump_type = MiniDumpNormal); |
242 | 243 |
243 // Write a minidump of |child| immediately. This can be used to | 244 // Write a minidump of |child| immediately. This can be used to |
244 // capture the execution state of |child| independently of a crash. | 245 // capture the execution state of |child| independently of a crash. |
245 // Pass a meaningful |child_blamed_thread| to make that thread in | 246 // Pass a meaningful |child_blamed_thread| to make that thread in |
246 // the child process the one from which a crash signature is | 247 // the child process the one from which a crash signature is |
247 // extracted. | 248 // extracted. |
248 static bool WriteMinidumpForChild(HANDLE child, | 249 static bool WriteMinidumpForChild(HANDLE child, |
249 DWORD child_blamed_thread, | 250 DWORD child_blamed_thread, |
250 const wstring& dump_path, | 251 const wstring& dump_path, |
251 MinidumpCallback callback, | 252 MinidumpCallback callback, |
252 void* callback_context); | 253 void* callback_context, |
| 254 MINIDUMP_TYPE dump_type = MiniDumpNormal); |
253 | 255 |
254 // Get the thread ID of the thread requesting the dump (either the exception | 256 // Get the thread ID of the thread requesting the dump (either the exception |
255 // thread or any other thread that called WriteMinidump directly). This | 257 // thread or any other thread that called WriteMinidump directly). This |
256 // may be useful if you want to include additional thread state in your | 258 // may be useful if you want to include additional thread state in your |
257 // dumps. | 259 // dumps. |
258 DWORD get_requesting_thread_id() const { return requesting_thread_id_; } | 260 DWORD get_requesting_thread_id() const { return requesting_thread_id_; } |
259 | 261 |
260 // Controls behavior of EXCEPTION_BREAKPOINT and EXCEPTION_SINGLE_STEP. | 262 // Controls behavior of EXCEPTION_BREAKPOINT and EXCEPTION_SINGLE_STEP. |
261 bool get_handle_debug_exceptions() const { return handle_debug_exceptions_; } | 263 bool get_handle_debug_exceptions() const { return handle_debug_exceptions_; } |
262 void set_handle_debug_exceptions(bool handle_debug_exceptions) { | 264 void set_handle_debug_exceptions(bool handle_debug_exceptions) { |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 // disallow copy ctor and operator= | 515 // disallow copy ctor and operator= |
514 explicit ExceptionHandler(const ExceptionHandler &); | 516 explicit ExceptionHandler(const ExceptionHandler &); |
515 void operator=(const ExceptionHandler &); | 517 void operator=(const ExceptionHandler &); |
516 }; | 518 }; |
517 | 519 |
518 } // namespace google_breakpad | 520 } // namespace google_breakpad |
519 | 521 |
520 #pragma warning(pop) | 522 #pragma warning(pop) |
521 | 523 |
522 #endif // CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ | 524 #endif // CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ |
OLD | NEW |