PStack
2.0
Stack trace printer for MSVC and GCC binaries
|
Declare an event listener to provide verbose information about events. More...
#include "pstack/debug_event_dumper.hpp"
#include <cstring>
#include <iostream>
#include <psystem/framework/iomanip.hpp>
#include <psystem/framework/memory.hpp>
Namespaces | |
anonymous_namespace{debug_event_dumper.cpp} | |
Data local to this compilation unit. | |
pstack | |
Contains modules that make up the PStack stack-printing application. | |
Variables | |
int const | anonymous_namespace{debug_event_dumper.cpp}::kMaxExceptionRecordLevels = 8 |
Do not recurse through exception records any more than this number of times. | |
Convenience Macros | |
#define | EXTENDED_PATH_PREFIX TEXT("\\\\?\\") |
The marker string at the beginning of a file name for an "extended" path. | |
#define | EXTENDED_PATH_PREFIX_SZ (sizeof(EXTENDED_PATH_PREFIX) / sizeof(*EXTENDED_PATH_PREFIX)) |
String length (inlcuding null terminator) of EXTENDED_PATH_PREFIX. | |
#define | PRINT_EXCEPTION_CODE(code) case code: std::cout << #code; break |
Inline macro to serialize exception code values into text. More... | |
Compilation-Unit Utilities | |
static std::unique_ptr< TCHAR[]> | get_file_name_from_handle (HANDLE const h_file) noexcept |
Find the name of a file when given a handle to that memory-mapped file. More... | |
static void | print_common_data (psystem::process_id_t const pid, psystem::thread_id_t const tid) |
Print the data that exists for every debugger event. More... | |
static void | print_exception_record (EXCEPTION_RECORD const &ex_rec, int const count=0) noexcept |
Print an EXCEPTION_RECORD structure. More... | |
Declare an event listener to provide verbose information about events.
#define PRINT_EXCEPTION_CODE | ( | code | ) | case code: std::cout << #code; break |
Inline macro to serialize exception code values into text.
code | The exception code constant. |
|
staticnoexcept |
Find the name of a file when given a handle to that memory-mapped file.
[in] | h_file | The handle to the memory-mapped file to gather a name for. |
module_info.cpp
version?
|
static |
Print the data that exists for every debugger event.
[in] | pid | The process ID of the process that generated the event. |
[in] | tid | The thread ID for the active thread in the event. |
|
staticnoexcept |
Print an EXCEPTION_RECORD
structure.
EXCEPTION_RECORD
is a recursively defined structure, so this method will recurse through the structure kMaxExceptionRecordLevels
- count
times (until it finds a nullptr
value for the next EXCEPTION_RECORD
).
[in] | ex_rec | The exception record to display. |
[in] | count | The number of recursions already performed. The initial call should accept the default parameter (of 0). |