Generation of debugging information

When the NOMETAL (the default) and DEBUG compiler options are in effect, the compiler either generates debugging information as a separate binary file in DWARF format, or embeds debugging information within the object file in ISD format. When the METAL and DEBUG compiler options are specified, debugging information in both ADATA and DWARF format can be generated. The ADATA debug format allows debugging of the generated HLASM source. The DWARF debug format allows debugging of the original C source.

CDAASMC JCL procedure to generate debugging information

The as command is a z/OS® UNIX System Services utility that invokes the HLASM assembler and can produce debugging information in DWARF format. CDAASMC is the JCL procedure provided with the XL C compiler to do the same thing in a batch environment.
Note: If you wish to use the HLASM ASMLANGX debugging utility, you must first assemble your source with the ADATA assembler option. The CDAASMC JCL procedure allows you to generate both ADATA and DWARF debugging information.

The cataloged CDAASMC JCL procedure invokes CDAHLASM.

Debugging information for the IDF debugger

The Interactive Debug Facility (IDF) is a symbolic debugging tool for assembly language programs. It uses information from the load module file to determine the locations of a program's control sections and external symbols.

Optionally, IDF can make use of additional information to help disassemble the program. The additional information can be generated by specifying the assembler TEST option and the linkage editor TEST option.
Note: The Linkage Editor TEST option can make the final load module file quite large. If you prefer to suppress them, either omit the linkage editor TEST option or specify the NOTEST option.

The Linkage Editor TEST option increases the size of the load module file, so do not use it for production modules.

ADATA debugging information

The ASMLANGX utility extracts source level information from the ADATA debugging information. The output is an extract file. Although you can create extract files as sequential files, they are typically stored in a PDS.

The recommended format for the extract file is:
  RECFM(VB) LRECL(1562) BLKSIZE(27998)
Figure 1. JCL that invokes the ASMLANGX utility
   //ASMLANGX EXEC PGM=ASMLANGX,REGION=4096K,
   // PARM='member (ASM LOUD ERROR'            1 
   //SYSADATA DD DISP=SHR,DSN=hlq..SYSADATA    2 
   //ASMLANGX DD DISP=OLD,DSN=hlq..ASMLANGX    3 
Notes:
  1. The PDS member name of the input and output file is passed as a parameter. For sequential files, this name is ignored.
  2. The SYSADATA DD statement specifies the input data set name.
  3. The ASMLANGX DD statement specifies the output data set name.