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

Conference turris::debug

Title:DEBUG
Notice:Updated locations for reporting QARs -- see note 834.1
Moderator:LOWFAT::DIETER
Created:Fri Jan 24 1986
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1868
Total number of notes:8200

1842.0. "DEBUG ADA: EXAMINE does not show whole record" by TAV02::ZVI_P (Here we are) Wed Mar 05 1997 08:33

This is a copy of a notr I submitted to ADA conference. It is a DEBUGGER
problem so I post it also here.
		
		Thanks	
		Zvi

            <<< TURRIS::DISK$NOTES_PACK:[NOTES$LIBRARY]ADA.NOTE;2 >>>
                                  -< DEC Ada >-
================================================================================
Note 3849.0       DEBUGGER, EXAMINE does not show whole record        No replies
TAV02::ZVI_P "Here we are"                          274 lines   5-MAR-1997 08:27
--------------------------------------------------------------------------------
Hi

 A customer problem: 
 
 The debugger EXAMINE command does not show all the fields of a record.

 The customer supplied a reproducer, we reproduced it on OVMS ALPHA 6.2
 with ALPDEBU05_070 (debugger patch) and ADA 3.3-7 .

 problem will be described by a log of a session.

 ORTAL_PALGY> run digital_check

         OpenVMS Alpha DEBUG Version V6.2-103R

%DEBUG-I-INITIAL, language is ADA, module set to DIGITAL_CHECK
%DEBUG-I-NOTATMAIN, type GO to get to start of main program

DBG> Go
break at routine DIGITAL_CHECK
     3: procedure digital_check is
DBG> set br %lin 25
DBG> typ 25
module DIGITAL_CHECK
    25:     For Counter in 1..20 loop
DBG> g
break at DIGITAL_CHECK.%LINE 25
    25:     For Counter in 1..20 loop
DBG> Step
stepped to DIGITAL_CHECK.BLOCK$25.%LINE 26
    26:         Data_Array(Counter) := "DROR      ";
DBG> Step
stepped to DIGITAL_CHECK.BLOCK$25.%LINE 27
    27:         Digital_Check.Unchecked_Insert(list=> Digital_List,
DBG> Step
stepped to DIGITAL_CHECK.BLOCK$25.%LINE 31
    31:     end loop;
DBG> ex digital_list
DIGITAL_CHECK.DIGITAL_LIST
    SIZE:       20
    LENGTH_ALLOCATED:   1
    LENGTH_USED:        1
    FREE_LIST_FIRST_IDX:        0
    FREE_LIST_LAST_IDX: 0
    USED_LIST_FIRST_IDX:        1
    USED_LIST_LAST_IDX: 1
    PREV_HANDLE
        (1):    0            <<<<*********** 19 more elements missing.
 
******>>>>
***>>>>>>>   Also missing are the components: 
***>>>>>>>                                    
***>>>>>>>    Next_Handle, Key_Warehouse and Data_Warehouse


DBG> sho symb/typ PREV_HANDLE
record component DIGITAL_CHECK.LIST_TYPE.PREV_HANDLE
    noncontiguous array descriptor type, 1 dimension, bounds: [1:1], size:
2 byt
es
        cell type: subrange type, size: 2 bytes, range: 0..20
            parent type: atomic type, word integer, size: 2 bytes
DBG>
          *******>>>> The debugger wrongly parses the data type ****

The definition of "Digital_List" is:

In File: DIGITAL_CHECK.ADC

    package Digital_check is new static_list(Integer_Range,
                                             Data_Type,
                                             max_list_length,
                                             minimum_free_list_size,
                                             complex_packing);
    subType Digital_List_Type is Digital_Check.List_Type;
    Integer_Range_Data : Integer_Range;
    Digital_list : Digital_List_Type;



In File: STATIC_LIST_.ADC

    type List_Type (Size : Length_Type := Length_Type'last) is record
        Length_Allocated    : Length_Type := 0; -- position of the "farest"
                                                -- element in buffer
        Length_Used         : Length_Type := 0; -- number of elements currently
                                                -- in buffer
        Free_List_First_Idx : Handle_Type := NULL_HANDLE;
        Free_List_Last_Idx  : Handle_Type := NULL_HANDLE;
        Used_List_First_Idx : Handle_Type := NULL_HANDLE;
        Used_List_Last_Idx  : Handle_Type := NULL_HANDLE;
        Prev_Handle         : Pointers_Type(1 .. Size);
        Next_Handle         : Pointers_Type(1 .. Size);

        Key_Warehouse   : Keys_Warehouse_Type(1 .. Size);
        Data_Warehouse  : Data_Warehouse_Type(1 .. Size);
    end record;
 

On OVMS VAX 6.2 with VAXDEBU05_070 and  ADA 3.3-8 this works fine:


...
DBG> ex Digital_List
DIGITAL_CHECK.DIGITAL_LIST
    SIZE:       20
    LENGTH_ALLOCATED:   1
    LENGTH_USED:        1
    FREE_LIST_FIRST_IDX:        0
    FREE_LIST_LAST_IDX: 0
    USED_LIST_FIRST_IDX:        1
    USED_LIST_LAST_IDX: 1
    PREV_HANDLE
        (1):    0
        (2):    31548
        (3):    0
        (4):    11080
        (5):    32748
        (6):    -28925
        (7):    0
        (8):    11080
        (9):    32748
        (10):   29926
        (11):   0
        (12):   11080
        (13):   32748
        (14):   -29601
        (15):   0
        (16):   11080
        (17):   32748
        (18):   29275
        (19):   0
        (20):   11080
    NEXT_HANDLE
        (1):    0
        (2):    -30234
        (3):    0
        (4):    11080
        (5):    32748
        (6):    29112
        (7):    0
        (8):    11080
        (9):    32748
        (10):   -30794
        (11):   0
        (12):   11080
        (13):   32748
        (14):   28996
        (15):   0
        (16):   11080
        (17):   32748
        (18):   -31561
        (19):   0
        (20):   11080
    KEY_WAREHOUSE
        (1):    1
        (2):    726138880
        (3):    -2092269588
        (4):    726138880
        (5):    1869185004
        (6):    726138880
        (7):    -2115403796
        (8):    726138880
        (9):    1858109420
        (10):   726138880
        (11):   2145484780
        (12):   726138880
        (13):   1848999916
        (14):   726138880
        (15):   2126479340
        (16):   726138880
        (17):   1842380780
        (18):   726138880
        (19):   -1848541204
        (20):   726138880
    DATA_WAREHOUSE
        (1)(1..10):     "DROR      "
        (2)(1..10):     "........k"
        (3)(1..10):     "..H+�.Z..."
        (4)(1..10):     "H+�.Qk..H+"
        (5)(1..10):     "�.+...H+�."
        (6)(1..10):     "Wj..H+�.x."
        (7)(1..10):     "..H+�..i.."
        (8)(1..10):     "H+�.}...H+"
        (9)(1..10):     "�.�h..H+�."
        (10)(1..10):    "...H+�.g"
        (11)(1..10):    "..H+�.�..."
        (12)(1..10):    "H+�.bg..H+"
        (13)(1..10):    "�.�...H+�."
        (14)(1..10):    "�f..H+�.."
        (15)(1..10):    "..H+�.}.."
        (16)(1..10):    "H+�.�...H+"
        (17)(1..10):    "�.<:..�.."
        (18)(1..10):    ".........."
        (19)(1..10):    "..... �.�."
        (20)(1..10):    "..�..�..&�"


 The sources are at:


$ dir ppantr::$2$DKB200:[IPMT.ADA_DBG2]

Directory PPANTR::$2$DKB200:[IPMT.ADA_DBG2]

ARRAY_STORAGE_MANAGEMENT.ADC;2
                           5/7         3-MAR-1997 10:57:46.00
ARRAY_STORAGE_MANAGEMENT_.ADC;2
                           3/7         3-MAR-1997 10:57:40.00
DIGITAL_CHECK.ADC;8
                           4/7         3-MAR-1997 11:10:49.00
HASH_TYPES_.ADC;1          2/7         3-MAR-1997 10:51:21.00
INTEGER_LNM.ADC;1          1/7         3-MAR-1997 10:49:08.00
INTEGER_LNM_.ADC;1         2/7         3-MAR-1997 10:47:24.00
IS_BLANK.ADC;1             1/7         3-MAR-1997 10:54:18.00
LIST_HANDLE_TYPES_.ADC;1
                           2/7         2-MAR-1997 16:39:56.00
LNM.ADC;1                  6/7         3-MAR-1997 10:48:54.00
LNM_.ADC;1                 3/7         3-MAR-1997 10:48:49.00
PACK_TYPES.ADC;5           9/14        3-MAR-1997 10:58:14.00
PACK_TYPES_.ADC;3         18/21        3-MAR-1997 10:58:06.00
REGULAR_HASHING.ADC;1
                           5/7         3-MAR-1997 10:46:05.00
REGULAR_HASHING_.ADC;1
                           2/7         3-MAR-1997 10:45:58.00
SEMAPHORE.ADC;1            2/7         3-MAR-1997 11:01:31.00
SEMAPHORE_.ADC;1           2/7         3-MAR-1997 11:01:26.00
STANDARD_PRINT.ADC;2
                          18/21        3-MAR-1997 10:55:06.00
STANDARD_PRINT_.ADC;2
                          10/14        3-MAR-1997 10:54:58.00
STATIC_LIST.ADC;1         95/98        2-MAR-1997 16:49:12.00
STATIC_LIST_.ADC;1        63/63        2-MAR-1997 16:40:08.00
STORAGE_HASHED_LIST.ADC;1
                          45/49        3-MAR-1997 10:51:57.00
STORAGE_HASHED_LIST_.ADC;1
                          23/28        3-MAR-1997 10:51:51.00
STORAGE_TRACE.ADC;1
                          13/14        3-MAR-1997 11:03:13.00
STORAGE_TRACE_.ADC;3
                           4/7         3-MAR-1997 11:03:05.00
STORAGE_TRACE__ADD.ADC;1
                           3/7         3-MAR-1997 11:08:11.00
STORAGE_TRACE__CONVERT_NAME.ADC;1
                           2/7         3-MAR-1997 11:06:12.00
STORAGE_TRACE__POINT.ADC;1
                           2/7         3-MAR-1997 11:07:38.00
STORAGE_TRACE__PRINT_ADDRS.ADC;1
                           7/7         3-MAR-1997 11:09:04.00
STORAGE_TRACE__PRINT_TRACE_LINE.ADC;1
                           6/7         3-MAR-1997 11:07:03.00
STORAGE_TRACE__REMOVE.ADC;1
                           3/7         3-MAR-1997 11:08:42.00
TIME_DEFAULTS_.ADC;1
                           3/7         2-MAR-1997 16:43:22.00
TIME_SERVICES.ADC;2
                          42/42        3-MAR-1997 10:54:26.00
TIME_SERVICES_.ADC;2
                          14/14        3-MAR-1997 10:53:24.00

Total of 33 files, 420/532 blocks.
$

Note: files type is ADC .

After compilation link by:

 $ acs lin/deb DIGITAL_CHECK

 DIGITAL_CHECK is the image to be created.


			Thanks
			Zvi
T.RTitleUserPersonal
Name
DateLines
1842.1LOWFAT::DIETERWed Mar 05 1997 09:476
Can you please include a .COM procedure which specifies the 
compilation order?  Else, you could provide a shorter example...

thanks,
Mary
1842.2DCL Commands attached hereTAV02::ZVI_PHere we areWed Mar 05 1997 10:4615
Hi Mary

 The compilation is pretty short.

 do the following:

 $ acs cre lib <dir spec>
 $ acs set lib <dir spec>
 $ set def <sources location>
 $ acs load *
 $ acs comp/deb/noop *
 $ acs lin/deb digital_check
 $ run digital_check
....
		Zvi
1842.3should be: $acs load *.adcTAV02::ZVI_PHere we areWed Mar 05 1997 10:5110
-.2
  Sorry 4th dcl command should be:

   $ acs load *.adc  

   The default file type is ada, and I supplied *.adc which they extracted
   from their acs library.

		Zvi

1842.4LOWFAT::DIETERThu Mar 06 1997 09:5817
doesn't like it:

DBGAVC::[DIETER.WORK]: acs comp/deb/noop *
%ACS-I-CL_NEWUNIT1, generic package ADDRESS_OPERATIONS was compiled by a newer
        compiler (V3.3-7  ) and cannot be used by the current compiler (V3.0A-7
        )
%ACS-I-CL_NEWUNIT1, generic package body ADDRESS_OPERATIONS was compiled by a
        newer compiler (V3.3-7  ) and cannot be used by the current compiler
        (V3.0A-7 )


Can you please provide the sources to a _short_ example which demonstrates
this problem?

thanks,
Mary
1842.5It is a documented restriction of ADATAV02::ZVI_PHere we areMon Mar 10 1997 10:1251
Mary 

 The ADA team directed me to ADA 3.3 release notes. (ADA notes conf.
   3849.1)


 There is a section named: 

 5.6 Debugging Restrictions

  ...
   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.
   ...

    This is our case, so we stopped working on that.

-----------------------

  As to your case:

>%ACS-I-CL_NEWUNIT1, generic package ADDRESS_OPERATIONS was compiled by a newer
>        compiler (V3.3-7  ) and cannot be used by the current compiler (V3.0A-7
>        )
>%ACS-I-CL_NEWUNIT1, generic package body ADDRESS_OPERATIONS was compiled by a
>        newer compiler (V3.3-7  ) and cannot be used by the current compiler
>        (V3.0A-7 )

I assume you used some existing acs library with some old stuff.
"ADDRESS_OPERATIONS" is not mentioned in our sources.

The shortest way to produce the problem is to create a new ACS library.

To be on the safe side I use to :

 $ acs cre lib <lib1 file spec>
 $ acs cre sublib <lib2 file spec>/parent= <lib1 file spec>

   ... so that the work lib will not contained the ADA's predefined stuff
   ... and will contain only the problem stuff.
  
 $ acs set lib <lib2 file spec>

  and then load compile and link.

		Thanks
		Zvi


1842.6KMOOSE::CMCCUTCHEONCharlie McCutcheonFri Mar 14 1997 11:246
> It is a documented restriction of ADA

On OpenVMS Alpha (only).

Charlie
DEC Ada