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

A ThreadSnapshot of a thread in a running (or crashed) process on a Windows system. More...

#include "snapshot/win/thread_snapshot_win.h"

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

Public Member Functions

 ThreadSnapshotWin (const ThreadSnapshotWin &)=delete
 
ThreadSnapshotWinoperator= (const ThreadSnapshotWin &)=delete
 
bool Initialize (ProcessReaderWin *process_reader, const ProcessReaderWin::Thread &process_reader_thread, uint32_t *gather_indirectly_referenced_memory_bytes_remaining)
 Initializes the object.
 
const CPUContextContext () const override
 Returns a CPUContext object corresponding to the thread’s CPU context.
 
const MemorySnapshotStack () const override
 Returns a MemorySnapshot object corresponding to the memory region that contains the thread’s stack, or nullptr if no stack region is available.
 
uint64_t ThreadID () const override
 Returns the thread’s identifier.
 
std::string ThreadName () const override
 Returns the thread's name.
 
int SuspendCount () const override
 Returns the thread’s suspend count.
 
int Priority () const override
 Returns the thread’s priority.
 
uint64_t ThreadSpecificDataAddress () const override
 Returns the base address of a region used to store thread-specific data.
 
std::vector< const MemorySnapshot * > ExtraMemory () const override
 Returns a vector of additional memory blocks that should be included in a minidump.
 

Detailed Description

A ThreadSnapshot of a thread in a running (or crashed) process on a Windows system.

Member Function Documentation

◆ Context()

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

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.

Implements crashpad::ThreadSnapshot.

◆ ExtraMemory()

std::vector< const MemorySnapshot * > crashpad::internal::ThreadSnapshotWin::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::ThreadSnapshot.

◆ Initialize()

bool crashpad::internal::ThreadSnapshotWin::Initialize ( ProcessReaderWin * process_reader,
const ProcessReaderWin::Thread & process_reader_thread,
uint32_t * gather_indirectly_referenced_memory_bytes_remaining )

Initializes the object.

Parameters
[in]process_readerA ProcessReaderWin for the process containing the thread.
[in]process_reader_threadThe thread within the ProcessReaderWin for which the snapshot should be created.
[in,out]gather_indirectly_referenced_memory_bytes_remainingIf non-null, add extra memory regions to the snapshot pointed to by the thread's stack. The size of the regions added is subtracted from the count, and when it's 0, no more regions will be added.
Returns
true if the snapshot could be created, false otherwise with an appropriate message logged.

◆ Priority()

int crashpad::internal::ThreadSnapshotWin::Priority ( ) const
overridevirtual

Returns the thread’s priority.

Threads with higher priorities will have higher priority values.

Implements crashpad::ThreadSnapshot.

◆ Stack()

const MemorySnapshot * crashpad::internal::ThreadSnapshotWin::Stack ( ) const
overridevirtual

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.

Implements crashpad::ThreadSnapshot.

◆ SuspendCount()

int crashpad::internal::ThreadSnapshotWin::SuspendCount ( ) const
overridevirtual

Returns the thread’s suspend count.

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

Implements crashpad::ThreadSnapshot.

◆ ThreadID()

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

Returns the thread’s identifier.

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

Implements crashpad::ThreadSnapshot.

◆ ThreadName()

std::string crashpad::internal::ThreadSnapshotWin::ThreadName ( ) const
overridevirtual

Returns the thread's name.

Implements crashpad::ThreadSnapshot.

◆ ThreadSpecificDataAddress()

uint64_t crashpad::internal::ThreadSnapshotWin::ThreadSpecificDataAddress ( ) const
overridevirtual

Returns the base address of a region used to store thread-specific data.

Implements crashpad::ThreadSnapshot.


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