svn commit: trunk/busybox/networking

Rob Landley rob at landley.net
Mon Jul 3 09:26:56 PDT 2006


On Saturday 01 July 2006 4:22 pm, Robert P. J. Day wrote:
> on that note, would someone like to suggest a standard for what
> maintainers should use if they want to do that sort of thing in their
> own code?  i'm leery of something as generic as "#ifdef DEBUG" since
> that just *begs* to have code start clashing.

I've found that debug printfs are far more meaningful to the person who put 
them in than to anyone else, and that leaving there "to help future 
developers" just clutters up the code.  You'll notice how uClibc has a config 
option for "manuel's hidden warnings", I.E. CONFIG_MJN3_ONLY?  That strikes 
me as a good name for that option.

I'm actually pretty happy removing the debug printfs entirely if they're 
mostly configured out.  Instrumenting code to see what it's doing generally 
isn't a major problem, and figuring out where you need to put the printfs is 
part of learning the code.

And the purpose of the DEBUG toggle is to build binaries with debugging info 
so you can run gdb against them.  (I believe this is one step beyond 
busybox_unstripped.)

> rday

Rob
-- 
Never bet against the cheap plastic solution.


More information about the busybox mailing list