lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lwip-devel] RFC: debug and asserts (And: dynamic debug works for us


From: Zschocke, Florian
Subject: RE: [lwip-devel] RFC: debug and asserts (And: dynamic debug works for us)
Date: Thu, 6 Nov 2003 08:02:29 +0100

Leon Woestenberg wrote on Wednesday, November 05, 2003 1:12 AM:

> We have been using dynamic debug switches without any problem
> in lwIP. 
> 
> I think we did it by overriding the *_DEBUG macro's by
> #defining them to be global external variables in lwipopts.h.

This is what we use:

#define DBG_TYPES_ON     g_lwipDebugTypes.status
#define DBG_MIN_LEVEL    g_lwipDebugLevel.status

#define TCP_DEBUG       g_lwipDebug.tcp.status
#define UDP_DEBUG       g_lwipDebug.udp.status
etc.

We are using this without problems, but only because we have no 
#if TCP_DEBUG anwhere in the code, but #ifdef TCP_DEBUG. I'm not quite sure
what you were trying to say. Because this is exactly the problem. If you
have the _DEBUG macros defined to a variable then something like
#if TCP_DEBUG
 do something
#endif
is not going to work. At least our compiler will not accept it and correctly
so. 

Florian.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]