Debugging a C++ DLL
Example: sample C++ program for debugging
Build PUSHPOP.CPP as a DLL, exporting IntStack::push(int) and IntStack::pop(). Build
CALC.CPP and READTOKN.CPP as the program that imports IntStack::push(int) and IntStack::pop() from the
DLL named PUSHPOP. When the application CALC starts, the DLL PUSHPOP
is not known to z/OS® Debugger. Use
the
AT APPEARANCE
breakpoint, as shown in the following
example, to gain control in the DLL the first time code in that compile
unit appears. AT APPEARANCE "USERID.MFISTART.CPP(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.