diff options
author | Pierre-Marie de Rodat <derodat@adacore.com> | 2017-06-01 14:06:37 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2017-06-01 14:06:37 +0000 |
commit | 2ded3754ad63a2eb375b34e2719303ec673cc72f (patch) | |
tree | f97bfb3229e74b8b7cb0be754b8a86319ff4f709 /gcc/c | |
parent | e34fd4dc1c10ff16eebd39318d90ad6f68e15ae7 (diff) | |
download | gcc-2ded3754ad63a2eb375b34e2719303ec673cc72f.zip gcc-2ded3754ad63a2eb375b34e2719303ec673cc72f.tar.gz gcc-2ded3754ad63a2eb375b34e2719303ec673cc72f.tar.bz2 |
DWARF: add DW_AT_location for global decls with DECL_VALUE_EXPR
In GNAT, we materialize renamings that cannot be described in standard
DWARF as synthetic variables that describe how to fetch the renamed
object. Look for "___XR" in gcc/ada/exp_dbug.ads for more details about
this convention.
In order to have a location for these variables in the debug info (GDB
requires it not to discard the variable) but also to avoid allocating
runtime space for them, we make these variable hold a DECL_VALUE_EXPR
tree. However, since GCC 7, the DWARF back-end no longer generates a
DW_AT_location attribute for those. This patch is an attempt to restore
this attribute.
gcc/
* dwarf2out.c (dwarf2out_late_global_decl): Add locations for
symbols that hold a DECL_VALUE_EXPR.
gcc/testsuite/
* debug12.adb, debug12.ads: New testcase.
From-SVN: r248792
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions