Paul McCullagh wrote:
> 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.

That is correct.

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

We've decided to leave assertions on for production builds for normal
drizzle, because if one is triggered, the assert is possibly a little
clearer than the segfault.

>> 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?

Well... we should probably re-visit the whole thing, since -g is also
turned on in non-debug builds too. (Pretty much decided that always
building with symbols is just what you're going to get. But thanks for
making me look at that again, because I think the whole SYMBOLS_CFLAGS
just needs to be changed.

The thing I could see being a potential problem for you as you've
described it would be the drop from -O3 to -O0 for --with-debug. I'm not
sure if any of us have been using the --with-debug flag so far -
(although I could be wrong about that) so I'm pretty open to suggestions
as to what should happen in it... (although I'm going to fix
SYMBOLS_CFLAGS to be a little clearer right now)

Monty
-- 
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