Crashpad
|
An abstract interface to a snapshot representing the state of a process. More...
#include "snapshot/process_snapshot.h"
Public Member Functions | |
virtual crashpad::ProcessID | ProcessID () const =0 |
Returns the snapshot process’ process ID. | |
virtual crashpad::ProcessID | ParentProcessID () const =0 |
Returns the snapshot process’ parent process’ process ID. | |
virtual void | SnapshotTime (timeval *snapshot_time) const =0 |
Returns the time that the snapshot was taken in snapshot_time. More... | |
virtual void | ProcessStartTime (timeval *start_time) const =0 |
Returns the time that the snapshot process was started in start_time. More... | |
virtual void | ProcessCPUTimes (timeval *user_time, timeval *system_time) const =0 |
Returns the snapshot process’ CPU usage times in user_time and system_time. More... | |
virtual void | ReportID (UUID *client_id) const =0 |
Returns a UUID identifying the event that the snapshot describes. More... | |
virtual void | ClientID (UUID *client_id) const =0 |
Returns a UUID identifying the client that the snapshot represents. More... | |
virtual const std::map< std::string, std::string > & | AnnotationsSimpleMap () const =0 |
Returns key-value string annotations recorded for the process, system, or snapshot producer. More... | |
virtual const SystemSnapshot * | System () const =0 |
Returns a SystemSnapshot reflecting the characteristics of the system that ran the snapshot process at the time of the snapshot. More... | |
virtual std::vector< const ModuleSnapshot * > | Modules () const =0 |
Returns ModuleSnapshot objects reflecting the code modules (binary images) loaded into the snapshot process at the time of the snapshot. More... | |
virtual std::vector< UnloadedModuleSnapshot > | UnloadedModules () const =0 |
Returns UnloadedModuleSnapshot objects reflecting the code modules the were recorded as unloaded at the time of the snapshot. More... | |
virtual std::vector< const ThreadSnapshot * > | Threads () const =0 |
Returns ThreadSnapshot objects reflecting the threads (lightweight processes) existing in the snapshot process at the time of the snapshot. More... | |
virtual const ExceptionSnapshot * | Exception () const =0 |
Returns an ExceptionSnapshot reflecting the exception that the snapshot process sustained to trigger the snapshot being taken. More... | |
virtual std::vector< const MemoryMapRegionSnapshot * > | MemoryMap () const =0 |
Returns MemoryMapRegionSnapshot objects reflecting the regions of the memory map in the snapshot process at the time of the snapshot. More... | |
virtual std::vector< HandleSnapshot > | Handles () const =0 |
Returns HandleSnapshot objects reflecting the open handles in the snapshot process at the time of the snapshot. More... | |
virtual std::vector< const MemorySnapshot * > | ExtraMemory () const =0 |
Returns a vector of additional memory blocks that should be included in a minidump. More... | |
virtual const ProcessMemory * | Memory () const =0 |
Returns a ProcessMemory object that allows accessing the process' memory directly. More... | |
An abstract interface to a snapshot representing the state of a process.
This is the top-level object in a family of Snapshot objects, because it gives access to a SystemSnapshot, vectors of ModuleSnapshot and ThreadSnapshot objects, and possibly an ExceptionSnapshot. In turn, ThreadSnapshot and ExceptionSnapshot objects both give access to CPUContext objects, and ThreadSnapshot objects also give access to MemorySnapshot objects corresponding to thread stacks.
|
pure virtual |
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().
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
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.
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
Returns an ExceptionSnapshot reflecting the exception that the snapshot process sustained to trigger the snapshot being taken.
nullptr
. Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
Returns a vector of additional memory blocks that should be included in a minidump.
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
Returns HandleSnapshot objects reflecting the open handles in the snapshot process at the time of the snapshot.
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
Returns a ProcessMemory object that allows accessing the process' memory directly.
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
Returns MemoryMapRegionSnapshot objects reflecting the regions of the memory map in the snapshot process at the time of the snapshot.
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
Returns ModuleSnapshot objects reflecting the code modules (binary images) loaded into the snapshot process at the time of the snapshot.
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
Returns the snapshot process’ CPU usage times in user_time and system_time.
[out] | user_time | The time that the process has spent executing in user mode. |
[out] | system_time | The time that the process has spent executing in system (kernel) mode. |
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
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.
[out] | start_time | The time that the process was started. |
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
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.
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
Returns the time that the snapshot was taken in snapshot_time.
[out] | snapshot_time | The 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. |
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
Returns a SystemSnapshot reflecting the characteristics of the system that ran the snapshot process at the time of the snapshot.
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
Returns ThreadSnapshot objects reflecting the threads (lightweight processes) existing in the snapshot process at the time of the snapshot.
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.
|
pure virtual |
Returns UnloadedModuleSnapshot objects reflecting the code modules the were recorded as unloaded at the time of the snapshot.
Implemented in crashpad::test::TestProcessSnapshot, crashpad::ProcessSnapshotMac, crashpad::ProcessSnapshotWin, crashpad::ProcessSnapshotLinux, crashpad::ProcessSnapshotFuchsia, crashpad::ProcessSnapshotIOS, crashpad::ProcessSnapshotSanitized, and crashpad::ProcessSnapshotMinidump.