HLASM Toolkit Feature Interactive Debug Facility User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


BREAK

HLASM Toolkit Feature Interactive Debug Facility User's Guide
GC26-8709-07

Sets an instruction breakpoint, or toggles the Break window display.
Read syntax diagramSkip visual syntax diagram
>>-BREak--+---------+--+----------------+----------------------><
          '-address-'  | .------------. |   
                       | V            | |   
                       '---|--command-+-'   

address
An address. If an expression, the expression is used to provide the address.

If omitted, the address is determined from the cursor position. If it is not possible to determine an address from the cursor position (for example when the cursor is on the command line and the command line is empty), the Break window is opened if it is not already open, or closed if it is open.

command
A command to be executed immediately after the breakpoint is taken.

To set a deferred or sticky breakpoint, use the DBREAK command. See DBREAK for details.

If an address is supplied, either as an expression on the command line or by means of cursor position, a breakpoint is set at that address. If a breakpoint or a watchpoint is already set at the specified address, it is cleared. The BREAK command is a toggle that turns a breakpoint on or off. (The OLDBREAK option is available if the toggle style of operation is not desired. If OLDBREAK is set and the BREAK command is used against an address where a breakpoint is already set, an error message is issued.)

The breakpoint is taken (that is, execution is interrupted and the operator notified) just prior to the execution of the indicated instruction. A maximum of 64 breakpoints may be active at one time. Breakpoints remain in effect until they are explicitly cleared (through the Break window).

You can associate a list of commands with the breakpoint. These commands are executed when the breakpoint is taken, before control is returned to you. The commands are specified at the end of the BREAK command, separated from the address and each other by vertical bars (|). If a command receives a non-zero return code, the remaining commands in the list are not executed.

z/VM
IDF provides two types of instruction breakpoint, PER and non-PER. If PER is enabled (with the Break window or SET PER command) then all breakpoints are PER breakpoints. Likewise, if PER is disabled, all breakpoints are non-PER breakpoints.
  • PER breakpoints are implemented by means of PER Instruction Fetch and Branch events, and are only possible so long as the processor can be kept in Extended Control mode. In some cases, for example when an SVC is issued in a read-only DCSS, Extended Control mode is dropped by CMS.
  • Non-PER breakpoints are implemented by temporarily inserting an invalid opcode at the indicated location.

For more information about the distinction between the two available breakpoint types, see PER versus non-PER mode.

z/OS
IDF provides two types of instruction breakpoint, SVC 97 and non-SVC 97.
  • SVC 97 breakpoints are implemented by temporarily inserting an SVC 97 instruction at the indicated location.
  • Non-SVC 97 breakpoints are implemented by temporarily inserting an invalid opcode at the indicated location.

For more information about the distinction between the two available breakpoint types, see Breakpoint method selection (TSO).

z/VSE
IDF provides one type of breakpoint.
  • A breakpoint is implemented by temporarily inserting an invalid opcode at the indicated location.

If a WATCH command with a condition is issued for an address at which there is a breakpoint, that breakpoint is converted into a watchpoint. If commands were specified with the original breakpoint, they are associated with the watchpoint unless commands were specified with the WATCH command.

If a breakpoint is placed within the execution path of the subroutine to be skipped, execution stops at that breakpoint.

IDF verifies that there is a valid instruction at the breakpoint address, and rejects the BREAK command (with a message) if not. This test is not infallible. Certain combinations of DATA can appear as valid instructions. For example X'1E14' might be data or it might be an ALR R1,R4. IDF lets you install a break here.

For non-PER and non-SVC 97 breakpoints, IDF uses an invalid instruction of the format x'02xx', to cause a program-check (operation exception), which gives IDF control to handle the breakpoint logic. At the time of handling the breakpoint, IDF reinstalls the original instruction bytes for execution. But if you manage to install a non-PER breakpoint (that is, x'02xx') on top of program DATA (which looks like an instruction), then IDF never gains control to remove its x'02xx' from your program's DATA. So IDF corrupts valid data, potentially leading to bizarre program behavior. Take care to install breakpoints only on valid target program instructions.

IDF establishes breakpoints by modifying target instructions to invalid opcodes (or SVC 97 instructions if SVC97 under TSO is in effect). The DISASM window only displays the original instruction. If a breakpoint is established on an instruction which is the target of an EXecute instruction, then the EX instruction will fail.

z/VM and z/VSE
As part of the test for a valid instruction, IDF backs up 2 bytes from the breakpoint instruction (assuming that the instruction appears valid so far), and checks for:
On CMS
SVC 201 (x'0AC9'), SVC 202 (x'0ACA'), and SVC 203 (x'0ACB').
On z/VSE
SVC 34 (x'0A22')
Each of these SVCs may be followed by DATA bytes. If IDF finds any of these codes preceding the breakpoint address, IDF assumes that the breakpoint instruction is in fact DATA for the SVC, and prevents the breakpoint installation.

This check cannot be completely certain that the x'0Axx' preceding the breakpoint address is in fact an SVC. It is possible that it is also DATA, or perhaps the last 2 bytes of a 4-or 6-byte instruction. However the risk of either of these is small, and since the result of allowing a breakpoint to be installed on top of SVC 203 data (for example) is catastrophic, being over-zealous in its checking is worthwhile.

If IDF rejects (due to the above SVC test) an attempted breakpoint installation on what you know for certain is a valid instruction you should be able to successfully install the break on the next instruction.

See also SET BREAK.

Return codes

0
Operation successful
5
Syntax or other error in expression
6
Location does not contain a valid instruction, location is read only and PER is unavailable, or a breakpoint already set at that location and the OLDBREAK option is on.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014