Hi Monty,

On Oct 10, 2008, at 12:21 AM, Monty Taylor wrote:

>>
>> - Added a --with-debug=full option to configure
>>
>>  This option is identical to --with-debug=yes except that it
>>  defined DEBUG on the command line (-DDEBUG). PBXT uses the DEBUG
>>  define in order to turn on assertions on, and to added other
>>  runtime checking.
>
> I don't have a problem with this in general... however, may I  
> recommend
> the NDEBUG flag for turning assertions off (which is a standard define
> and what assert.h uses). Obviously not suggesting you need to patch  
> all
> of PBXT right now... but I thought I just might make the suggestion
> while we're talking about it. If you did that, then you can make use  
> of
> our --enable-assert/--disable-assert flag.

Yes, I agree, it makes sense to follow this standard.

Just one thing I can't figure out. It looks to me as if assertions are  
turning on by default according to this schema.

Basically it is not good if a production build of PBXT includes  
assertions (because every little instruction is bad!)

> Also, is there a reason why we can't just define -DDEBUG with regular
> --with-debug? I'm not sure that --with-debug does a whole lot special
> for us at the moment anyway other than turning off -O3.

Actually I hesitated to change --with-debug=yes because currently the  
only difference between yes and no is that yes adds "-g" and no adds  
"-03".

This can be useful because sometimes I find that I cannot repeat a bug  
when turning on my DEBUG code because of timing issues. So it helps to  
be able to build (an otherwise standard production system) with just -g.

On the other hand it makes sense to define the DEBUG flag with --with- 
debug=yes, because normally the check code helps to find bugs.

So maybe we should add DEBUG to --with-debug=yes, but then add a  
configure option like --with-debug=symbols (or "only", ...) which  
simply adds -g?

What do you think?


--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com



-- 
https://code.launchpad.net/~paul-mccullagh/drizzle/test-patches/+merge/1275
You are subscribed to branch Drizzle Active Development Branch.

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to