Skip site navigation (1) Skip section navigation (2)

Re: --enable-debug does not work with gcc

From: Matthias Luedtke <matthias-luedtke(at)gmx(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: --enable-debug does not work with gcc
Date: 2007-02-03 19:02:36
Message-ID: 45C4DC4C.3000006@gmx.de (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi all,

Magnus Hagander wrote:
>>> Personally, in my development tree I use a Makefile.custom containing
>>>
>>> # back off optimization unless profiling
>>> ifeq ($(PROFILE),)
>>>    CFLAGS:= $(patsubst -O2,-O1,$(CFLAGS))
>>> endif
>>>
>>> -O1 still generates "uninitialized variable" warnings but the code is a
>>> lot saner to step through ... not perfect, but saner.  It's been a
>>> workable compromise for a long time.  I don't recommend developing with
>>> -O0, exactly because it disables some mighty valuable warnings.
>> Agreed.  I use -O1 by default myself, unless I am doing performance testing.
>>
> Something for the developers FAQ perhaps? I confess I did not know of
> Makefile.custom :-D

I did not know, either, but would have been glad, had I found such info
a few weeks ago when I started digging into the pg source ;)

And while we are at it, how about some CFLAGS="-DOPTIMIZER_DEBUG"
sweetness for the debugging section in the Dev FAQ?

Are there any other macros that enable some more debug output? (Or is
there a place where all this has already been documented?)

Cheers,
Matthias


In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2007-02-03 19:54:24
Subject: Re: [HACKERS] \copy (query) delimiter syntax error
Previous:From: Stephan SzaboDate: 2007-02-03 17:43:21
Subject: Re: Referential Integrity and SHARE locks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group