Crashpad
 
Loading...
Searching...
No Matches
crashpad::internal::InProcessIntermediateDumpHandler Class Referencefinal

Dump all in-process data to iOS intermediate dump. Note: All methods are RUNS-DURING-CRASH. More...

#include "client/ios_handler/in_process_intermediate_dump_handler.h"

Public Member Functions

 InProcessIntermediateDumpHandler (const InProcessIntermediateDumpHandler &)=delete
 
InProcessIntermediateDumpHandleroperator= (const InProcessIntermediateDumpHandler &)=delete
 

Static Public Member Functions

static void WriteHeader (IOSIntermediateDumpWriter *writer)
 Set kVersion to 1.
 
static void WriteProcessInfo (IOSIntermediateDumpWriter *writer, const std::map< std::string, std::string > &annotations)
 Write ProcessSnapshot data to the intermediate dump.
 
static void WriteSystemInfo (IOSIntermediateDumpWriter *writer, const IOSSystemDataCollector &system_data, uint64_t report_time_nanos)
 Write SystemSnapshot data to the intermediate dump.
 
static void WriteThreadInfo (IOSIntermediateDumpWriter *writer, const uint64_t *frames, const size_t num_frames)
 Write ThreadSnapshot data to the intermediate dump.
 
static void WriteModuleInfo (IOSIntermediateDumpWriter *writer)
 Write ModuleSnapshot data to the intermediate dump.
 
static void WriteExceptionFromSignal (IOSIntermediateDumpWriter *writer, const IOSSystemDataCollector &system_data, siginfo_t *siginfo, ucontext_t *context)
 Write an ExceptionSnapshot from a signal to the intermediate dump.
 
static void WriteExceptionFromMachException (IOSIntermediateDumpWriter *writer, exception_behavior_t behavior, thread_t thread, 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)
 Write an ExceptionSnapshot from a mach exception to the intermediate dump.
 
static void WriteExceptionFromNSException (IOSIntermediateDumpWriter *writer)
 Write an ExceptionSnapshot from an NSException to the intermediate dump.
 

Detailed Description

Dump all in-process data to iOS intermediate dump. Note: All methods are RUNS-DURING-CRASH.

Member Function Documentation

◆ WriteExceptionFromMachException()

void crashpad::internal::InProcessIntermediateDumpHandler::WriteExceptionFromMachException ( IOSIntermediateDumpWriter * writer,
exception_behavior_t behavior,
thread_t thread,
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 )
static

Write an ExceptionSnapshot from a mach exception to the intermediate dump.

Only one of the WriteExceptionFromSignal, WriteExceptionFromMachException and WriteExceptionFromNSException should be called per intermediate dump.

Parameters
[in]writerThe dump writer
[in]behavior
[in]thread
[in]exception
[in]code
[in]code_count
[in]flavor
[in]old_state
[in]old_state_count

◆ WriteExceptionFromNSException()

void crashpad::internal::InProcessIntermediateDumpHandler::WriteExceptionFromNSException ( IOSIntermediateDumpWriter * writer)
static

Write an ExceptionSnapshot from an NSException to the intermediate dump.

Only one of the WriteExceptionFromSignal, WriteExceptionFromMachException and WriteExceptionFromNSException should be called per intermediate dump.

Parameters
[in]writerThe dump writer

◆ WriteExceptionFromSignal()

void crashpad::internal::InProcessIntermediateDumpHandler::WriteExceptionFromSignal ( IOSIntermediateDumpWriter * writer,
const IOSSystemDataCollector & system_data,
siginfo_t * siginfo,
ucontext_t * context )
static

Write an ExceptionSnapshot from a signal to the intermediate dump.

Only one of the WriteExceptionFromSignal, WriteExceptionFromMachException and WriteExceptionFromNSException should be called per intermediate dump.

Parameters
[in]writerThe dump writer
[in]system_dataAn object containing various system data points.
[in]siginfoA pointer to a siginfo_t object received by a signal handler.
[in]contextA pointer to a ucontext_t object received by a signal.

◆ WriteHeader()

void crashpad::internal::InProcessIntermediateDumpHandler::WriteHeader ( IOSIntermediateDumpWriter * writer)
static

Set kVersion to 1.

Parameters
[in]writerThe dump writer

◆ WriteModuleInfo()

void crashpad::internal::InProcessIntermediateDumpHandler::WriteModuleInfo ( IOSIntermediateDumpWriter * writer)
static

Write ModuleSnapshot data to the intermediate dump.

This includes both modules and annotations.

Parameters
[in]writerThe dump writer

◆ WriteProcessInfo()

void crashpad::internal::InProcessIntermediateDumpHandler::WriteProcessInfo ( IOSIntermediateDumpWriter * writer,
const std::map< std::string, std::string > & annotations )
static

Write ProcessSnapshot data to the intermediate dump.

Parameters
[in]writerThe dump writer
[in]annotationsThe simple map annotations.

◆ WriteSystemInfo()

void crashpad::internal::InProcessIntermediateDumpHandler::WriteSystemInfo ( IOSIntermediateDumpWriter * writer,
const IOSSystemDataCollector & system_data,
uint64_t report_time_nanos )
static

Write SystemSnapshot data to the intermediate dump.

Parameters
[in]writerThe dump writer
[in]system_dataAn object containing various system data points.
[in]report_time_nanosReport creation time in nanoseconds as returned by ClockMonotonicNanoseconds().

◆ WriteThreadInfo()

void crashpad::internal::InProcessIntermediateDumpHandler::WriteThreadInfo ( IOSIntermediateDumpWriter * writer,
const uint64_t * frames,
const size_t num_frames )
static

Write ThreadSnapshot data to the intermediate dump.

For uncaught NSExceptions, frames and num_frames will be added to the intermediate dump for the exception thread. Otherwise, or for the remaining threads, use thread_get_state.

Parameters
[in]writerThe dump writer
[in]framesAn array of callstack return addresses.
[in]num_framesThe number of callstack return address in frames.

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