diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-25 09:42:41 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-04-25 09:42:41 +0000 |
commit | 0954931c29742fea64063d4fda678604b2894ec8 (patch) | |
tree | f618dae8160d46ea99f359e80da1ab683354f146 /gcc/ada/exp_dbug.ads | |
parent | 4c043c94a3b753b1577f2b4dd9223a0e7cfb11d5 (diff) | |
download | gcc-0954931c29742fea64063d4fda678604b2894ec8.tar.gz |
* exp_dbug.ads: Fix outdated description. Mention link between XVS
and XVZ objects.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Set
XVZ variable as unit size of XVS type.
(maybe_pad_type): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158703 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_dbug.ads')
-rw-r--r-- | gcc/ada/exp_dbug.ads | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/gcc/ada/exp_dbug.ads b/gcc/ada/exp_dbug.ads index 1d26bb3ef75..99a61d4efd3 100644 --- a/gcc/ada/exp_dbug.ads +++ b/gcc/ada/exp_dbug.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1996-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2010, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -853,16 +853,17 @@ package Exp_Dbug is -- The size of the objects typed as x should be obtained from the -- structure of x (and x___XVE, if applicable) as for ordinary types -- unless there is a variable named x___XVZ, which, if present, will - -- hold the size (in bytes) of x. + -- hold the size (in bytes) of x; in this latter case, the size of the + -- x___XVS type will not be a constant but a reference to x___XVZ. -- The type x will either be a subtype of y (see also Subtypes of - -- Variant Records, below) or will contain no fields at all. The layout, - -- types, and positions of these fields will be accurate, if present. - -- (Currently, however, the GDB debugger makes no use of x except to - -- determine its size). + -- Variant Records, below) or will contain a single field of type y, + -- or no fields at all. The layout, types, and positions of these + -- fields will be accurate, if present. (Currently, however, the GDB + -- debugger makes no use of x except to determine its size). - -- Among other uses, XVS types are sometimes used to encode - -- unconstrained types. For example, given + -- Among other uses, XVS types are used to encode unconstrained types. + -- For example, given: -- -- subtype Int is INTEGER range 0..10; -- type T1 (N: Int := 0) is record @@ -873,13 +874,14 @@ package Exp_Dbug is -- the element type for AT1 might have a type defined as if it had -- been written: -- - -- type at1___PAD is record null; end record; + -- type at1___PAD is record F : T1; end record; -- for at1___PAD'Size use 16 * 8; -- - -- and there would also be + -- and there would also be: -- - -- type at1___PAD___XVS is record t1: Integer; end record; + -- type at1___PAD___XVS is record t1: reft1; end record; -- type t1 is ... + -- type reft1 is <reference to t1> -- -- Had the subtype Int been dynamic: -- |