PStack
2.0
Stack trace printer for MSVC and GCC binaries
|
Data local to this compilation unit. More...
Variables | |
pstack::pstack_options * | g_options = nullptr |
The options block is supposed to be a singleton. More... | |
Data local to this compilation unit.
pstack::pstack_options* anonymous_namespace{pstack_options.cpp}::g_options = nullptr |
The options block is supposed to be a singleton.
As much as I hate singletons, I don't really want to be passing options all over the system just to occasionally get a parameter. Also, this is a C pointer instead of a shared_ptr for two reasons: first, the instance should be created by main
, so we have no access to the container for that instance, and secondly because I want this static data to be trivially constructed in the compilation unit.