PStack
2.0
Stack trace printer for MSVC and GCC binaries
|
Data local to this compilation unit. More...
Functions | |
static psystem::address_t | fetch_address (char const *text) |
Translate a string into an address. More... | |
Variables | |
addr2ln::addr2ln_options * | g_options = nullptr |
The options block is supposed to be a singleton. More... | |
Data local to this compilation unit.
|
static |
Translate a string into an address.
This method assumes that the string is a hexadecimal number.
[in] | text | The string of text to translate. |
text
.psystem::exception::ui_exception | If text input does not consist entirely of text that can be converted to a psystem::address_t data type. The resulting value must also be a positive integer that is less than ULONG_MAX . |
strtoul
returns. addr2ln::addr2ln_options* anonymous_namespace{addr2ln_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.