Naming CSECTs for Z Abend Investigator
To facilitate source code information, Z Abend Investigator must be able to match CSECT names with the compiler listings or side files provided.
For this to be possible, all CSECTs must be named. Whereas the names of CSECTs in programs written in most high-level languages are automatically assigned, special requirements apply to programs written in C. Failure to follow these requirements prevents source code information from being determined for these types of programs.
CSECT naming requirements for C programs
#pragma csect(code,"csect_name")
Where, if a PDS or PDSE is used, csect_name matches the member name of the compiler listing or LANGX file. This enables the side file search to automatically locate compiler listings.
#pragma csect
option, two sample EXECs are provided in data set HFZ.SHFZSAM1 to facilitate source provision:- HFZSCLST
-
This EXEC can be used to process C compiler listings to extract the C function names from the PPA1 and build an index of function names and their matching listing data set.
- HFZSCPRO
-
This EXEC is a Z Abend Investigator listing exit. It scans the index file created by HFZSCLST and returns the name of the matching listing data set for a given function.