/[lwip]/lwip/src/include/lwip/debug.h
ViewVC logotype

Diff of /lwip/src/include/lwip/debug.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by likewise, Tue Mar 25 12:59:42 2003 UTC revision 1.21 by likewise, Wed Mar 26 00:31:24 2003 UTC
# Line 47  Line 47 
47  #define DBG_LEVEL_SEVERE  3     /* */  #define DBG_LEVEL_SEVERE  3     /* */
48  #define DBG_MASK_LEVEL    3  #define DBG_MASK_LEVEL    3
49    
50  /** flag for DEBUGF to enable the debug message */  /** flag for DEBUGF to enable that debug message */
51  #define DBG_ON  0x80U  #define DBG_ON  0x80U
52  /** flag for DEBUGF to disable the debug message */  /** flag for DEBUGF to disable that debug message */
53  #define DBG_OFF 0x00U  #define DBG_OFF 0x00U
54    
55  /** flag for DEBUGF indicating a tracing message (to follow program flow) */  /** flag for DEBUGF indicating a tracing message (to follow program flow) */
56  #define DBG_TRACE   0x40U  #define DBG_TRACE   0x40U
57  /** flag for DEBUGF indicating a state debug message (to follow states) */  /** flag for DEBUGF indicating a state debug message (to follow module states) */
58  #define DBG_STATE   0x20U  #define DBG_STATE   0x20U
59  /** flag for DEBUGF indicating newly added code, not thoroughly tested yet */  /** flag for DEBUGF indicating newly added code, not thoroughly tested yet */
60  #define DBG_FRESH   0x10U  #define DBG_FRESH   0x10U
# Line 63  Line 63 
63    
64  #ifdef LWIP_DEBUG  #ifdef LWIP_DEBUG
65  #  define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x); } while(0)  #  define LWIP_ASSERT(x,y) do { if(!(y)) LWIP_PLATFORM_ASSERT(x); } while(0)
66  /** print debug message only if debug message is enabled AND is of correct type  /** print debug message only if debug message type is enabled...
67    * AND is at least DBG_LEVEL */   *  AND is of correct type AND is at least DBG_LEVEL
68  #  define DEBUGF(debug, x) do { if ((debug & DBG_ON) && (debug & DBG_TYPES_ON) && ((debug & DBG_MASK_LEVEL) >= DBG_MIN_LEVEL)) { LWIP_PLATFORM_DIAG(x); if (debug & DBG_HALT) while(1); } } while(0)   */
69    #  define DEBUGF(debug, x) do { if (((debug) & DBG_ON) && ((debug) & DBG_TYPES_ON) && (((debug) & DBG_MASK_LEVEL) >= DBG_MIN_LEVEL)) { LWIP_PLATFORM_DIAG(x); if (debug & DBG_HALT) while(1); } } while(0)
70  #  define LWIP_ERROR(x)  do { LWIP_PLATFORM_DIAG(x); } while(0)  #  define LWIP_ERROR(x)  do { LWIP_PLATFORM_DIAG(x); } while(0)
71  #else /* LWIP_DEBUG */  #else /* LWIP_DEBUG */
72  #  define LWIP_ASSERT(x,y)  #  define LWIP_ASSERT(x, y)
73  #  define DEBUGF(debug, x)  #  define DEBUGF(debug, x)
74  #  define LWIP_ERROR(x)  #  define LWIP_ERROR(x)
75  #endif /* LWIP_DEBUG */  #endif /* LWIP_DEBUG */

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26