PStack  2.0
Stack trace printer for MSVC and GCC binaries
debug_event_dumper.hpp
Go to the documentation of this file.
1 // ===-- include/pstack/debug_event_dumper.hpp ------------ -*- C++ -*- --=== //
2 // Copyright (c) 2014 Matt Bisson. All rights reserved.
3 
18 #pragma once
19 #ifndef PSTACK_DEBUG_EVENT_DUMPER_HPP
20 #define PSTACK_DEBUG_EVENT_DUMPER_HPP
21 
22 #include "pstack_ns.hpp"
24 
25 namespace pstack {
26 
43 {
47 public:
48  virtual bool create_process_event(
50  psystem::shared_handle<> const& file_handle,
51  CREATE_PROCESS_DEBUG_INFO const& info) noexcept override;
52  virtual bool create_thread_event(
54  CREATE_THREAD_DEBUG_INFO const& info) noexcept override;
55  virtual bool exception_event(
57  EXCEPTION_DEBUG_INFO const& info) noexcept override;
58  virtual bool exit_process_event(
60  EXIT_PROCESS_DEBUG_INFO const& info) noexcept override;
61  virtual bool exit_thread_event(
63  EXIT_THREAD_DEBUG_INFO const& info) noexcept override;
64  virtual bool load_dll_event(
66  psystem::shared_handle<> const& file_handle,
67  LOAD_DLL_DEBUG_INFO const& info) noexcept override;
68  virtual bool output_debug_string_event(
70  OUTPUT_DEBUG_STRING_INFO const& info) noexcept override;
71  virtual bool rip_event(
73  RIP_INFO const& info) noexcept override;
74  virtual bool unload_dll_event(
76  UNLOAD_DLL_DEBUG_INFO const& info) noexcept override;
77 };
78 
79 } // namespace pstack
80 
81 #endif // PSTACK_DEBUG_EVENT_DUMPER_HPP
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...
Definition: debug_event_dumper.cpp:264
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. ...
Definition: debug_event_dumper.cpp:281
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.
Definition: debug_event_dumper.cpp:249
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.
Definition: debug_event_dumper.cpp:189
#define noexcept
Replace keyword with something useful.
Definition: platform.hpp:71
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.
Definition: debug_event_dumper.cpp:364
Contains modules that make up the PStack stack-printing application.
Definition: debug_event_dumper.hpp:25
DWORD process_id_t
Data-type that stores a process ID (PID).
Definition: platform.hpp:241
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. ...
Definition: debug_event_dumper.cpp:307
Declares the proclib::base_debug_event_listener interface.
As this class encounters events, it prints details to stdout.
Definition: debug_event_dumper.hpp:41
A polymorphic interface for detecting events received by the debugger.
Definition: base_debug_event_listener.hpp:44
Share management of a single "handle" between multiple owners.
Definition: shared_handle.hpp:98
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.
Definition: debug_event_dumper.cpp:294
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.
Definition: debug_event_dumper.cpp:400
The basic header file for the PStack namespace.
DWORD thread_id_t
Data-type that stores a thread ID (TID).
Definition: platform.hpp:247
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.
Definition: debug_event_dumper.cpp:378