[U-Boot] [PATCH] debug_print macros support

Wolfgang Denk wd at denx.de
Mon Apr 6 09:56:39 CEST 2009


Dear Prafulla Wadaskar,

In message <73173D32E9439E4ABB5151606C3E19E2508402D4 at 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

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Even if you can deceive people about  a  product  through  misleading
statements, sooner or later the product will speak for itself.
- Hajime Karatsu


More information about the U-Boot mailing list