Debugging a C DLL

Example: sample C program for debugging

Build PUSHPOP.C as a DLL, exporting push() and pop(). Build CALC.C and READTOKN.C as the program that imports push() and pop() from the DLL named PUSHPOP. When the application CALC starts the DLL, PUSHPOP will not be known to z/OS® Debugger. Use the AT APPEARANCE breakpoint to gain control in the DLL the first time code in that compile unit appears, as shown in the following example:
AT APPEARANCE "USERID.MFISTART.C(PUSHPOP)" ;
GO ;
The only purpose of this appearance breakpoint is to gain control the first time a function in the PUSHPOP compile unit is run. When this happens, you can set breakpoints in PUSHPOP.