lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Debugging Levels


From: Juri Haberland
Subject: Re: [lwip-users] Debugging Levels
Date: Wed, 06 Jun 2007 13:40:42 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20070604)

Spies, Dominik wrote:
> Hi!

Hi Dominik,

> I don't understand debugging completely, what are the different levels
> for? It seems that they are never used and so every call to debug has
> level 0 (DBG_LEVEL_OFF) by default and onw has to set min level to
> DBG_LEVEL_OFF. Strange behaviour. So, but when I understand it
> correctly, onw could specify a level other than 0 in the call and then
> it would only be printed if that level is matched be min level?
> 
> DBG_TYPES_ON is by default 0, what means no debugging at all, right? so,
> setting it to DBG_ON enables all types which are set to DBG_ON. Setting
> it also to STATE, TRACE and/or FRESH would enable also these messages
> independent if the debug type, e.g. IP_DEBUG is set to off.
> But why is DBG_TYPES_ON not by default set to DBG_ON ?

As far as I understand the debugging code, it goes like this:

- DBG_TYPES_ON should be either DBG_OFF/0, DBG_ON or a combination of
DBG_TRACE, DBG_STATE and DBG_FRESH.
DBG_OFF/0 would effectively disable debugging, DBG_ON would enable full
debugging and a combination of DBG_TRACE, DBG_STATE and DBG_FRESH would
enable only those types of messages (hence the name DBG_TYPES_ON)

- for all of those IP_DEBUG, TCP_DEBUG, ... you can either enable or
disable them completely with DBG_ON/DBG_OFF, regardless of the settings
in DBG_TYPES_ON

- with DBG_MIN_LEVEL you can decrease the debugging level to e.g.
DBG_LEVEL_SERIOUS (and so on).

Cheers,
Juri (also working on my thesis ;)




reply via email to

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