theLib
10.0
NHI1
-
theKernel
-
theLink
-
theConfig
-
theSq3Lite
-
theCompiler
-
theBrain
-
theGuard
-
theLib
-
theATL
Loading...
Searching...
No Matches
myoo
debug_mox.h
Go to the documentation of this file.
1
9
#pragma once
10
11
/*****************************************************************************/
12
/* */
13
/* debugging functions */
14
/* */
15
/*****************************************************************************/
16
17
#if META_DEBUG
18
19
#include "debug_mk.h"
20
21
#define printFMT "'%s' [ref=%i,typ=%s]"
22
#define printVAL(o) (o?VAL2STR(o):"NULL"),(o)?(o)->refCount:-1,o&&o->typePtr?o->typePtr->name:"ukn"
23
24
#undef printLng
25
#define printLng(o) printV(#o" = " printFMT,printVAL(o))
26
27
#undef printResult
28
#define printResult printV("result = " printFMT,printVAL(Tcl_GetObjResult(interp)))
29
30
#undef printLngErrorCode
31
#define printLngErrorCode() do { \
32
MOX_OBJ_T errorCode = Tcl_GetVar2Ex (interp, "errorCode", NULL, TCL_GLOBAL_ONLY); \
33
printLng(errorCode); \
34
} while (0);
35
36
#undef printLngErrorInfo
37
#define printLngErrorInfo() do { \
38
MOX_OBJ_T errorInfo = Tcl_GetVar2Ex (interp, "errorInfo", NULL, TCL_GLOBAL_ONLY); \
39
printLng(errorInfo); \
40
} while (0);
41
42
#undef printObjv
43
#define printObjv \
44
printV("__skip=%i, objc=%i",__skip,objc);\
45
printAry(objc,objv)
46
47
#undef printAry
48
#define printAry(c,o) \
49
for(int i=0;i<c;i++) { \
50
printV("%2d : " printFMT, i, printVAL(o[i])) \
51
}
52
53
#undef printAry2
54
#define printAry2(txt, c,o) \
55
mk_dbg_start_2(MK_COLOR_BLUE,"%s : ",txt); \
56
for(int i=0;i<c;i++) { \
57
mk_dbg_next_2(MK_COLOR_YELLOW, "[%d]" MK_COLOR_RESET "=" printFMT ", ",i,printVAL(o[i])); \
58
} \
59
mk_dbg_end();
60
61
#endif
Generated on Thu May 29 2025 13:14:28 for theLib by
1.12.0