This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Improve debug info for various cases where we drop location info on the floor (PR debug/55608)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org, Tom Tromey <tromey at redhat dot com>
- Date: Wed, 20 Mar 2013 13:19:18 +0100
- Subject: Re: [PATCH] Improve debug info for various cases where we drop location info on the floor (PR debug/55608)
- References: <20121206191401 dot GO2315 at tucnak dot redhat dot com> <CAHACq4qHpGGzpaKTdYO37u7YLkY6+ZQR2JP8W+uWVKC0w=smwg at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Dec 07, 2012 at 11:36:24AM -0800, Cary Coutant wrote:
> > This patch adds DW_AT_const_value or DW_AT_location for unused static vars
> > (thus, not really modified and their DECL_INITIAL can be used for
> > location/constant value info), and optimizes various cases using
> > DW_OP_GNU_implicit_pointer (e.g. DW_OP_addr <symbol> DW_OP_stack_value
> > where symbol is either an optimized away static var (but with DW_AT_location
> > or DW_AT_const_value on it's DIE), which would be otherwise dropped
> > to avoid referencing non-existent symbol, can be replaced with
> > DW_OP_GNU_implicit_pointer to that DIE. Or, if symbol above is a constant string
> > literal, we can create DW_TAG_dwarf_procedure with DW_AT_location
> > DW_OP_implicit_value (and, surprisingly, GDB handles that out of the box).
> > In cc1plus .debug_loc grew with this by about 3% and .debug_info grew by
> > 0.25%, in libstdc++ the changes were in the noise.
> Based on my reading of PR 55608, this isn't really a regression, and
> it's definitely not a regression from 4.7 to 4.8. While the patch
> looks OK to me, the size increase in .debug_loc and the scope of the
> change suggest that this would be more appropriate for when Stage 1
Now that Stage 1 reopened, is this ok for 4.9?