summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_dbug.ads
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-14 19:27:21 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-14 19:27:21 +0000
commitcf07a5908aeeb95b9662cb7b523d30a61cc15cce (patch)
tree60a554690ff540bb38e350af14ceebfd44fee09f /gcc/ada/exp_dbug.ads
parente38def9ca7953bb5611d08ce8617249516ba5a99 (diff)
downloadgcc-cf07a5908aeeb95b9662cb7b523d30a61cc15cce.tar.gz
* exp_dbug.ads (Packed Array Encoding): Document the new encoding for
the unconstrained case. * gcc-interfaces/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Implement the encoding. Do not give a name to the pointer type to the XUT type. * gcc-interfaces/utils.c (gnat_pushdecl): Propagate DECL_ORIGINAL_TYPE for fat pointer types, if any. Make sure DECL_ARTIFICIAL is cleared on nodes with DECL_ORIGINAL_TYPE set. (update_pointer_to): Set DECL_ORIGINAL_TYPE to the original pointer for fat pointer types. Make sure DECL_ARTIFICIAL is cleared. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151697 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_dbug.ads')
-rw-r--r--gcc/ada/exp_dbug.ads26
1 files changed, 21 insertions, 5 deletions
diff --git a/gcc/ada/exp_dbug.ads b/gcc/ada/exp_dbug.ads
index 2b30248a78c..3c3144641d8 100644
--- a/gcc/ada/exp_dbug.ads
+++ b/gcc/ada/exp_dbug.ads
@@ -1094,8 +1094,8 @@ package Exp_Dbug is
-- Packed Array Encoding --
---------------------------
- -- For every packed array, two types are created, and both appear in
- -- the debugging output.
+ -- For every constrained packed array, two types are created, and both
+ -- appear in the debugging output:
-- The original declared array type is a perfectly normal array type,
-- and its index bounds indicate the original bounds of the array.
@@ -1110,12 +1110,27 @@ package Exp_Dbug is
-- ttt___XPnnn
-- where
+
-- ttt is the name of the original declared array
-- nnn is the component size in bits (1-31)
- -- When the debugger sees that an object is of a type that is encoded
- -- in this manner, it can use the original type to determine the bounds,
- -- and the component size to determine the packing details.
+ -- When the debugger sees that an object is of a type that is encoded in
+ -- this manner, it can use the original type to determine the bounds and
+ -- the component type, and the component size to determine the packing
+ -- details.
+
+ -- For an unconstrained packed array, the corresponding packed array type
+ -- is neither used in the generated code nor for debugging information,
+ -- only the original type is used. In order to convey the packing in the
+ -- debugging information, the compiler generates the associated fat- and
+ -- thin-pointer types (see the Pointers to Unconstrained Array section
+ -- below) using the name of the corresponding packed array type as the
+ -- base name, i.e. ttt___XPnnn___XUP and ttt___XPnnn___XUT respectively.
+
+ -- When the debugger sees that an object is of a type that is encoded in
+ -- this manner, it can use the type of the fields to determine the bounds
+ -- and the component type, and the component size to determine the packing
+ -- details.
-------------------------------------------
-- Packed Array Representation in Memory --
@@ -1257,6 +1272,7 @@ package Exp_Dbug is
-- fat-pointer type whose name is "arr___XUP", where "arr" is the name
-- of the array type, and use it to represent the array type itself in
-- the debugging information.
+
-- For each pointer to this unconstrained array type, the compiler will
-- generate a typedef that points to the above "arr___XUP" fat-pointer
-- type. As a consequence, when it comes to fat-pointer types: