[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::ada

Title:DEC Ada
Notice:Ada is no longer a trademark of the US Government
Moderator:KMOOSE::CMCCUTCHEON
Created:Mon Jan 27 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3874
Total number of notes:16668

3849.0. "DEBUGGER, EXAMINE does not show whole record" by TAV02::ZVI_P (Here we are) Wed Mar 05 1997 11:27

T.RTitleUserPersonal
Name
DateLines
3849.1Restriction; text from V3.3 release notesKMOOSE::CMCCUTCHEONCharlie McCutcheonWed Mar 05 1997 14:0652
Hi, I'm afraid this is a debugging restriction.  From the V3.3
release notes:

        5.6 Debugging Restrictions

              The following restrictions apply when you debug DEC Ada
              programs:

...
              o  A problem occurs when a record's discriminant is used
                 for the size of a record component. In the following
                 example:

                 type VAR_STRING (LEN : INTEGER) is record
                      VALUE : STRING (1..LEN);
                 end record;
                 V : VAR_STRING(10) := (10, "1234567890");

                 Given the command EXAMINE V.VALUE, the debugger
                 displays one character for V.VALUE.
                 The workaround is to give the length of the character
                 string in the debugger command line as in the following
                 example:

                 EXAMINE /asci=10 V.VALUE

...
              o  Record components following variable-sized components
                 cannot be debugged. Digital suggests that if possible
                 you reorder the components in your program for
                 debugging purposes.


In your user's program:

    type List_Type (Size : Length_Type := Length_Type'last) is record
...
        Prev_Handle         : Pointers_Type(1 .. Size);
...


This is the same documented problem, the user is using the record discrimimant
as the size of one of the record components, so the size of that component
is not known by Debug, and the offset to any following record component
is not known either.

Unfortunately, I don't see this restriction ever changing.  This requires
work from the GEM code generator group, and they are busy working on
nifty baselevels that DEC Ada may never see, so new support for this issue
is highly unlikely.

Charlie