From: | Gavin Sherry <swm(at)alcove(dot)com(dot)au> |
---|---|
To: | NikhilS <nikkhils(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: --enable-debug does not work with gcc |
Date: | 2007-02-02 09:05:48 |
Message-ID: | Pine.LNX.4.58.0702022003080.29862@linuxworld.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 2 Feb 2007, NikhilS wrote:
> Hi,
>
> Indeed it does, apologies for not doing the entire groundwork. But what it
> also does is that it adds -O2 by default for gcc even when --enable-debug is
> specified. gdb is not able to navigate the stack traces properly with this
> optimization in place. Especially tracing of static functions becomes
> difficult. Has this issue been faced by anybody else? If so can try out a
> patch to avoid using O2 with enable-debug.
Yes, this is known. The thing with gcc is, it only emits some warnings at
-O2. I'm not that this is why we do not set optimisation to 0 but have
long assumed it to be the case. I imagine that it's fairly standard
practice for people doing debugging to CFLAGS=-O0 as an argument to
configure.
From | Date | Subject | |
---|---|---|---|
Next Message | NikhilS | 2007-02-02 09:13:09 | Re: --enable-debug does not work with gcc |
Previous Message | Michael Meskes | 2007-02-02 09:01:26 | Re: Why is ecpg segfaulting on buildfarm member "clownfish"? |