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

A ProcessSnapshot of a running (or crashed) process running on a iphoneOS system. More...

#include "snapshot/ios/process_snapshot_ios_intermediate_dump.h"

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

Public Member Functions

 ProcessSnapshotIOSIntermediateDump (const ProcessSnapshotIOSIntermediateDump &)=delete
 
ProcessSnapshotIOSIntermediateDumpoperator= (const ProcessSnapshotIOSIntermediateDump &)=delete
 
bool InitializeWithFilePath (const base::FilePath &dump_path, const std::map< std::string, std::string > &annotations)
 Initializes the object.
 
bool InitializeWithFileInterface (const IOSIntermediateDumpInterface &dump_interface, const std::map< std::string, std::string > &annotations)
 Initializes the object.
 
void SetClientID (const UUID &client_id)
 
void SetReportID (const UUID &report_id)
 Sets the value to be returned by ReportID().
 
pid_t ProcessID () const override
 Returns the snapshot process’ process ID.
 
pid_t ParentProcessID () const override
 Returns the snapshot process’ parent process’ process ID.
 
void SnapshotTime (timeval *snapshot_time) const override
 Returns the time that the snapshot was taken in snapshot_time.
 
void ProcessStartTime (timeval *start_time) const override
 Returns the time that the snapshot process was started in start_time.
 
void ProcessCPUTimes (timeval *user_time, timeval *system_time) const override
 Returns the snapshot process’ CPU usage times in user_time and system_time.
 
void ReportID (UUID *report_id) const override
 Returns a UUID identifying the event that the snapshot describes.
 
void ClientID (UUID *client_id) const override
 Returns a UUID identifying the client that the snapshot represents.
 
const std::map< std::string, std::string > & AnnotationsSimpleMap () const override
 Returns key-value string annotations recorded for the process, system, or snapshot producer.
 
const SystemSnapshotSystem () const override
 Returns a SystemSnapshot reflecting the characteristics of the system that ran the snapshot process at the time of the snapshot.
 
std::vector< const ThreadSnapshot * > Threads () const override
 Returns ThreadSnapshot objects reflecting the threads (lightweight processes) existing in the snapshot process at the time of the snapshot.
 
std::vector< const ModuleSnapshot * > Modules () const override
 Returns ModuleSnapshot objects reflecting the code modules (binary images) loaded into the snapshot process at the time of the snapshot.
 
std::vector< UnloadedModuleSnapshotUnloadedModules () const override
 Returns UnloadedModuleSnapshot objects reflecting the code modules the were recorded as unloaded at the time of the snapshot.
 
const ExceptionSnapshotException () const override
 Returns an ExceptionSnapshot reflecting the exception that the snapshot process sustained to trigger the snapshot being taken.
 
std::vector< const MemoryMapRegionSnapshot * > MemoryMap () const override
 Returns MemoryMapRegionSnapshot objects reflecting the regions of the memory map in the snapshot process at the time of the snapshot.
 
std::vector< HandleSnapshotHandles () const override
 Returns HandleSnapshot objects reflecting the open handles in the snapshot process at the time of the snapshot.
 
std::vector< const MemorySnapshot * > ExtraMemory () const override
 Returns a vector of additional memory blocks that should be included in a minidump.
 
const ProcessMemoryMemory () const override
 Returns a ProcessMemory object that allows accessing the process' memory directly.
 

Detailed Description

A ProcessSnapshot of a running (or crashed) process running on a iphoneOS system.

Member Function Documentation

◆ AnnotationsSimpleMap()

const std::map< std::string, std::string > & crashpad::internal::ProcessSnapshotIOSIntermediateDump::AnnotationsSimpleMap ( ) const
overridevirtual

Returns key-value string annotations recorded for the process, system, or snapshot producer.

This method retrieves annotations recorded for a process. These annotations are intended for diagnostic use, including crash analysis. “Simple annotations” are structured as a sequence of key-value pairs, where all keys and values are strings. These are referred to in Chrome as “crash keys.”

Annotations stored here may reflect the process, system, or snapshot producer. Most annotations not under the client’s direct control will be retrievable by this method. For clients such as Chrome, this includes the product name and version.

Additional per-module annotations may be obtained by calling ModuleSnapshot::AnnotationsSimpleMap().

Implements crashpad::ProcessSnapshot.

◆ ClientID()

void crashpad::internal::ProcessSnapshotIOSIntermediateDump::ClientID ( UUID * client_id) const
overridevirtual

Returns a UUID identifying the client that the snapshot represents.

Client identification is within the scope of the application, but it is expected that the identifier will be unique for an instance of Crashpad monitoring an application or set of applications for a user. The identifier shall remain stable over time.

If no identifier is available, this field will contain zeroes.

Implements crashpad::ProcessSnapshot.

◆ Exception()

const ExceptionSnapshot * crashpad::internal::ProcessSnapshotIOSIntermediateDump::Exception ( ) const
overridevirtual

Returns an ExceptionSnapshot reflecting the exception that the snapshot process sustained to trigger the snapshot being taken.

Returns
An ExceptionSnapshot object. The caller does not take ownership of this object, it is scoped to the lifetime of the ProcessSnapshot object that it was obtained from. If the snapshot is not a result of an exception, returns nullptr.

Implements crashpad::ProcessSnapshot.

◆ ExtraMemory()

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

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

Returns
An 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 ProcessSnapshot object that they were obtained from.

Implements crashpad::ProcessSnapshot.

◆ Handles()

std::vector< HandleSnapshot > crashpad::internal::ProcessSnapshotIOSIntermediateDump::Handles ( ) const
overridevirtual

Returns HandleSnapshot objects reflecting the open handles in the snapshot process at the time of the snapshot.

Returns
A vector of HandleSnapshot objects.

Implements crashpad::ProcessSnapshot.

◆ InitializeWithFileInterface()

bool crashpad::internal::ProcessSnapshotIOSIntermediateDump::InitializeWithFileInterface ( const IOSIntermediateDumpInterface & dump_interface,
const std::map< std::string, std::string > & annotations )

Initializes the object.

Parameters
[in]dump_interfaceAn interface corresponding to an intermediate dump file.
[in]annotationsProcess annotations to set in each crash report.
Returns
true if the snapshot could be created, false otherwise with an appropriate message logged.

◆ InitializeWithFilePath()

bool crashpad::internal::ProcessSnapshotIOSIntermediateDump::InitializeWithFilePath ( const base::FilePath & dump_path,
const std::map< std::string, std::string > & annotations )

Initializes the object.

Parameters
[in]dump_pathThe intermediate dump to read.
[in]annotationsProcess annotations to set in each crash report.
Returns
true if the snapshot could be created, false otherwise with an appropriate message logged.

◆ Memory()

const ProcessMemory * crashpad::internal::ProcessSnapshotIOSIntermediateDump::Memory ( ) const
overridevirtual

Returns a ProcessMemory object that allows accessing the process' memory directly.

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

Implements crashpad::ProcessSnapshot.

◆ MemoryMap()

std::vector< const MemoryMapRegionSnapshot * > crashpad::internal::ProcessSnapshotIOSIntermediateDump::MemoryMap ( ) const
overridevirtual

Returns MemoryMapRegionSnapshot objects reflecting the regions of the memory map in the snapshot process at the time of the snapshot.

Returns
A vector of MemoryMapRegionSnapshot objects. The caller does not take ownership of these objects, they are scoped to the lifetime of the ProcessSnapshot object that they were obtained from.

Implements crashpad::ProcessSnapshot.

◆ Modules()

std::vector< const ModuleSnapshot * > crashpad::internal::ProcessSnapshotIOSIntermediateDump::Modules ( ) const
overridevirtual

Returns ModuleSnapshot objects reflecting the code modules (binary images) loaded into the snapshot process at the time of the snapshot.

Returns
A vector of ModuleSnapshot objects. The caller does not take ownership of these objects, they are scoped to the lifetime of the ProcessSnapshot object that they were obtained from.

Implements crashpad::ProcessSnapshot.

◆ ParentProcessID()

pid_t crashpad::internal::ProcessSnapshotIOSIntermediateDump::ParentProcessID ( ) const
overridevirtual

Returns the snapshot process’ parent process’ process ID.

Implements crashpad::ProcessSnapshot.

◆ ProcessCPUTimes()

void crashpad::internal::ProcessSnapshotIOSIntermediateDump::ProcessCPUTimes ( timeval * user_time,
timeval * system_time ) const
overridevirtual

Returns the snapshot process’ CPU usage times in user_time and system_time.

Parameters
[out]user_timeThe time that the process has spent executing in user mode.
[out]system_timeThe time that the process has spent executing in system (kernel) mode.

Implements crashpad::ProcessSnapshot.

◆ ProcessID()

pid_t crashpad::internal::ProcessSnapshotIOSIntermediateDump::ProcessID ( ) const
overridevirtual

Returns the snapshot process’ process ID.

Implements crashpad::ProcessSnapshot.

◆ ProcessStartTime()

void crashpad::internal::ProcessSnapshotIOSIntermediateDump::ProcessStartTime ( timeval * start_time) const
overridevirtual

Returns the time that the snapshot process was started in start_time.

Normally, process uptime in wall clock time can be computed as SnapshotTime()ProcessStartTime(), but this cannot be guaranteed in cases where the real-time clock has been set during the snapshot process’ lifetime.

Parameters
[out]start_timeThe time that the process was started.

Implements crashpad::ProcessSnapshot.

◆ ReportID()

void crashpad::internal::ProcessSnapshotIOSIntermediateDump::ReportID ( UUID * client_id) const
overridevirtual

Returns a UUID identifying the event that the snapshot describes.

This provides a stable identifier for a crash even as the report is converted to different formats, provided that all formats support storing a crash report ID. When a report is originally created, a report ID should be assigned. From that point on, any operations involving the same report should preserve the same report ID.

If no identifier is available, this field will contain zeroes.

Implements crashpad::ProcessSnapshot.

◆ SetClientID()

void crashpad::internal::ProcessSnapshotIOSIntermediateDump::SetClientID ( const UUID & client_id)

On iOS, the client ID is under the control of the snapshot producer, which may call this method to set the client ID. If this is not done, ClientID() will return an identifier consisting entirely of zeroes.

◆ SetReportID()

void crashpad::internal::ProcessSnapshotIOSIntermediateDump::SetReportID ( const UUID & report_id)

Sets the value to be returned by ReportID().

On iOS, the crash report ID is under the control of the snapshot producer, which may call this method to set the report ID. If this is not done, ReportID() will return an identifier consisting entirely of zeroes.

◆ SnapshotTime()

void crashpad::internal::ProcessSnapshotIOSIntermediateDump::SnapshotTime ( timeval * snapshot_time) const
overridevirtual

Returns the time that the snapshot was taken in snapshot_time.

Parameters
[out]snapshot_timeThe time that the snapshot was taken. This is distinct from the time that a ProcessSnapshot object was created or initialized, although it may be that time for ProcessSnapshot objects representing live or recently-crashed process state.

Implements crashpad::ProcessSnapshot.

◆ System()

const SystemSnapshot * crashpad::internal::ProcessSnapshotIOSIntermediateDump::System ( ) const
overridevirtual

Returns a SystemSnapshot reflecting the characteristics of the system that ran the snapshot process at the time of the snapshot.

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

Implements crashpad::ProcessSnapshot.

◆ Threads()

std::vector< const ThreadSnapshot * > crashpad::internal::ProcessSnapshotIOSIntermediateDump::Threads ( ) const
overridevirtual

Returns ThreadSnapshot objects reflecting the threads (lightweight processes) existing in the snapshot process at the time of the snapshot.

Returns
A vector of ThreadSnapshot objects. The caller does not take ownership of these objects, they are scoped to the lifetime of the ProcessSnapshot object that they were obtained from.

Implements crashpad::ProcessSnapshot.

◆ UnloadedModules()

std::vector< UnloadedModuleSnapshot > crashpad::internal::ProcessSnapshotIOSIntermediateDump::UnloadedModules ( ) const
overridevirtual

Returns UnloadedModuleSnapshot objects reflecting the code modules the were recorded as unloaded at the time of the snapshot.

Returns
A vector of UnloadedModuleSnapshot objects.

Implements crashpad::ProcessSnapshot.


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