Gentoo Archives: gentoo-dev

From: Ryan Hill <dirtyepic@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: check-reqs* vs CFLAGS=-g
Date: Mon, 05 Aug 2013 07:54:30
Message-Id: 20130805020423.086984cb@caribou.gateway.2wire.net
In Reply to: Re: [gentoo-dev] check-reqs* vs CFLAGS=-g by "Diego Elio Pettenò"
1 On Fri, 2 Aug 2013 13:47:10 +0100
2 Diego Elio Pettenò <flameeyes@×××××××××.eu> wrote:
3
4 > On Fri, Aug 2, 2013 at 1:08 PM, Andreas K. Huettel
5 > <dilfridge@g.o>wrote:
6 >
7 > > I thought -O0 was generally discouraged, even for debugging?!
8 >
9 >
10 > As Michał said, it all depends on what you want to debug. I would say that
11 > for 90% of issues you *do not* want to use -O0. Your code might not even
12 > compile (libav for instance used to rely heavily in the DCE pass being
13 > executed, GCC disables DCE at -O0), and even if it, you're now given a
14 > different program altogether, so if you're looking for a crash, it might
15 > magically disappear (memory areas get cleared out at -O0 but they might be
16 > re-used without clearing at any other -O level).
17
18 If you're feeling adventurous you could try -Og -g with gcc 4.8.
19
20
21 --
22 Ryan Hill psn: dirtyepic_sk
23 gcc-porting/toolchain/wxwidgets @ gentoo.org
24
25 47C3 6D62 4864 0E49 8E9E 7F92 ED38 BD49 957A 8463

Attachments

File name MIME type
signature.asc application/pgp-signature