tass-belgium / picotcp

PicoTCP is a free TCP/IP stack implementation
Other
1.19k stars 219 forks source link

Use compile time defines to enable/disable module debugging #412

Open matthiasvp opened 8 years ago

matthiasvp commented 8 years ago

In most modules debugging is enabled/disabled by commenting out either #define module_dbg(...) do {} while(0) or #define module_dbg dbg. This requires changing of the source file to enable/disable debugging which is not really convenient. In some modules(eg ARP) this is done by defining DEBUG_ARP at compile time, which is slightly more convenient. Changing all modules to this format will make debugging configuration easier. Also a global debugging symbol DEBUG_ALL could be added which enables debugging for all modules.

phalox commented 8 years ago

@laurensmiers Got a fix already? :-) The starters should be able to do this easily... A good suggestion is welcome of course

laurensmiers commented 8 years ago

@phalox first try is in the branch issue_412 . Feel free to check it out and tell me what you think. it's just an extra file included in the makefile to enable the different debug flags for the separate modules. I forgot to check with you guys to see if what is implemented now in issue_412 branch is ok.

frederikvs commented 8 years ago

@phalox don't worry, we've already selected a bunch of tasks for the starters. It's all under control. Thanks for the input though.

@laurensmiers thanks for the PR, I'll review it when I find the time :-)

phalox commented 8 years ago

I wouldn't want our colleagues to be bored :-)

laurensmiers commented 8 years ago

Sorry for being a menace @ISY-Thomas , but can we run this on Jenkins now that it's merged (https://github.com/tass-belgium/picotcp/pull/417), just to ensure that the debug build stays warning/error-free? make DEBUG_ALL=1 should be enough.