This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Fix glitch in debug info for renaming
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 07 Dec 2016 13:04:44 +0100
- Subject: [Ada] Fix glitch in debug info for renaming
- Authentication-results: sourceware.org; auth=none
GDB cannot inspect renamings declared at library level when it relies on the
special __XR variable generated as per the GNAT encodings.
Tested on x86_64-suse-linux, applied on the mainline.
2016-12-07 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): When they are global,
consider ___XR GNAT encodings variables for renamings as static so
they have a location in the debug info.
--
Eric Botcazou
Index: gcc-interface/decl.c
===================================================================
--- gcc-interface/decl.c (revision 243340)
+++ gcc-interface/decl.c (working copy)
@@ -672,6 +672,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entit
VAR_DECL, gnu_entity_name, gnu_type);
SET_DECL_VALUE_EXPR (gnu_decl, value);
DECL_HAS_VALUE_EXPR_P (gnu_decl) = 1;
+ TREE_STATIC (gnu_decl) = global_bindings_p ();
gnat_pushdecl (gnu_decl, gnat_entity);
break;
}