Crashpad

Public Member Functions | List of all members
crashpad::CrashReportExceptionHandler Class Reference

An exception handler that writes crash reports for exception messages to a CrashReportDatabase. More...

`#include "handler/win/crash_report_exception_handler.h"`

Inheritance diagram for crashpad::CrashReportExceptionHandler:

## Public Member Functions
| CrashReportExceptionHandler (CrashReportDatabase *database, CrashReportUploadThread *upload_thread, const std::map< std::string, std::string > *process_annotations)
| Creates a new object that will store crash reports in database. More...
kern_return_t | CatchMachException (exception_behavior_t behavior, exception_handler_t exception_port, thread_t thread, task_t task, exception_type_t exception, const mach_exception_data_type_t *code, mach_msg_type_number_t code_count, thread_state_flavor_t *flavor, ConstThreadState old_state, mach_msg_type_number_t old_state_count, thread_state_t new_state, mach_msg_type_number_t *new_state_count, const mach_msg_trailer_t *trailer, bool *destroy_complex_request) override
| Processes an exception message by writing a crash report to this object’s CrashReportDatabase.
| CrashReportExceptionHandler (CrashReportDatabase *database, CrashReportUploadThread *upload_thread, const std::map< std::string, std::string > *process_annotations)
| Creates a new object that will store crash reports in database. More...
void | ExceptionHandlerServerStarted () override
| Processes an exception message by writing a crash report to this object's CrashReportDatabase.
unsigned int | ExceptionHandlerServerException (HANDLE process, WinVMAddress exception_information_address, WinVMAddress debug_critical_section_address) override
| Called when the client has signalled that it has encountered an exception and so wants a crash dump to be taken. More...

## Detailed Description

An exception handler that writes crash reports for exception messages to a CrashReportDatabase.

## Constructor & Destructor Documentation

## ◆ CrashReportExceptionHandler() [1/2]

crashpad::CrashReportExceptionHandler::CrashReportExceptionHandler | ( | CrashReportDatabase * | database,
|  | CrashReportUploadThread * | upload_thread,
|  | const std::map< std::string, std::string > * | process_annotations
| ) |  |

Creates a new object that will store crash reports in database.

Parameters

  [in] | database | The database to store crash reports in. Weak.
  [in] | upload_thread | The upload thread to notify when a new crash report is written into database.
  [in] | process_annotations | A map of annotations to insert as process-level annotations into each crash report that is written. Do not confuse this with module-level annotations, which are under the control of the crashing process, and are used to implement Chrome’s “crash keys.” Process-level annotations are those that are beyond the control of the crashing process, which must reliably be set even if the process crashes before it’s able to establish its own annotations. To interoperate with Breakpad servers, the recommended practice is to specify values for the `"prod"` and `"ver"` keys as process annotations.

## ◆ CrashReportExceptionHandler() [2/2]

crashpad::CrashReportExceptionHandler::CrashReportExceptionHandler | ( | CrashReportDatabase * | database,
|  | CrashReportUploadThread * | upload_thread,
|  | const std::map< std::string, std::string > * | process_annotations
| ) |  |

Creates a new object that will store crash reports in database.

Parameters

  [in] | database | The database to store crash reports in. Weak.
  [in] | upload_thread | The upload thread to notify when a new crash report is written into database.
  [in] | process_annotations | A map of annotations to insert as process-level annotations into each crash report that is written. Do not confuse this with module-level annotations, which are under the control of the crashing process, and are used to implement Chrome's "crash keys." Process-level annotations are those that are beyond the control of the crashing process, which must reliably be set even if the process crashes before it's able to establish its own annotations. To interoperate with Breakpad servers, the recommended practice is to specify values for the `"prod"` and `"ver"` keys as process annotations.

## Member Function Documentation

## ◆ ExceptionHandlerServerException()

unsigned int crashpad::CrashReportExceptionHandler::ExceptionHandlerServerException | ( | HANDLE | process,
|  | WinVMAddress | exception_information_address,
|  | WinVMAddress | debug_critical_section_address
| ) |  |
| override virtual

Called when the client has signalled that it has encountered an exception and so wants a crash dump to be taken.

Parameters

  [in] | process | A handle to the client process. Ownership of the lifetime of this handle is not passed to the delegate.
  [in] | exception_information_address | The address in the client's address space of an ExceptionInformation structure.
  [in] | debug_critical_section_address | The address in the client's address space of a `CRITICAL_SECTION` allocated with a valid `.DebugInfo` field, or `0` if unavailable.

Returns
  The exit code that should be used when terminating the client process.

Implements crashpad::ExceptionHandlerServer::Delegate.

The documentation for this class was generated from the following files:

- handler/mac/crash_report_exception_handler.h
- handler/mac/crash_report_exception_handler.cc