Testing and Debugging Considerations [ Switch Programming User's Guide ] MPE/iX 5.0 Documentation
Switch Programming User's Guide
Testing and Debugging Considerations
You must test Switch stubs and inline Switches in the run-time
environment on an MPE XL-based system. You must either compile the stub
and install the compiled version in the appropriate system library or
merge it with the code requiring the Switch call and recompile that
merged source. You can also compile the stub and then link it with the
USL/SOM file for the program that calls it. Before you can verify
correct execution of the stub, the target procedure that Switch is to
invoke must be present in the appropriate callable library of the other
mode. You can use the MPE XL debug facilities to troubleshoot, should
you encounter problems.
The following are testing and debugging considerations that apply
specifically to switches in the NM--> CM direction:
* Verify that the other-mode procedure operates correctly by calling it
from its own mode.
* Verify that the switch worked correctly by checking its status
parameter return. It should be all zeros.
* Verify that the method and number of parameters of the target
procedure are correctly specified.
* Verify that the parameter types in the parms descriptor array are
correct.
* Verify that the parameters for the function return length and
function return value were correctly specified (if applicable).
* Verify that name lengths are correct.
* Verify that HPLOADCMPROCEDURE succeeded (by checking the status
parameter return) before calling HPSWITCHTOCM.
* Insure that array lengths specified in the parms descriptor array are
not longer than the actual arrays being passed. If you must specify
an array length longer than the actual length, then make sure the
array is an input/output parameter, rather than output alone.
MPE/iX 5.0 Documentation