Initialize the library runtime configuration. Seek command line arguments that are related with libcsdbg (prefixed with –csdbg-) and move them from the argument vector to the runtime configuration list (util::m_config)
- Parameters
-
[in,out] | argc | the argument count |
[in,out] | argv | the argument vector |
- Note
- If an exception occurs, the process exits
Definition at line 188 of file util.cpp.
References __D_ASSERT, csdbg::chain< T >::add(), csdbg::chain< T >::at(), csdbg::string::cstr(), dbg_info(), likely, m_config, csdbg::chain< T >::size(), and unlikely.
200 if (
likely(strstr(arg,
"--csdbg-") != arg) )
203 if (
likely(strlen(arg) > 8) )
214 #if CSDBG_DBG_LEVEL & CSDBG_DBGL_INFO
225 catch (exception &x) {
229 catch (std::exception &x) {
virtual T * at(u32) const
Get the node data pointer at a chain offset.
virtual u32 size() const
Get the chain size (node count)
char i8
8-bit signed integer
static u32 argc()
Get the number of CLI arguments.
#define likely(expr)
Offer a hint (positive) to the pipeline branch predictor.
static chain< string > * m_config
Runtime configuration.
virtual const i8 * cstr() const
Get the C-string equivalent.
virtual chain & add(T *)
Add a node to the chain.
unsigned int u32
32-bit unsigned integer
int i32
32-bit signed integer
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.
static void dbg_info(const i8 *,...)
Print an informational debug message on the standard error stream.
static const string * argv(u32)
Get a CLI argument, given its offset in util::m_config.
#define __D_ASSERT(x)
Assertion macro.