From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cdaa3abe008a8f57 X-Google-Attributes: gid103376,public From: Sam Carnicelli Subject: Re: Ada Type Information Date: 1999/03/08 Message-ID: <36E3DAB9.7D492027@lmco.com>#1/1 X-Deja-AN: 452573159 Content-Transfer-Encoding: 7bit References: <36E03843.3AD74457@lmco.com> <7bpohc$j2t$1@nnrp1.dejanews.com> Content-Type: text/plain; charset=us-ascii Organization: Lockheed Martin OR&SS Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-03-08T00:00:00+00:00 List-Id: dewar@gnat.com wrote: > > In article <36E03843.3AD74457@lmco.com>, > Sam Carnicelli > wrote: > > > I've been lurking around this newsgroup for a couple of > > weeks and I thought some of the people here might be able > > to offer some valuable advice. > > Since you mention the -gnatR switch in the latest 3.12 > GNAT technology, let me say exactly what this does. For > all named array and record types in the program it gives > the type name, and the representation characteristics. > > I must say I am a bit puzzled as to why this does not > give you all the information you want. Here is some sample > output from -gnatR: > > Source > ------ > > procedure q is > type r is record > a : integer := 0; > s : string (1 .. 5); > t : integer; > end record; > begin > null; > end q; > > Output from -gnatR > ------------------ > > Representation information for unit q > -------------------------------------- > > for r'Object_Size use 128; > for r use record > a at 0 range 0 .. 31; > s at 4 range 0 .. 39; > t at 12 range 0 .. 31; > end record; > This tells me the layout of the record, but not the types of the components. Assume I was trying to write a graphical debugger and wanted to display an object of this type to the user. Would this data be sufficient? I would also need type information. If one of the components of record type r was itelf a record, I would need to decompose it further, and so on... -- ------------------------------------------------------------------ Sam Carnicelli Lockheed Martin Phone : 315-456-2881 Syracuse, NY 13221-4840 Fax : 315-456-0107 e-mail: samuel.charles.carnicelli@lmco.com ------------------------------------------------------------------