Loading...
Searching...
No Matches
Go to the documentation of this file. 1#ifndef __LOUT_DEBUG_H__
2#define __LOUT_DEBUG_H__
17#define D_STMT_START do
18#define D_STMT_END while (0)
20#define D_STMT_NOP D_STMT_START { } D_STMT_END
23# define DEBUG_MSG(level, ...) \
25 if (DEBUG_LEVEL && (level) >= DEBUG_LEVEL) \
26 printf(__VA_ARGS__); \
29# define DEBUG_MSG(level, ...)
38#define DBG_OBJ_MSG_S(aspect, prio, msg) \
39 RTFL_OBJ_PRINT ("msg", "s:s:d:s", "<static>", aspect, prio, msg)
41#define DBG_OBJ_MSGF_S(aspect, prio, fmt, ...) \
44 snprintf (msg, sizeof (msg), fmt, __VA_ARGS__); \
45 RTFL_OBJ_PRINT ("msg", "s:s:d:s", "<static>", aspect, prio, msg) \
48#define DBG_OBJ_ENTER0_S(aspect, prio, funname) \
49 RTFL_OBJ_PRINT ("enter", "s:s:d:s:", "<static>", aspect, prio, funname);
51#define DBG_OBJ_ENTER_S(aspect, prio, funname, fmt, ...) \
54 snprintf (args, sizeof (args), fmt, __VA_ARGS__); \
55 RTFL_OBJ_PRINT ("enter", "s:s:d:s:s", "<static>", aspect, prio, funname, \
59#define DBG_OBJ_LEAVE_S() \
60 RTFL_OBJ_PRINT ("leave", "s", "<static>");
62#define DBG_OBJ_LEAVE_VAL_S(fmt, ...) \
65 snprintf (vals, sizeof (vals), fmt, __VA_ARGS__); \
66 RTFL_OBJ_PRINT ("leave", "s:s", "<static>", vals); \
71#define STMT_NOP do { } while (0)
73#define DBG_IF_RTFL if(0)
75#define DBG_OBJ_MSG_S(aspect, prio, msg) STMT_NOP
76#define DBG_OBJ_MSGF_S(aspect, prio, fmt, ...) STMT_NOP
77#define DBG_OBJ_ENTER0_S(aspect, prio, funname) STMT_NOP
78#define DBG_OBJ_ENTER_S(aspect, prio, funname, fmt, ...) STMT_NOP
79#define DBG_OBJ_LEAVE_S() STMT_NOP
80#define DBG_OBJ_LEAVE_VAL_S(fmt, ...) STMT_NOP