PStack
2.0
Stack trace printer for MSVC and GCC binaries
|
A container object for a process's information. More...
#include <process_info.hpp>
Type Definitions | |
using | thread_info_map = std::map< thread_id_t, std::unique_ptr< thread_info > > |
Mapping of thread IDs (TIDs) to the psystem::thread_info instance. More... | |
Construction / Destruction | |
process_info (process_id_t pid, CREATE_PROCESS_DEBUG_INFO const &info) noexcept | |
Construct a process_info instance. More... | |
~process_info () noexcept | |
Free resources from the process_info instance. | |
Public Accessors | |
HANDLE | get_process_handle () const noexcept |
Access the handle to the process for system debugging API. More... | |
process_id_t | get_process_id () const noexcept |
The system process ID (PID) relating to this instance. More... | |
Public Interface | |
bool | add_thread (std::unique_ptr< thread_info > thread) noexcept |
Allow a psystem::thread_info instance to be managed by this process_info instance. More... | |
void | remove_thread (thread_id_t tid) noexcept |
Remove a thread from being managed by this process_info instance. More... | |
Member Data | |
std::map< psystem::address_t, psystem::module_info, std::greater< psystem::address_t > > | m_modules |
A map of base address for a module to the module info object itself. More... | |
thread_info_map | m_threads |
A mapping of thread ID to the psystem::thread_info instance. More... | |
process_id_t const | m_process_id |
The system ID the corresponds to the process encapsulated here. | |
HANDLE | m_process_handle |
A system handle for debug API to access this process. | |
Additional Inherited Members | |
Private Member Functions inherited from psystem::not_assignable | |
not_assignable & | operator= (not_assignable const &) const =delete |
Delete the basic assignment operator. | |
constexpr | not_assignable () noexcept |
A simple CTOR suitable for noexcept and constexpr uses. | |
~not_assignable () noexcept | |
A simple CTOR suitable for noexcept uses. | |
A container object for a process's information.
This object encapsulates information about a process, as well as being the top level item in the heirarchy of debugging information objects. Traverse the list of threads from here (get the stack traces from there) and so on.
using psystem::process_info::thread_info_map = std::map<thread_id_t, std::unique_ptr<thread_info> > |
Mapping of thread IDs (TIDs) to the psystem::thread_info instance.
|
noexcept |
Construct a process_info instance.
[in] | pid | The system process ID (PID) of the process being examined. |
[in] | info | Process-specific data to assimilate into this instance. |
|
noexcept |
Allow a psystem::thread_info instance to be managed by this process_info instance.
[in] | thread | The thread parameter is a std::unique_ptr value to "sink" ownership (i.e., transfer) from the caller to this instance. The parameter must not contain nullptr . |
true
if the thread was successfully added; false
otherwise.
|
noexcept |
Access the handle to the process for system debugging API.
|
noexcept |
The system process ID (PID) relating to this instance.
|
noexcept |
Remove a thread from being managed by this process_info instance.
If the thread ID is not present in the current set of managed threads, this method does nothing.
[in] | tid | The thread's ID will be used to find and remove the psystem::thread_info instance. |
std::map< psystem::address_t, psystem::module_info, std::greater<psystem::address_t> > psystem::process_info::m_modules |
A map of base address for a module to the module info object itself.
This is sorted by address in order from largest to smallest to facilitate quick lookup of a symbol address to the module that owns it. An address is believed to exist within a module if the module's address is the largest address that is less than the symbol address.
thread_info_map psystem::process_info::m_threads |
A mapping of thread ID to the psystem::thread_info instance.