
Dear Prafulla Wadaskar,
In message 73173D32E9439E4ABB5151606C3E19E2508402D4@SC-VEXCH1.marvell.com you wrote:
This seems to be a lot of effort, from code to command line pollution
- for what exactly?
Which is the problem you are trying to solve?
If I understood current u-boot debugging properly, the debug statements are enabled by editing src file by adding "#define DEBUG" Doing this the release contents will be tampered,
This is just one way to solve this, which is most convenient when you want to enable debugging on a per-file level. Of course you can acchieve the same effect by just passing "-DDEBUG" as a compile option. The Makefile allows to do this globally - there are currently no fine-grained selections available by default.
On the other hand, this is debug code which is not supposed to be present in a production release, so modifying the source seems a minor issue to me.
But the same release will be used by validation/testing/QA guys and to debu g anything out of released contents, no one would like to tamper the source code subject to condition proper debugging strategy is in place.
As mentioned, you can enable this by compile options as well.
The suggested patch provides totally optional strategy that offers- A) enabling selective debug statements without modifying source code B) enabling selective debug statements only from specific source file/s C) Last but not least- simple, small, easy to understand code.
Again.. it is an optional value added tool for u-boot developers :-)
To be honest: I see more overhead added. Looks like overkill to me.
Best regards,
Wolfgang Denk