0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #ifndef ODEBUG_H
0035 #define ODEBUG_H
0036
0037 #ifdef __cplusplus
0038 extern "C" {
0039 #endif
0040
0041 #include <ndrx_config.h>
0042 #include <stdio.h>
0043 #include <limits.h>
0044 #include <thlock.h>
0045 #include <stdarg.h>
0046 #include <ndebugcmn.h>
0047 #include <nstd_tls.h>
0048 #include <ndebug.h>
0049 #include <atmi.h>
0050
0051
0052
0053 #define ONDRX_LOG(p_ctxt, lev, fmt, ...) {NDRX_DBG_INIT_ENTRY; if (lev<=G_ndrx_debug.level)\
0054 {ndrx_tpsetctxt(*p_ctxt, 0, CTXT_PRIV_NSTD); \
0055 __ndrx_debug__(&G_ndrx_debug, lev, __FILE__, __LINE__, __func__, fmt, ##__VA_ARGS__);\
0056 ndrx_tpgetctxt(p_ctxt, 0, CTXT_PRIV_NSTD);\
0057 }}
0058
0059 #define OUBF_LOG(p_ctxt, lev, fmt, ...) {NDRX_DBG_INIT_ENTRY; if (lev<=G_ubf_debug.level)\
0060 {ndrx_tpsetctxt(*p_ctxt, 0, CTXT_PRIV_NSTD); \
0061 __ndrx_debug__(&G_ubf_debug, lev, __FILE__, __LINE__, __func__, fmt, ##__VA_ARGS__);\
0062 ndrx_tpgetctxt(p_ctxt, 0, CTXT_PRIV_NSTD);\
0063 }}
0064
0065
0066 #define OTP_LOG(p_ctxt, lev, fmt, ...) {NDRX_DBG_INIT_ENTRY; if (lev<=G_tp_debug.level)\
0067 {ndrx_tpsetctxt(*p_ctxt, 0, CTXT_PRIV_NSTD); \
0068 __ndrx_debug__(&G_tp_debug, lev, __FILE__, __LINE__, __func__, fmt, ##__VA_ARGS__);\
0069 ndrx_tpgetctxt(p_ctxt, 0, CTXT_PRIV_NSTD);\
0070 }}
0071
0072
0073 #define OUBF_DUMP(p_ctxt, lev,comment,ptr,len) {NDRX_DBG_INIT_ENTRY; if (lev<=G_ndrx_debug.level)\
0074 {ndrx_tpsetctxt(*p_ctxt, 0, CTXT_PRIV_NSTD); \
0075 __ndrx_debug_dump__(&G_ndrx_debug, lev, __FILE__, __LINE__, __func__, comment, ptr, len);\
0076 ndrx_tpgetctxt(p_ctxt, 0, CTXT_PRIV_NSTD);\
0077 }}
0078
0079 #define ONDRX_DUMP(p_ctxt, lev,comment,ptr,len) {NDRX_DBG_INIT_ENTRY; if (lev<=G_ndrx_debug.level)\
0080 {ndrx_tpsetctxt(*p_ctxt, 0, CTXT_PRIV_NSTD); \
0081 __ndrx_debug_dump__(&G_ubf_debug, lev, __FILE__, __LINE__, __func__, comment, ptr, len);\
0082 ndrx_tpgetctxt(p_ctxt, 0, CTXT_PRIV_NSTD);\
0083 }}
0084
0085 #define OSTDOUT_DUMP(p_ctxt, lev,comment,ptr,len) {NDRX_DBG_INIT_ENTRY; if (lev<=G_stdout_debug.level)\
0086 {ndrx_tpsetctxt(*p_ctxt, 0, CTXT_PRIV_NSTD); \
0087 __ndrx_debug_dump__(&G_stdout_debug, lev, __FILE__, __LINE__, __func__, comment, ptr, len);\
0088 ndrx_tpgetctxt(p_ctxt, 0, CTXT_PRIV_NSTD);\
0089 }}
0090
0091 #define OTP_DUMP(p_ctxt, lev,comment,ptr,len) {NDRX_DBG_INIT_ENTRY; if (lev<=G_tp_debug.level)\
0092 {ndrx_tpsetctxt(*p_ctxt, 0, CTXT_PRIV_NSTD); \
0093 __ndrx_debug_dump__(&G_tp_debug, lev, __FILE__, __LINE__, __func__, comment, ptr, len);\
0094 ndrx_tpgetctxt(p_ctxt, 0, CTXT_PRIV_NSTD);\
0095 }}
0096
0097 #define OUBF_DUMP_DIFF(p_ctxt, lev,comment,ptr,ptr2,len) {NDRX_DBG_INIT_ENTRY; if (lev<=G_ndrx_debug.level)\
0098 {ndrx_tpsetctxt(*p_ctxt, 0, CTXT_PRIV_NSTD); \
0099 __ndrx_debug_dump_diff__(&G_ndrx_debug, lev, __FILE__, __LINE__, __func__, comment, ptr, ptr2, len);\
0100 ndrx_tpgetctxt(p_ctxt, 0, CTXT_PRIV_NSTD);\
0101 }}
0102
0103 #define ONDRX_DUMP_DIFF(p_ctxt, lev,comment,ptr,ptr2,len) {NDRX_DBG_INIT_ENTRY; if (lev<=G_ndrx_debug.level)\
0104 {ndrx_tpsetctxt(*p_ctxt, 0, CTXT_PRIV_NSTD); \
0105 __ndrx_debug_dump_diff__(&G_ubf_debug, lev, __FILE__, __LINE__, __func__, comment, ptr, ptr2, len);\
0106 ndrx_tpgetctxt(p_ctxt, 0, CTXT_PRIV_NSTD);\
0107 }}
0108
0109 #define OTP_DUMP_DIFF(p_ctxt, lev,comment,ptr,ptr2,len) {NDRX_DBG_INIT_ENTRY; if (lev<=G_tp_debug.level)\
0110 {ndrx_tpsetctxt(*p_ctxt, 0, CTXT_PRIV_NSTD); \
0111 __ndrx_debug_dump_diff__(&G_tp_debug, lev, __FILE__, __LINE__, __func__, comment, ptr, ptr2, len);\
0112 ndrx_tpgetctxt(p_ctxt, 0, CTXT_PRIV_NSTD);\
0113 }}
0114
0115
0116
0117
0118
0119
0120 #ifdef __cplusplus
0121 }
0122 #endif
0123
0124 #endif
0125
0126