Traditional compiler listing tables

Depending on which .START and/or compiler options you’ve set, the compiler might generate one or more tables in the compiler listing at the end of each routine. The two listing tables that are currently available are as follows:

Sample listing tables

TABLES   Mon Feb  9 13:01:15 2009   DBL Version 9.1.5a  Compiler  Page: 1
                                         /usr2/tables.dbl                    
    1          ;
    2          ; tables.dbl
    3          ;
    4          ; Shows examples of compiler listing tables
    5          ;
    6          
    7          record
    8              avar        ,a50
    9              group grp   ,[20]a
    10                 fld1    ,d3
    11                 fld2    ,a3
    12             endgroup
    13             dvar        ,d8
    14             idvar       ,d8.4
    15         
    16         proc
    17             avar = idvar + dvar
    18             idvar = grp[4].fld1
    19             xcall sub1(4, dvar)
    20         end

Symbol Table Offsets
----------------------
AVAR                              0
DVAR                              1
FLD1                              3 (GRP.)
GRP                               4
IDVAR                             2
    21         
    22         subroutine sub1
    23         arg_1   ,d
    24         arg_2   ,d
    25         record rec
    26             avar        ,a8
    27         proc
    28             avar = arg_1
    29             xcall sub2
    30             return
    31         end

Symbol Table Offsets
----------------------
ARG_1                            -1
ARG_2                            -2
AVAR                              0 (REC.)
    32         
    33         subroutine sub2
    34         record
    35             dvar        ,d8
    36             avar        ,a4
    37         proc
    38             dvar = avar
    39         end

Symbol Table Offsets
----------------------
AVAR                              1
DVAR                              0

TABLES   Mon Feb  9 13:01:15 2009   DBL Version 9.1.5a   Compiler Page: 2
                                         /usr2/tables.dbl                    

Errors:         0, in file /usr2/tables.dbl
dbl -il tables_i tables

TABLES   Mon Feb  9 13:01:20 2009   DBL Version 9.1.5a  Compiler  Page: 1
                                          /usr2/tables.dbl                    
    1          ;
    2          ; tables.dbl
    3          ;
    4          ; Shows examples of compiler listing tables
    5          ;
    6          
    7          record
    8              avar        ,a50
    9              group grp   ,[20]a
    10                 fld1    ,d3
    11                 fld2    ,a3
    12             endgroup
    13             dvar        ,d8
    14             idvar       ,d8.4
    15         
    16         proc
    17             avar = idvar + dvar
    18             idvar = grp[4].fld1
    19             xcall sub1(4, dvar)
    20         end
    Memory Usage Summary
    --------------------
    FXDCTL      =      A0
    DATA        =      BC
    CODE        =      20
    LITERAL     =       4
    DESCR       =      40
    LINCTL      =      30
    ADDR        =       4
    FXD4CTL     =       4
    STKREC      =       0
    DYNCTL      =       0
    Total size:     1F8
    21         
    22         subroutine sub1
    23         arg_1   ,d
    24         arg_2   ,d
    25         record rec
    26             avar        ,a8
    27         proc
    28             avar = arg_1
    29             xcall sub2
    30             return
    31         end

    Memory Usage Summary
    --------------------
    FXDCTL      =      A4
    DATA        =       8
    CODE        =       C
    LITERAL     =       0
    DESCR       =       8
    LINCTL      =      30
    ADDR        =       4
    FXD4CTL     =       4
    STKREC      =       0
    DYNCTL      =       0
    Total size:      F8

TABLES    Mon Feb  9 13:01:20 2009   DBL Version 9.1.5a  Compiler Page: 2
                                             /usr2/tables.dbl                    
    32         
    33         subroutine sub2
    34         record
    35             dvar        ,d8
    36             avar        ,a4
    37         proc
    38             dvar = avar
    39         end
    Memory Usage Summary
    --------------------
    FXDCTL      =      A0
    DATA        =       C
    CODE        =       8
    LITERAL     =       0
    DESCR       =      10
    LINCTL      =      2C
    ADDR        =       4
    FXD4CTL     =       4
    STKREC      =       0
    DYNCTL      =       0
    Total size:      F8
Errors:         0, in file /usr2/tables.dbl
dbl -ml tables_m tables

An explanation of the compiler listing table

Symbol table offsets table

If you set the symbol table offsets option (for example, -i on Windows and Unix) when you invoke the compiler, the compiler generates a list of every symbol referenced in the preceding routine with its offsets into the symbol table. You can use these offsets to reference symbols while debugging a program that was not compiled and linked with the debug option. (If you compile and link with the debug option, you can reference the symbols by their names as opposed to their offsets.)

You can turn the listing of this table on and off with the [NO]OFFSETS option of the .START compiler directive. See .START for more information about the .START options.

If a symbol is a member of a group or a named data structure (as “AVAR” is in the second table in Sample listing tables), the path to that symbol is also listed in the table. Also notice the “(GRP.)” next to the entry for “FLD1” in the first table.

Memory usage summary table

The compiler generates a memory usage summary table at the end of each routine when you set the memory compiler option (for example, -m on Windows and Unix). The memory usage summary table lists the size (in bytes) of each program component. The size is represented as a hexadecimal number.

You can turn the listing of this table on and off with the [NO]summary option of the .START compiler directive. See .START for more information about the .START options.