35 #define F_IDENT __FUNCTION__ 40 extern void trace_set_time(
void);
41 extern unsigned long trace_time(
void);
42 extern void trace_dump_chars(
unsigned char *data,
unsigned int len);
43 extern void trace_dump_uints(U32BIT *data,
unsigned int len,
unsigned int pitch);
44 extern void trace_unicode(U16BIT *data,
unsigned int len);
46 extern U32BIT mheg_trace_debug;
49 #define TALWAYS 0x00ffffff 50 #define TWARN (1 << 30) 52 #define TSTATE MHDBG_TSTATE 53 #define TTUNE MHDBG_TTUNE 54 #define TMEMORY MHDBG_TMEMORY 55 #define TKEYS MHDBG_TKEYS 57 #define TMHBOOT MHDBG_TMHBOOT 58 #define TSTRM MHDBG_TSTRM 59 #define TFILE MHDBG_TFILE 60 #define TDSMFG MHDBG_TDSMFG 62 #define TMHAPI MHDBG_TMHAPI 63 #define TSERVICE MHDBG_TSERVICE 64 #define TICS MHDBG_TICS 65 #define TQUEUE MHDBG_TQUEUE 67 #define TEVNTS MHDBG_TEVNTS 68 #define TACTIONS MHDBG_TACTIONS 69 #define TTIME MHDBG_TTIME 70 #define TPERFORM MHDBG_TPERFORM 72 #define TGRAPHICS MHDBG_TGRAPHICS 73 #define TFONT MHDBG_TFONT 74 #define TTEXT MHDBG_TTEXT 75 #define TFONTCACHE MHDBG_TFONTCACHE 78 extern unsigned long last_trace_time;
79 #define TRACETIME() if (last_trace_time + 100 < trace_time()) { last_trace_time = trace_time(); \ 80 STB_SPDebugWrite("TRACE TIME= %d.%02d secs", last_trace_time / 100, last_trace_time % 100); } 81 #define TERPRINT(s, ...) STB_SPDebugWrite("ERROR-%s:%d " s, F_IDENT, __LINE__, ##__VA_ARGS__) 82 #define TRCPRINT(s, ...) STB_SPDebugWrite("%s:%d " s, F_IDENT, __LINE__, ##__VA_ARGS__) 83 #define TRACE_SET_TIME() 84 #elif TRACE_TIMING == 1 86 #define TERPRINT(s, ...) STB_SPDebugWrite("ERROR-%s:%d (%ld) " s, F_IDENT, __LINE__, trace_time(), ##__VA_ARGS__) 87 #define TRCPRINT(s, ...) STB_SPDebugWrite("%s:%d (%ld) " s, F_IDENT, __LINE__, trace_time(), ##__VA_ARGS__) 88 #define TRACE_SET_TIME() trace_set_time() 91 #define TERPRINT(s, ...) STB_SPDebugWrite("ERROR-%s:%d " s, F_IDENT, __LINE__, ##__VA_ARGS__) 92 #define TRCPRINT(s, ...) STB_SPDebugWrite("%s:%d " s, F_IDENT, __LINE__, ##__VA_ARGS__) 93 #define TRACE_SET_TIME() 96 #define TRACE(t, x) TRACETIME() if ((t) == TERROR) { TERPRINT x; } \ 97 else if ((t) & mheg_trace_debug) { TRCPRINT x; } 99 #define TPRINT(t, x) if ((t) & mheg_trace_debug) STB_SPDebugNoCnWrite x; 100 #define TRACE_BUFF(t, d, l) if ((t) & mheg_trace_debug) trace_dump_chars(d, l); 101 #define TRACE_UINT(t, d, l, p) if ((t) & mheg_trace_debug) trace_dump_uints(d, l, p); 102 #define TRACE_UNIC(t, d, l) if ((t) & mheg_trace_debug) trace_unicode(d, l); 106 #define ERROR_PRINT(x) STB_SPDebugNoCnWrite x 107 #define WARNING_PRINT(x) if (mheg_trace_debug) STB_SPDebugNoCnWrite x 109 #define TRACE_MEM() if (TMEMORY & mheg_trace_debug) MHG_DebugMemStats(__LINE__) 111 #define DBGTRACE(t, x, ...) if ((t) == TERROR || ((t) & mheg_trace_debug)) { \ 112 STB_SPDebugWrite( "T%05x-%s:%d " x, t, F_IDENT, __LINE__, ##__VA_ARGS__); } 114 #define DBG_PRINTF STB_SPDebugNoCnWrite 120 #define TRACE_BUFF(t, d, l) 121 #define TRACE_UINT(t, d, l, p) 122 #define TRACE_UNIC(t, d, l) 125 #define TRACE_SET_TIME() 126 #define DBGTRACE(...) 127 #define DBG_PRINTF(...) 131 #if !defined(NDEBUG) && defined(STACK_DEBUGGING) 132 void STB_OSTaskAddFunc(
const char *func);
133 void STB_OSTaskRemFunc(
const char *func);
135 #define DECLARE_NAME(x) const char *func_name = F_IDENT; 137 #define DECLARE_NAME(x) const char func_name[] = #x; 139 #define FUNCTION_START(x) DECLARE_NAME(x) STB_OSTaskAddFunc(func_name); 140 #define FUNCTION_FINISH(x) STB_OSTaskRemFunc(func_name); 142 #define FUNCTION_START(name) 143 #define FUNCTION_FINISH(name) 146 #if defined(NDEBUG) && !defined(OVERRIDE_DEBUG_PRINTS) 161 #define DPLEVEL DBG_LEVEL 165 #define DPL5(x) STB_SPDebugNoCnWrite x 171 #define DPL4(x) STB_SPDebugNoCnWrite x 177 #define DPL3(x) STB_SPDebugNoCnWrite x 183 #define DPL2(x) STB_SPDebugNoCnWrite x 189 #define DPL1(x) STB_SPDebugNoCnWrite x 195 void MHG_DebugMemStats(
int line);
This file provides control debug prints for MHEG5 engine.
Debug functions required by MHEG5 engine in debug builds.
System Wide Global Technical Data Type Definitions.