The
source debugger
APIs are divided into the following functional areas:
- Debug Session Control APIs and Exit Programs
These APIs are used to start and end the source debug session, determine
which programs, modules, and views are referenced, and control certain attributes of the debug environment
- Change Current Thread (QteChangeCurrentThread)
changes the current thread to any thread being debugged.
- Change Thread Status (QteChangeThreadStatus) changes
the debug status for threads being debugged.
- End Source Debug (QteEndSourceDebug) takes the job
out of debug mode.
- Retrieve Debug Attribute (QteRetrieveDebugAttribute)
retrieves the attributes of the source debug session.
- Retrieve Debugged Threads (QteRetrieveDebuggedThreads)
retrieves information for threads being debugged.
- Retrieve Module Views (QteRetrieveModuleViews) returns
to the caller the list of modules and views that are associated with a specific ILE or OPM program.
Retrieve Source Path Name (QteRetrieveSourcePathName) returns
the full source path name for a Java source file.
- Set Debug Attribute (QteSetDebugAttribute) sets the attributes of the source
debug session.
- Start Source Debug (QteStartSourceDebug) enables your session to use the source
debugger.
- Stop Debugged Job (QteStopDebuggedJob)
causes debug to halt all threads in a job being debugged.
- Program Stop Handler exit program is registered on the Start Source Debug API.
This program is called by the source debugger support when an ILE
or OPM
program stops at a breakpoint or for other reasons.
- Debug Session Handler exit program manages the
source debugger, telling it when to start, stop,
and display its screens.
This program is registered on the Start Debug Command.
- View Information APIs
These APIs retrieve view information, including view text information and
view mapping information,
and allow the program to set parameters
associated with a view.
- Map View Position (QteMapViewPosition) maps positions from one view to
another view within the same program and module.
- Register Debug View (QteRegisterDebugView) registers a view of a module, which allows
a program to be debugged in terms of that view.
- Remove Debug View (QteRemoveDebugView) removes a view of a module that was
previously registered by the Register Debug View API.
This is necessary when a program is to be removed from debug
mode so it can be deleted and recompiled.
- Retrieve Statement View (QteRetrieveStatementView)
returns the statement view and related information.
- Retrieve Stopped Position (QteRetrieveStoppedPosition) determines if a program is on
the call stack and indicates the position in the view at
which the program is stopped if it is on the stack.
- Retrieve View File (QteRetrieveViewFile) returns all the files and text information
necessary to construct the text for a view.
- Retrieve View Line Information (QteRetrieveViewLineInformation)
returns information about the specified number of lines in a
registered view.
- Retrieve View Text (QteRetrieveViewText) retrieves source text from the
specified view.
- Debug Command API
Debug commands are a part of the API that takes on
free-form expressions.
They are referred to as the debug language that
the program may supply to the source debugger support.
- Submit Debug Command
- (QteSubmitDebugCommand) allows a program to issue
debug language statements.
Debug language statements permit programs to enter
breakpoints, run one or more statements of a program being debugged,
and evaluate expressions.
- Fast-path Debugger APIs
The APIs allow the caller to bypass the generalized
Debug Command API for some of the simpler
but more common source debugging functions.
- Add Breakpoint (QteAddBreakpoint) adds a breakpoint to the specified location
in a registered view.
- Remove Breakpoint (QteRemoveBreakpoint) removes a breakpoint from the specified location
in a registered view.
- Remove All Breakpoints (QteRemoveAllBreakpoints) removes all breakpoints from
all modules in a program.
- Step (QteStep) adds a step to a program specifying that the
program will run one or more statements after which program
processing is suspended.
To use a
source debugger
API, the application must bind to the service program QTEDBGS in
library QSYS.
All source debugger API functions
are then available to the application.
For a coding example of how to write a
source debugger,
see "Using Source Debugger APIs" in the API examples.