This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Combine location with block using block_locations
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Robert Dewar <dewar at adacore dot com>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, Dehao Chen <dehao at google dot com>, Xinliang David Li <davidxl at google dot com>, Michael Matz <matz at suse dot de>, Diego Novillo <dnovillo at google dot com>, Dodji Seketeli <dodji at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>, Tom Tromey <tromey at redhat dot com>, Jason Merrill <jason at redhat dot com>, Richard Henderson <rth at redhat dot com>
- Date: Thu, 13 Sep 2012 15:38:43 +0200
- Subject: Re: [PATCH] Combine location with block using block_locations
- References: <CAO2gOZV8SP-sOVEJBEsvF+M3yiKwtw7yWarfhZ1xeCVYjE_7KA@mail.gmail.com> <alpine.LNX.2.00.1209111728160.9940@wotan.suse.de> <CAO2gOZU0v3TeuLDLN02OCVPOht7JYg+tGU=UEJEdN_42fGFsTw@mail.gmail.com> <CAO2gOZWkn99pRrdp=0YjujpJvdtWXXq7LTRghU1+Ujq7E1ZoXg@mail.gmail.com> <CAFiYyc1Jb0ya49ny17c83sok_t3J4M9oN-K0G5-yTP=a+EVkwA@mail.gmail.com> <CAAkRFZ+CX3475JCSzqTspfqhkH363VJLUE1OVq5gsDrFpudu4w@mail.gmail.com> <CAO2gOZWMwDGLXXZ1oyd5Hiqvb9uJmUs+ZLAzhEanyvaF8Lvj=w@mail.gmail.com> <CAO2gOZWKDceuDo_pdxvn4-9o0SdEvaNSVHjJ-sJwp56GqnD=oA@mail.gmail.com> <CAFiYyc2te+pKYOzYV1aGusQB=R_onBAa+LeQ=muZUxgmOA0CSA@mail.gmail.com> <5051E0A0.4050702@adacore.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Sep 13, 2012 at 09:33:20AM -0400, Robert Dewar wrote:
> On 9/13/2012 8:00 AM, Richard Guenther wrote:
>
> >Because doing so would create code generation differences -g vs. -g0.
>
> Sometimes I wonder whether the insistence on -g not changing code
> generation is warranted. In practice, gdb for me is so weak in handling
It is. IMHO the most important reason is not that somebody would build
first with just -O2 and then later on to debug the code would build it again
with -g -O2 and hope the code is the same, but by making sure -g vs. -g0
doesn't change generate code we ensure -g doesn't pessimize the generated
code, and really many people compile even production code with -g -O2
or similar. The debug info is then either stripped, or stripped into
separate files/not shipped or only optionally shipped with the product.
Jakub