11 #if !defined CSDBG_WITH_PLUGIN && !defined CSDBG_WITH_HIGHLIGHT
33 static void on_lib_load() __attribute((constructor));
57 static const i8*
type_name(const std::type_info&);
62 static u32
min(u32, u32, u32);
66 static
void*
memcpy(
void*, const
void*, u32);
68 static
void*
memswap(
void*, u32);
85 static i32
va_size(const i8*, va_list);
89 static i8*
va_format(i8*, const i8*, va_list);
91 static
void header(std::ostream&, const i8*);
93 static
void dbg(const i8*, const i8*, va_list);
95 static
void dbg_info(const i8*, ...);
97 static
void dbg_warn(const i8*, ...);
static pthread_mutex_t m_lock
Global access mutex.
This abstract class serves as the root of the class hierarchy tree.
static const i8 * exec_path()
Get the absolute path of the executable.
static bool is_writable(const fileinfo_t &)
Check if the process has write access to a file.
static void * memset(void *, u8, u32)
Fill a memory block with a constant byte.
char i8
8-bit signed integer
struct stat fileinfo_t
File metadata.
static void version(u16 *, u16 *)
Get the library version numbers.
static void on_lib_load() __attribute((constructor))
Library constructor.
static u32 argc()
Get the number of CLI arguments.
static const i8 * type_name(const std::type_info &)
Get the demangled name of a type.
Class csdbg::chain definition and method implementation.
unsigned short u16
16-bit unsigned integer
static void on_lib_unload() __attribute((destructor))
Library destructor.
static void dbg_warn(const i8 *,...)
Print a warning debug message on the standard error stream.
static const i8 * prefix()
Get the library installation prefix.
unsigned char u8
8-bit unsigned integer
static void lock()
Lock the global access mutex.
static void unlock()
Unlock the global access mutex.
static bool is_readable(const fileinfo_t &)
Check if the process has read access to a file.
static void dbg_error(const i8 *,...)
Print an error debug message on the standard error stream.
static bool is_chardev(const fileinfo_t &)
Check if a file is a character device node.
static chain< string > * m_config
Runtime configuration.
Class csdbg::string definition.
static void dbg(const i8 *, const i8 *, va_list)
Print a tagged debug message on the standard error stream.
static u32 min(u32, u32, u32)
Get the minimum of three numbers.
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...
static void * memswap(void *, u32)
Reverse the byte order of a memory block.
unsigned int u32
32-bit unsigned integer
int i32
32-bit signed integer
static chain< string > * getenv(const i8 *)
Parse a shell (environment) variable to its components.
static bool is_regular(const fileinfo_t &)
Check if a file is a regular one.
static void header(std::ostream &, const i8 *)
Print a tagged message header on an output stream.
This class provides various low level utility and portability methods.
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...
static void * memcpy(void *, const void *, u32)
Copy a memory block.
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.
static void init(i32 &, i8 **)
Initialize the library runtime configuration. Seek command line arguments that are related with libcs...