Before you can debug a UCS executable, do the following:
Create a special debug element that contains information that the PADS subsystem uses to call back to the PC at startup.
Statically link the executable to do the following:
Include the special MASM debug element
Include certain debug library OMs
Cause a special PADS entry point to be called at start time
Note: All elements that you want to debug must be in the static link. Debugging a dynamically linked OM is not supported.
Write one of the following static links if one does not exist:
A static link element that is performed in the debug build
A link,i statement in the build
Use the Eclipse IDE for OS 2200 facility to prepare the OS 2200 project for interactive debugging.
Compile any OM that is to be debugged with the DEBUG/FULL and NO-OPTIM options, as in the following example:
@UCOB myFile.UCOBelt,,,,,DEBUG/FULL,NO-OPTIM
Compiling without DEBUG/FULL results in an OM with no debug information, such as line numbers and variables. This causes debugging to stop immediately.
Compiling without NO-OPTIM has indeterminate results.
Refer to Starting an Interactive Debugging Session for more information when you are ready to start debugging.
To prepare an OS 2200 project for interactive debugging, do the following:
Right-click
Project, and select Properties.
The Properties for selected project is displayed.
Select
OS 2200 project properties in the left pane.
The OS 2200 Project Properties page is loaded.
On
the OS 2200 Project Properties page, navigate to the OS
2200 Debug Setup tab in the OS 2200 project properties.
The following fields appear with default values:
Debug
Callback ID
The ID of the program calling back, to verify
that it is the one being debugged.
Debug
Callback Port Number
The port on which the PC communicates
Callback IP Address
The address of the PC that performs the debugging
MASM Element Name
The list of Meta Assembler (MASM) elements to debug different types of elements in the same project.
OS 2200 Debug Library Name
The debug library containing Object Modules, mentioned previously, that is statically linked to the executable
Add these lines to the static link
A set of lines to be added to the static link of the executable.
Select
the Use Debug Build check box.
Note: The
MASM Debug Element will be generated only if this option is selected.
Click Apply to commit the field values to the project properties.
Click
OK to generate the MASM debug element.
Note:
If you choose to key in the required fields and click OK (without using the Restore Defaults and Apply button) the MASM element are generated.
A new debug MASM element is generated only if there are no prior existing debug elements with the same name.
More than one MASM element can be created to debug different types of elements in the same project. Each MASM debug element must have a unique name.
Select the Use Debug Build check box if you want the OS 2200 to use the build stream from the debug setup.
Clear
the Use Debug Build check box after you finish debugging to
perform a normal build.
Notes:
The output of the normal build and the output of the debug build can be different.
Ensure that the new level of the libraries are loaded in OS 2200 because the PADS debug libraries have changed since the last release. In addition, ensure that the new level eclipse2200*pads$lib36 is used in the MASM debug element and is included in the static link of the OM. This library is the default for this release of Eclipse OS 2200
To revert to the default values in the fields, click Restore Defaults.