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

An ExceptionSnapshot of an exception sustained by a running (or crashed) process on an iOS system. More...

#include "snapshot/ios/exception_snapshot_ios_intermediate_dump.h"

Inheritance diagram for crashpad::internal::ExceptionSnapshotIOSIntermediateDump:
[legend]
Collaboration diagram for crashpad::internal::ExceptionSnapshotIOSIntermediateDump:
[legend]

Public Member Functions

 ExceptionSnapshotIOSIntermediateDump (const ExceptionSnapshotIOSIntermediateDump &)=delete
 
ExceptionSnapshotIOSIntermediateDumpoperator= (const ExceptionSnapshotIOSIntermediateDump &)=delete
 
bool InitializeFromSignal (const IOSIntermediateDumpMap *exception_data)
 Initialize the snapshot as a signal exception.
 
bool InitializeFromMachException (const IOSIntermediateDumpMap *exception_data, const IOSIntermediateDumpList *thread_list)
 Initialize the object as a Mach exception from an intermediate dump.
 
bool InitializeFromNSException (const IOSIntermediateDumpMap *exception_data, const IOSIntermediateDumpList *thread_list)
 Initialize the object as an NSException from an intermediate dump.
 
const CPUContextContext () const override
 Returns a CPUContext object corresponding to the exception thread’s CPU context at the time of the exception.
 
uint64_t ThreadID () const override
 Returns the thread identifier of the thread that triggered the exception.
 
uint32_t Exception () const override
 Returns the top-level exception code identifying the exception.
 
uint32_t ExceptionInfo () const override
 Returns the second-level exception code identifying the exception.
 
uint64_t ExceptionAddress () const override
 Returns the address that triggered the exception.
 
const std::vector< uint64_t > & Codes () const override
 Returns a series of operating system-specific exception codes.
 
virtual std::vector< const MemorySnapshot * > ExtraMemory () const override
 Returns a vector of additional memory blocks that should be included in a minidump.
 

Detailed Description

An ExceptionSnapshot of an exception sustained by a running (or crashed) process on an iOS system.

Member Function Documentation

◆ Codes()

const std::vector< uint64_t > & crashpad::internal::ExceptionSnapshotIOSIntermediateDump::Codes ( ) const
overridevirtual

Returns a series of operating system-specific exception codes.

The precise interpretation of these codes is specific to the snapshot operating system. These codes may provide a duplicate of information available elsewhere, they may extend information available elsewhere, or they may not be present at all. In this case, an empty vector will be returned.

For macOS, this will be a vector containing the original exception type and the values of code[0] and code[1] as received by a Mach exception handler.

For Windows, these are additional arguments (if any) as provided to RaiseException(). See the documentation for ExceptionInformation in EXCEPTION_RECORD.

Implements crashpad::ExceptionSnapshot.

◆ Context()

const CPUContext * crashpad::internal::ExceptionSnapshotIOSIntermediateDump::Context ( ) const
overridevirtual

Returns a CPUContext object corresponding to the exception thread’s CPU context at the time of the exception.

The caller does not take ownership of this object, it is scoped to the lifetime of the ThreadSnapshot object that it was obtained from.

Implements crashpad::ExceptionSnapshot.

◆ Exception()

uint32_t crashpad::internal::ExceptionSnapshotIOSIntermediateDump::Exception ( ) const
overridevirtual

Returns the top-level exception code identifying the exception.

This is an operating system-specific value.

For macOS, this will be an EXC_* exception type, such as EXC_BAD_ACCESS. EXC_CRASH will not appear here for exceptions processed as EXC_CRASH when generated from another preceding exception: the original exception code will appear instead. The exception type as it was received will appear at index 0 of Codes().

For Windows, this will be an EXCEPTION_* exception type, such as EXCEPTION_ACCESS_VIOLATION.

Implements crashpad::ExceptionSnapshot.

◆ ExceptionAddress()

uint64_t crashpad::internal::ExceptionSnapshotIOSIntermediateDump::ExceptionAddress ( ) const
overridevirtual

Returns the address that triggered the exception.

This may be the address that caused a fault on data access, or it may be the instruction pointer that contained an offending instruction. For exceptions where this value cannot be determined, it will be 0.

For macOS, this will be the value of the exception code at index 1 as received by a Mach exception handler.

Implements crashpad::ExceptionSnapshot.

◆ ExceptionInfo()

uint32_t crashpad::internal::ExceptionSnapshotIOSIntermediateDump::ExceptionInfo ( ) const
overridevirtual

Returns the second-level exception code identifying the exception.

This is an operating system-specific value.

For macOS, this will be the value of the exception code at index 0 as received by a Mach exception handler, except:

  • For EXC_CRASH exceptions generated from another preceding exception, the original exception code will appear here, not the code as received by the Mach exception handler.
  • For EXC_RESOURCE and EXC_GUARD exceptions, the high 32 bits of the exception code at index 0 will appear here.

In all cases on macOS, the full exception code at index 0 as it was received will appear at index 1 of Codes().

On Windows, this will either be 0 if the exception is continuable, or EXCEPTION_NONCONTINUABLE to indicate a noncontinuable exception.

Implements crashpad::ExceptionSnapshot.

◆ ExtraMemory()

std::vector< const MemorySnapshot * > crashpad::internal::ExceptionSnapshotIOSIntermediateDump::ExtraMemory ( ) const
overridevirtual

Returns a vector of additional memory blocks that should be included in a minidump.

Returns
A vector of MemorySnapshot objects that will be included in the crash dump. The caller does not take ownership of these objects, they are scoped to the lifetime of the ThreadSnapshot object that they were obtained from.

Implements crashpad::ExceptionSnapshot.

◆ InitializeFromMachException()

bool crashpad::internal::ExceptionSnapshotIOSIntermediateDump::InitializeFromMachException ( const IOSIntermediateDumpMap * exception_data,
const IOSIntermediateDumpList * thread_list )

Initialize the object as a Mach exception from an intermediate dump.

Parameters
[in]exception_dataThe intermediate dump map used to initialize this object.
[in]thread_listThe intermediate dump map containing list of threads.
Returns
true if the snapshot could be created, false otherwise with an appropriate message logged.

◆ InitializeFromNSException()

bool crashpad::internal::ExceptionSnapshotIOSIntermediateDump::InitializeFromNSException ( const IOSIntermediateDumpMap * exception_data,
const IOSIntermediateDumpList * thread_list )

Initialize the object as an NSException from an intermediate dump.

Parameters
[in]exception_dataThe intermediate dump map used to initialize this object.
[in]thread_listThe intermediate dump map containing list of threads.
Returns
true if the snapshot could be created, false otherwise with an appropriate message logged.

◆ InitializeFromSignal()

bool crashpad::internal::ExceptionSnapshotIOSIntermediateDump::InitializeFromSignal ( const IOSIntermediateDumpMap * exception_data)

Initialize the snapshot as a signal exception.

Parameters
[in]exception_dataThe intermediate dump map used to initialize this object.
Returns
true if the snapshot could be created, false otherwise with an appropriate message logged.

◆ ThreadID()

uint64_t crashpad::internal::ExceptionSnapshotIOSIntermediateDump::ThreadID ( ) const
overridevirtual

Returns the thread identifier of the thread that triggered the exception.

This value can be compared to ThreadSnapshot::ThreadID() to associate an ExceptionSnapshot object with the ThreadSnapshot that contains a snapshot of the thread that triggered the exception.

Implements crashpad::ExceptionSnapshot.


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