Crashpad

Public Member Functions | List of all members
crashpad::ThreadSnapshot Class Referenceabstract

An abstract interface to a snapshot representing a thread (lightweight process) present in a snapshot process. More...

`#include "snapshot/thread_snapshot.h"`

Inheritance diagram for crashpad::ThreadSnapshot:

## Public Member Functions
virtual const CPUContext * | Context () const =0
| Returns a CPUContext object corresponding to the thread’s CPU context. More...
virtual const MemorySnapshot * | Stack () const =0
| Returns a MemorySnapshot object corresponding to the memory region that contains the thread’s stack, or `nullptr` if no stack region is available. More...
virtual uint64_t | ThreadID () const =0
| Returns the thread’s identifier. More...
virtual int | SuspendCount () const =0
| Returns the thread’s suspend count. More...
virtual int | Priority () const =0
| Returns the thread’s priority. More...
virtual uint64_t | ThreadSpecificDataAddress () const =0
| Returns the base address of a region used to store thread-specific data.
virtual std::vector< const MemorySnapshot * > | ExtraMemory () const =0
| Returns a vector of additional memory blocks that should be included in a minidump. More...

## Detailed Description

An abstract interface to a snapshot representing a thread (lightweight process) present in a snapshot process.

## Member Function Documentation

## ◆ Context()

virtual const CPUContext* crashpad::ThreadSnapshot::Context | ( |  | ) | const
| pure virtual

Returns a CPUContext object corresponding to the thread’s CPU context.

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

Implemented in crashpad::test::TestThreadSnapshot, crashpad::internal::ThreadSnapshotWin, and crashpad::internal::ThreadSnapshotMac.

## ◆ ExtraMemory()

virtual std::vector<const MemorySnapshot*> crashpad::ThreadSnapshot::ExtraMemory | ( |  | ) | const
| pure virtual

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.

Implemented in crashpad::test::TestThreadSnapshot, crashpad::internal::ThreadSnapshotWin, and crashpad::internal::ThreadSnapshotMac.

## ◆ Priority()

virtual int crashpad::ThreadSnapshot::Priority | ( |  | ) | const
| pure virtual

Returns the thread’s priority.

Threads with higher priorities will have higher priority values.

Implemented in crashpad::test::TestThreadSnapshot, crashpad::internal::ThreadSnapshotWin, and crashpad::internal::ThreadSnapshotMac.

## ◆ Stack()

virtual const MemorySnapshot* crashpad::ThreadSnapshot::Stack | ( |  | ) | const
| pure virtual

Returns a MemorySnapshot object corresponding to the memory region that contains the thread’s stack, or `nullptr` if no stack region is available.

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

Implemented in crashpad::test::TestThreadSnapshot, crashpad::internal::ThreadSnapshotWin, and crashpad::internal::ThreadSnapshotMac.

## ◆ SuspendCount()

virtual int crashpad::ThreadSnapshot::SuspendCount | ( |  | ) | const
| pure virtual

Returns the thread’s suspend count.

A suspend count of `0` denotes a schedulable (not suspended) thread.

Implemented in crashpad::test::TestThreadSnapshot, crashpad::internal::ThreadSnapshotWin, and crashpad::internal::ThreadSnapshotMac.

## ◆ ThreadID()

virtual uint64_t crashpad::ThreadSnapshot::ThreadID | ( |  | ) | const
| pure virtual

Returns the thread’s identifier.

Thread identifiers are at least unique within a process, and may be unique system-wide.

Implemented in crashpad::test::TestThreadSnapshot, crashpad::internal::ThreadSnapshotWin, and crashpad::internal::ThreadSnapshotMac.

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

- snapshot/thread_snapshot.h