PStack
2.0
Stack trace printer for MSVC and GCC binaries
|
As this class encounters events, it prints details to stdout
.
More...
#include <debug_event_dumper.hpp>
base_debug_event_listener Interface | |
virtual bool | create_process_event (psystem::process_id_t pid, psystem::thread_id_t tid, psystem::shared_handle<> const &file_handle, CREATE_PROCESS_DEBUG_INFO const &info) noexcept override |
Invoked when the debugger sends an event to indicate process creation. More... | |
virtual bool | create_thread_event (psystem::process_id_t pid, psystem::thread_id_t tid, CREATE_THREAD_DEBUG_INFO const &info) noexcept override |
Invoked when the debugger sends an event to indicate thread creation. More... | |
virtual bool | exception_event (psystem::process_id_t pid, psystem::thread_id_t tid, EXCEPTION_DEBUG_INFO const &info) noexcept override |
Invoked when the debugger sends an event to indicate some exception in normal process execution. More... | |
virtual bool | exit_process_event (psystem::process_id_t pid, psystem::thread_id_t tid, EXIT_PROCESS_DEBUG_INFO const &info) noexcept override |
Invoked when the debugger sends an event to indicate that the process has exited. More... | |
virtual bool | exit_thread_event (psystem::process_id_t pid, psystem::thread_id_t tid, EXIT_THREAD_DEBUG_INFO const &info) noexcept override |
Invoked when the debugger sends an event to indicate that a thread has exited. More... | |
virtual bool | load_dll_event (psystem::process_id_t pid, psystem::thread_id_t tid, psystem::shared_handle<> const &file_handle, LOAD_DLL_DEBUG_INFO const &info) noexcept override |
Invoked when the debugger sends an event to indicate that a DLL hase been loaded. More... | |
virtual bool | output_debug_string_event (psystem::process_id_t pid, psystem::thread_id_t tid, OUTPUT_DEBUG_STRING_INFO const &info) noexcept override |
Invoked when the debugger encounters a trace message from the debuggee. More... | |
virtual bool | rip_event (psystem::process_id_t pid, psystem::thread_id_t tid, RIP_INFO const &info) noexcept override |
Invoked when the debugger encounters a fatal application exit or debugger error. More... | |
virtual bool | unload_dll_event (psystem::process_id_t pid, psystem::thread_id_t tid, UNLOAD_DLL_DEBUG_INFO const &info) noexcept override |
Invoked when the debugger encounters a DLL unload. More... | |
Additional Inherited Members | |
Public Member Functions inherited from proclib::base_debug_event_listener | |
virtual | ~base_debug_event_listener () noexcept |
Clean up base_debug_event_listener resources. | |
Protected Member Functions inherited from proclib::base_debug_event_listener | |
base_debug_event_listener () noexcept | |
Construct the base_debug_event_listener instance. More... | |
As this class encounters events, it prints details to stdout
.
This class is useful for viewing the events that the debugger sees in real time. Simply create an instance of this class, and begin printing events by invoking the psystem::process_debugger::add_event_listener() method.
|
overridevirtualnoexcept |
Invoked when the debugger sends an event to indicate process creation.
This events is sent upon attachment to a running process, or when the debugger itself creates a process for debugging. This event is important also because it signifies that the executable module has been loaded, and that the main process thread has been created.
[in] | pid | The ID of the process that signaled this event. |
[in] | tid | The ID of the thread that is currently in the active state. |
[in] | file_handle | The "shared" handle to the open file that represents this process's module. The handle will be closed if no listeners copy the shared_handle . |
[in] | info | Information that pertains specifically to this event. Note that any handles in the structure may be nullptr , and that the hFile member is only valid until exit_process_event(). |
true
to indicate that it has taken action based on receiving the event, or false
to indicate that it has not. Reimplemented from proclib::base_debug_event_listener.
|
overridevirtualnoexcept |
Invoked when the debugger sends an event to indicate thread creation.
This event is sent when a new thread is created during normal execution in a process being debugged, or when the debugger attaches to a process and encounters a preexisting thread of execution.
[in] | pid | The ID of the process that signaled this event. |
[in] | tid | The ID of the thread that was created or discovered. |
[in] | info | Information that applies specifically to this event. |
true
to indicate that it has taken action based on receiving the event, or false
to indicate that it has not. Reimplemented from proclib::base_debug_event_listener.
|
overridevirtualnoexcept |
Invoked when the debugger sends an event to indicate some exception in normal process execution.
An exception may be an unhandled C++ exception, it may be a system-level exception (i.e., sigsegv
on UNIX or GPF on Windows plaforms), or it may simply indicate that the debugger has reached a breakpoint (which may be requested either by the debugger itself, or by a user-specified break).
[in] | pid | The ID of the process that signaled this event. |
[in] | tid | The ID of the thread that is currently in the active state. |
[in] | info | Information that applies specifically to this event. This will contain the exception record, which in turn contains the cause of the exception. |
true
to indicate that it has taken action based on receiving the event, or false
to indicate that it has not. Reimplemented from proclib::base_debug_event_listener.
|
overridevirtualnoexcept |
Invoked when the debugger sends an event to indicate that the process has exited.
[in] | pid | The ID of the process that signaled this event. |
[in] | tid | The ID of the thread that was in the active state on exit. |
[in] | info | Information that applies specifically to this event. |
true
to indicate that it has taken action based on receiving the event, or false
to indicate that it has not.Reimplemented from proclib::base_debug_event_listener.
|
overridevirtualnoexcept |
Invoked when the debugger sends an event to indicate that a thread has exited.
[in] | pid | The ID of the process that signaled this event. |
[in] | tid | The ID of the thread that just exited. |
[in] | info | Information that applies specifically to this event. |
true
to indicate that it has taken action based on receiving the event, or false
to indicate that it has not.Reimplemented from proclib::base_debug_event_listener.
|
overridevirtualnoexcept |
Invoked when the debugger sends an event to indicate that a DLL hase been loaded.
This callback may be triggered if a DLL has been loaded into a running process, or if the debugger discovers an already loaded DLL when attaching to a process.
[in] | pid | The ID of the process that signaled this event. |
[in] | tid | The ID of the thread that is currently in the active state. |
[in] | file_handle | The "shared" handle to the open file that represents this process's module. The handle will be closed if no listeners copy the shared_handle . |
[in] | info | Information that applies specifically to this event. Note that any handles in the structure may be nullptr , and that the hFile member is only valid until unload_dll_event(). |
true
to indicate that it has taken action based on receiving the event, or false
to indicate that it has not. Reimplemented from proclib::base_debug_event_listener.
|
overridevirtualnoexcept |
Invoked when the debugger encounters a trace message from the debuggee.
[in] | pid | The ID of the process that signaled this event. |
[in] | tid | The ID of the currently active thread. |
[in] | info | Information that applies specifically to this event. |
true
to indicate that it has taken action based on receiving the event, or false
to indicate that it has not. Reimplemented from proclib::base_debug_event_listener.
|
overridevirtualnoexcept |
Invoked when the debugger encounters a fatal application exit or debugger error.
Technically, this event indicates that the debugger passed invalid data to the application, however the application itself generally causes this. The debugger receives exception_event() on any potential crash from the debuggee, and if it forwards this exception to the debuggee, it may result in a crash that triggers this event.
[in] | pid | The ID of the process that signaled this event. |
[in] | tid | The ID of the currently active thread. |
[in] | info | Information that applies specifically to this event. |
true
to indicate that it has taken action based on receiving the event, or false
to indicate that it has not. Reimplemented from proclib::base_debug_event_listener.
|
overridevirtualnoexcept |
Invoked when the debugger encounters a DLL unload.
[in] | pid | The ID of the process that signaled this event. |
[in] | tid | The ID of the currently active thread. |
[in] | info | Information that applies specifically to this event. |
true
to indicate that it has taken action based on receiving the event, or false
to indicate that it has not.Reimplemented from proclib::base_debug_event_listener.