M prefix (full-screen mode)
The M
prefix command, which you enter through
the prefix area of the Source window, adds an operand or operands
on that line to the Monitor window.
- integer
- Identifies specific operands to be monitored. If you do not specify
an integer, z/OS® Debugger monitors
all operands. If you enter a single number or the form 1,2,3, z/OS Debugger monitors
the specified operand or operands. If you use the form 1-4, z/OS Debugger monitors
operands 1 through 4.
For programs other than assembler and disassembly, integer identifies the position of a variable on a line, beginning from the left. The first variable on the line is position 1, the second variable on the line is position 2, and this pattern repeats until there are no more variables. If a variable is on the line more than once, only the first instance of the variable is assigned a position number. If no integer is specified, all the variables on the line are added to the Monitor window.
For assembler and disassembly programs, integer identifies operands of the machine instruction. z/OS Debugger numbers them from left to right with the first operand numbered operand 1, the second operand numbered operand 2, and repeating the pattern until there are no more operands. If you do not specify an integer, z/OS Debugger adds all operands referenced explicitly or implicitly by the instruction to the Monitor window. If you specify any form of integer, z/OS Debugger adds only the operands explicitly referenced by the specified operand or operands to the Monitor window.
Usage notes
- For C/C++, integer values cannot be specified.
- The
M
prefix command can be entered only on lines that have valid executable statements. - You can enter the
M
prefix command on multiple lines. - The
M
prefix command works only for the following compile units:- Assembler or disassembly compile units
- Enterprise COBOL compile units
- Enterprise PL/I compile units compiled with Enterprise PL/I for z/OS, Version 3.6 or 3.7 with the PTF for APAR PK70606 applied, or later
- C/C++ compile units, compiled with the z/OS 2.1 XL C/C++ compiler or later, with DEBUG(FORMAT(DWARF)) option.
- You cannot use the
M
prefix command on a line that is in a block that is not currently active. - The following notes apply when you use the
M
prefix command in an assembler or disassembly program:- When you specify integer, it applies
to an entire machine instruction operand, not to a single symbol.
For example, in the following instruction, operand 1 is the storage
referenced by “SYM1-SYM2(LEN,R8)” and operand 2 is the
storage referenced by SOURCE:
MVC SYM1-SYM2(LEN,R8),SOURCE
- z/OS Debugger uses the current values in a register to evaluate any registers referenced by an instruction. When you reference an instruction that is not the instruction where the program is suspended, the current values in a register might differ from what the values would be if z/OS Debugger stopped the program at the instruction you referenced.
- When you specify an explicit base or index register in an operand, z/OS Debugger computes
the effective address of the storage location when you enter the
M
prefix command. z/OS Debugger does not recompute the effective address while it monitors the operand. - When you specify a single symbol as a machine instruction operand, z/OS Debugger uses the current value of any base register and the currently active USING as z/OS Debugger monitors the operand.
- The
M
prefix command cannot access mask fields, immediate data fields, and any other constants imbedded in the machine instructions. However, z/OS Debugger does number these fields when it numbers the operands. - For instructions that might be coded using extended mnemonics (BC, BCR, and BRC), z/OS Debugger cannot determine whether the base form or the extended mnemonic was used. Therefore, you can use both 1 and 2 to refer to the operand representing the branch target.
- When you specify integer, it applies
to an entire machine instruction operand, not to a single symbol.
For example, in the following instruction, operand 1 is the storage
referenced by “SYM1-SYM2(LEN,R8)” and operand 2 is the
storage referenced by SOURCE:
Example
The following example uses the following lines of code:
...
293 move 0 to c; move 0 to b; move 0 to IND; move b to a;
...
319 if a + b < b + c
320 then move ind to c;
321 end-if;
...
To add the variable c
on line 293 to the Monitor
window, enter the M1
command in the prefix area of
line 293.
...
200 L R6,=X'31BA4038'
201 STM R1,R4,0(R6)
202 TM X'01',FLAGS
203
...
- Enter
M
on line 201. z/OS Debugger adds the following registers and memory locations to the Monitor window: R1, R2, R3, R4, R6, and the sixteen bytes of storage at location X'31BA4038'. - Enter
M1-2
on line 201. z/OS Debugger adds R1 and R4 to the Monitor window. - Enter
M1
on line 202. z/OS Debugger displays an error message because theM
prefix command cannot access mask and immediate fields.
Refer to the following topics for more information related to the material discussed in this topic.
- Related references
- MONITOR command