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 <dero...@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;
}