2 #define _CSDBG_CONFIG 1
34 #ifdef CSDBG_WITH_STREAMBUF
38 #ifdef CSDBG_WITH_STREAMBUF_TCP
39 #include <sys/socket.h>
40 #include <arpa/inet.h>
43 #ifdef CSDBG_WITH_STREAMBUF_STTY
48 #ifdef CSDBG_WITH_HIGHLIGHT
87 typedef long long i64;
92 typedef unsigned char u8;
97 typedef unsigned short u16;
107 typedef unsigned long long u64;
115 #if defined __x86_64__ || defined __ppc64__
132 #ifdef CSDBG_WITH_STREAMBUF_TCP
147 #ifdef CSDBG_WITH_PLUGIN
157 #ifdef CSDBG_WITH_HIGHLIGHT
205 #ifdef CSDBG_WITH_STREAMBUF_TCP
215 #ifdef CSDBG_WITH_HIGHLIGHT
228 #ifdef CSDBG_WITH_DEBUG
233 #define CSDBG_DBGL_ERROR 0x01
238 #define CSDBG_DBGL_WARNING 0x02
243 #define CSDBG_DBGL_INFO 0x04
248 #define CSDBG_DBGL_LOW (CSDBG_DBGL_ERROR)
253 #define CSDBG_DBGL_MEDIUM (CSDBG_DBGL_LOW | CSDBG_DBGL_WARNING)
258 #define CSDBG_DBGL_HIGH (CSDBG_DBGL_MEDIUM | CSDBG_DBGL_INFO)
263 #define CSDBG_DBG_LEVEL CSDBG_DBGL_HIGH
268 #define __D_ASSERT(x) \
270 std::cerr << "assertion '" << #x << "' failed"; \
271 std::cerr << "\r\non line " << std::dec << __LINE__; \
272 std::cerr << "\r\nin file '" << __FILE__ << "'"; \
273 std::cerr << "\r\nin function " << __PRETTY_FUNCTION__; \
274 std::cerr << "\r\n\r\n"; \
279 #define __D_ASSERT(x)
284 #ifdef CSDBG_WITH_COLOR_TERM
289 #define INFO_TAG_FG 61
294 #define WARNING_TAG_FG 60
299 #define ERROR_TAG_FG 9
304 #ifdef CSDBG_WITH_HIGHLIGHT
309 #define HLT_NUMBER_FG 208
314 #define HLT_KEYWORD_FG 61
319 #define HLT_TYPE_FG 105
324 #define HLT_FILE_FG 250
329 #define HLT_SCOPE_FG 250
334 #define HLT_FUNCTION_FG 214
344 #define likely(expr) __builtin_expect((expr), true)
349 #define unlikely(expr) __builtin_expect((expr), false)
354 #define precache_r(addr) __builtin_prefetch((addr), 0, 3)
359 #define precache_w(addr) __builtin_prefetch((addr), 1, 3)
363 #define likely(expr) (expr)
365 #define unlikely(expr) (expr)
367 #define precache_r(addr)
369 #define precache_w(addr)
long long i64
64-bit signed integer
static const i8 g_trace_syntax[]
C++ stack trace syntax.
char i8
8-bit signed integer
struct stat fileinfo_t
File metadata.
unsigned long long u64
64-bit unsigned integer
static const u16 g_minor
Library version minor.
static const u16 g_memblock_sz
Block size (allocation alignment)
static const i8 g_libs_env[]
DSO filtering shell variable.
u8 color_t
VT100 terminal color.
unsigned short u16
16-bit unsigned integer
unsigned char u8
8-bit unsigned integer
struct sockaddr_in tcp_addr_t
TCP IPv4 address.
static const i8 g_prefix[]
Library installation prefix.
void(* modsym_t)(void *, void *)
Plugin callback.
unsigned int u32
32-bit unsigned integer
int i32
32-bit signed integer
short i16
16-bit signed integer
u16 attrset_t
VT100 attribute bitmask.
unsigned long long mem_addr_t
64-bit memory address
static const i32 g_ldp_port
LDP service port.
struct sockaddr ip_addr_t
IP address.
static const u16 g_major
Library version major.