lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] RFC: Debug changes


From: David Haas
Subject: Re: [lwip-users] RFC: Debug changes
Date: Wed, 12 Feb 2003 14:51:58 -0500
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2b) Gecko/20021107

I can certainly organize the variables in an lwip_debug structure to avoid the name collision issue. We can still have a #define LWIP_DEBUG which would turn on/off the whole thing. So if LWIP_DEBUG is not defined, there will be no debugging. If LWIP_DEBUG is defined though, you will use the lwip_debug.mem_debug (or similar) variable to control if output occurs for that specific area.

MEM_DEBUG and similar macros can control whether lwip_debug.mem_debug defaults to 1 or 0.

David.



Marc Boucher wrote:

since everything generally gets linked together
on most platforms without namespaces, generic names
like mem_debug should be avoided.

Perhaps all lwip debug variables could be grouped into
an array or structure (lwip_debug) to avoid name collisions
and make it easy to find/change them in a central location
with debuggers etc..

Also perhaps the macros could be organized in a way allowing
those who do not want/need runtime debug control to
override them so as to revert to the current behavior.

Marc


On Wed, Feb 12, 2003 at 02:32:16PM -0500, David Haas wrote:
Hi all:

Would anyone have any objections if I changed the debug interface to support variables controlling whether debug is output or not. In words, instead of having a #define MEM_DEBUG, we would have a mem_debug global variable which could be TRUE or FALSE. In order to enable debug output you would then just set mem_debug to TRUE. This could be done dynamically without rebuilding.

All of this functionality would be built into a new debug.c file.

David.




_______________________________________________
lwip-users mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/lwip-users









reply via email to

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