19 #ifndef PSYSTEM_THREAD_INFO_HPP
20 #define PSYSTEM_THREAD_INFO_HPP
33 class dbghelp_symbol_engine;
221 HANDLE process_handle,
222 HANDLE thread_handle,
259 #endif // PSYSTEM_THREAD_INFO_HPP
stack_trace const & get_stack_trace(process_info const &proc, address_to_symbol_func address_to_symbol, get_module_base_func get_module_base) const
Retrieve a list of the stack frames that are active in the current thread.
Definition: thread_info.cpp:133
Defines the psystem::not_assignable interface.
Definition: shared_handle.hpp:782
std::vector< stack_frame > stack_trace
The container for the entire stack trace.
Definition: thread_info.hpp:85
std::once_flag m_stack_trace_lock
Mutex for lazy generation of thread_info::m_stack_trace.
Definition: thread_info.hpp:254
A container for a single thread of execution in a process.
Definition: thread_info.hpp:51
thread_id_t get_thread_id() const noexcept
Access the ID of this thread.
Definition: thread_info.cpp:117
process_id_t get_process_id() const noexcept
Access the ID of the process that owns this thread.
Definition: thread_info.cpp:111
Removes the ability to use an assignment operation on derived classes.
Definition: not_assignable.hpp:42
thread_info(process_id_t pid, thread_id_t tid, CREATE_PROCESS_DEBUG_INFO const &info) noexcept
Construct an instance of thread_info based on a process.
Definition: thread_info.cpp:86
void *(__stdcall * address_to_symbol_func)(HANDLE, DWORD64)
Function pointer to a function that maps addresses to symbol information.
Definition: thread_info.hpp:66
DWORD process_id_t
Data-type that stores a process ID (PID).
Definition: platform.hpp:241
A container object for a process's information.
Definition: process_info.hpp:50
static void generate_stack_trace(HANDLE process_handle, HANDLE thread_handle, address_to_symbol_func address_to_symbol, get_module_base_func get_module_base, std::unique_ptr< stack_trace > *out)
Generate a stack trace for this thread.
Definition: thread_info.cpp:164
DWORD64(__stdcall * get_module_base_func)(HANDLE, DWORD64)
Function pointer to a function that determines the module base address from any input address...
Definition: thread_info.hpp:76
The basic header file for the PSystem namespce.
Declare a container for a single frame in a stack trace.
Contains the process examination "system" and basic frameworks.
Definition: pstack_event_handler.hpp:28
HANDLE get_thread_handle() const noexcept
Retrieve the system handle to this thread.
Definition: thread_info.cpp:123
HANDLE m_thread_handle
The system debug API handle to this thread.
Definition: thread_info.hpp:232
process_id_t const m_process_id
The unique ID of the process that owns this thread.
Definition: thread_info.hpp:238
std::unique_ptr< stack_trace > m_stack_trace
A list of the stack frames executing in this thread.
Definition: thread_info.hpp:245
Information logging as well as error.
Wraps the C++ standard header, memory, to provide a uniform interface.
DWORD thread_id_t
Data-type that stores a thread ID (TID).
Definition: platform.hpp:247
thread_id_t const m_thread_id
An unique ID for a thread of execution in a process.
Definition: thread_info.hpp:235