* [Ada] Fix glitch in debug info for renaming
@ 2016-12-07 12:04 Eric Botcazou
0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2016-12-07 12:04 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 447 bytes --]
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
[-- Attachment #2: p.diff --]
[-- Type: text/x-patch, Size: 492 bytes --]
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-07 12:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-07 12:04 [Ada] Fix glitch in debug info for renaming Eric Botcazou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).