libcsdbg
1.28
C++ exception (and generic) stack trace debug library
|
This class provides various low level utility and portability methods. More...
#include <util.hpp>
Static Public Member Functions | |
static void | version (u16 *, u16 *) |
Get the library version numbers. More... | |
static const i8 * | prefix () |
Get the library installation prefix. More... | |
static const i8 * | exec_path () |
Get the absolute path of the executable. More... | |
static chain< string > * | getenv (const i8 *) |
Parse a shell (environment) variable to its components. More... | |
static void | init (i32 &, i8 **) |
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) More... | |
static u32 | argc () |
Get the number of CLI arguments. More... | |
static const string * | argv (u32) |
Get a CLI argument, given its offset in util::m_config. More... | |
static const i8 * | type_name (const std::type_info &) |
Get the demangled name of a type. More... | |
static u32 | min (u32, u32, u32) |
Get the minimum of three numbers. More... | |
static void * | memset (void *, u8, u32) |
Fill a memory block with a constant byte. More... | |
static void * | memcpy (void *, const void *, u32) |
Copy a memory block. More... | |
static void * | memswap (void *, u32) |
Reverse the byte order of a memory block. More... | |
static void | lock () |
Lock the global access mutex. More... | |
static void | unlock () |
Unlock the global access mutex. More... | |
static bool | is_regular (const fileinfo_t &) |
Check if a file is a regular one. More... | |
static bool | is_chardev (const fileinfo_t &) |
Check if a file is a character device node. More... | |
static bool | is_readable (const fileinfo_t &) |
Check if the process has read access to a file. More... | |
static bool | is_writable (const fileinfo_t &) |
Check if the process has write access to a file. More... | |
static i32 | va_size (const i8 *, va_list) |
Compute the size of a printf-style format string expanded with the values of a variable argument list. More... | |
static i8 * | va_format (const i8 *, va_list) |
Format a buffer with a printf-style string expanded with the values of a variable argument list. More... | |
static i8 * | va_format (i8 *, const i8 *, va_list) |
Format a buffer with a printf-style string expanded with the values of a variable argument list. More... | |
static void | header (std::ostream &, const i8 *) |
Print a tagged message header on an output stream. More... | |
static void | dbg (const i8 *, const i8 *, va_list) |
Print a tagged debug message on the standard error stream. More... | |
static void | dbg_info (const i8 *,...) |
Print an informational debug message on the standard error stream. More... | |
static void | dbg_warn (const i8 *,...) |
Print a warning debug message on the standard error stream. More... | |
static void | dbg_error (const i8 *,...) |
Print an error debug message on the standard error stream. More... | |
Static Protected Member Functions | |
static void | on_lib_load () __attribute((constructor)) |
Library constructor. More... | |
static void | on_lib_unload () __attribute((destructor)) |
Library destructor. More... | |
Static Protected Attributes | |
static pthread_mutex_t | m_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP |
Global access mutex. More... | |
static chain< string > * | m_config = NULL |
Runtime configuration. More... | |
Additional Inherited Members | |
Public Member Functions inherited from csdbg::object | |
virtual | ~object ()=0 |
To be implemented. More... | |
virtual object * | clone () const =0 |
To be implemented. More... | |
virtual const i8 * | class_name () const |
Query the class name of an object descending from csdbg::object. More... | |
This class provides various low level utility and portability methods.