22 std::unique_ptr<SYMBOL_INFO> _symbol_info;
35 using pointer = std::shared_ptr<debug_help>;
50 using action_strings_map = std::map<ULONG, const char *>;
53 SymSetOptions(SYMOPT_UNDNAME | SYMOPT_DEFERRED_LOADS);
58 SymCleanup(GetCurrentProcess());
61 static action_strings_map& action_strings(){
62 static action_strings_map _action_strings = {
63 { CBA_DEBUG_INFO,
"CBA_DEBUG_INFO" },
64 { CBA_DEFERRED_SYMBOL_LOAD_CANCEL ,
"CBA_DEFERRED_SYMBOL_LOAD_CANCEL" },
65 { CBA_DEFERRED_SYMBOL_LOAD_COMPLETE,
"CBA_DEFERRED_SYMBOL_LOAD_COMPLETE" },
66 { CBA_DEFERRED_SYMBOL_LOAD_FAILURE ,
"CBA_DEFERRED_SYMBOL_LOAD_FAILURE" },
67 { CBA_DEFERRED_SYMBOL_LOAD_PARTIAL ,
"CBA_DEFERRED_SYMBOL_LOAD_PARTIAL" },
68 { CBA_DEFERRED_SYMBOL_LOAD_START ,
"CBA_DEFERRED_SYMBOL_LOAD_START" },
69 { CBA_DUPLICATE_SYMBOL ,
"CBA_DUPLICATE_SYMBOL" },
70 { CBA_EVENT ,
"CBA_EVENT" },
71 { CBA_READ_MEMORY ,
"CBA_READ_MEMORY" },
72 { CBA_SET_OPTIONS ,
"CBA_SET_OPTIONS" },
73 { CBA_SRCSRV_EVENT ,
"CBA_SRCSRV_EVENT" },
74 { CBA_SRCSRV_INFO ,
"CBA_SRCSRV_INFO" },
75 { CBA_SYMBOLS_UNLOADED ,
"CBA_SYMBOLS_UNLOADED" },
77 return _action_strings;
80 static BOOL CALLBACK SymCallback(HANDLE, ULONG ActionCode, ULONG64 CallbackData, ULONG64){
83 DBG(reinterpret_cast<const char*>(CallbackData));
86 case CBA_DEFERRED_SYMBOL_LOAD_COMPLETE:
87 case CBA_DEFERRED_SYMBOL_LOAD_FAILURE:
88 case CBA_DEFERRED_SYMBOL_LOAD_PARTIAL:
89 case CBA_DEFERRED_SYMBOL_LOAD_START:
90 case CBA_DUPLICATE_SYMBOL:
94 case CBA_SRCSRV_EVENT:
96 case CBA_DEFERRED_SYMBOL_LOAD_CANCEL:
97 case CBA_SYMBOLS_UNLOADED:
105 static std::mutex& library_lock(){
106 static initializer _initializer;
107 static std::mutex _library_lock;
108 return _library_lock;
C++ interface to the dbghelp library.
std::shared_ptr< debug_help > pointer
the default pointer type used by the library
static pointer make()
constructs a new debug_help and returns a pointer type
host, target and build configurations and settings Various components are purpose built for specific ...
#define throw_if(_test, _expression)
Simplifies use of exception::_throw_if.
generic and special purpose exceptions
Represents a debug symbol.