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


PSWSTEAL (CMS only)

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

Declares a target program instruction that steals the SVC or PGM new PSW.
Read syntax diagramSkip visual syntax diagram
>>-PSWSTEAL--address-------------------------------------------><

address
The storage location. If an expression is present on the command line, that expression is used as the argument. If the command line is empty, an attempt is made to determine the address from the cursor position.

The PSWSTEAL command effectively sets a permanent breakpoint at the specified location. Whenever that instruction is executed, IDF performs an interpretive execution of the instruction. It appears to the target program that it has stolen the new PSW. However, IDF retains control of the PSW locations.

To guarantee correct results, you must declare all occurrences of the following:
  • All references (both store and fetch) to either SVC or PGM New.
  • All store references to SVC or PGM Old.
  • All store references to locations 136-159 (interrupt information)
The following instructions are supported for interpretive execution through the PSWSTEAL command, and are therefore its only valid targets:
MVC
Move characters
STM
Store multiple
LM
Load multiple
ST
Store
L
Load

The maximum number of PSWSTEAL breakpoints that may be active at any time is 75. These are not shown on the Break window, but may be obtained by means of the EXTRACT BREAK command.

If the PSWSTEAL command is issued against an instruction that is already declared, the PSWSTEAL breakpoint is cleared. The PSWSTEAL command toggles these special breakpoints.

A normal breakpoint may be set at the same instruction location as a PSWSTEAL breakpoint. When execution reaches the normal breakpoint, you are notified as usual. When execution passes through the PSWSTEAL breakpoint, no notification is performed, just as no notification is performed if the instruction is executed normally. Once set, the PSWSTEAL breakpoints may be forgotten.

Instructions which are the target of PSWSTEAL commands must reside in read/write storage.

When you issue the PSWSTEAL command, IDF exploitation of PER is locked out for the remainder of the debugging session. This does not affect the program in terms of its ability to use PER.

When the new PSW locations in low storage are displayed on a Dump window, the values the program placed in them are visible. However if you use EXTRACT LOCATION to obtain this information, IDF's PSWs are returned.

This facility enables you to use IDF to single-step through every instruction of the program's first level interrupt handler.

As a matter of convenience, the following is suggested:
  • Define all instructions in the program that must be declared with PSWSTEAL as external symbols with a common prefix, for example, PSWnnnn
  • Insert code in the PROFILE macro to read the program's MAP file, locate the external symbols, and set the PSWSTEAL breakpoints. For example:
    /*-------------------------------------------------------*/
    /* Read pgm MAP file into MAPREC.n array                 */
    /*-------------------------------------------------------*/
     fid = pgm 'MAP *'
     Address Command 'EXECIO * DISKR' fid '(FINIS STEM MAPREC.'
     If rc ¬= 0 Then
       Do
         'SET MSG2 Return code' rc 'trying to read 'fid''
         'SET ALARM'
         Exit
       End
    
    /*-------------------------------------------------------*/
    /* Establish PSWSTEALs using information from MAP file   */
    /*-------------------------------------------------------*/
     PSWsteals = 0
     Do i = 1 To maprec.0
       Parse Upper Var maprec.i label .
       If Substr(label,1,3) ¬= 'PSW' Then Iterate
       'PSWSTEAL' label
       If RC ¬= 0 Then
         Do
           'SET MSG2 Error on PSWSTEAL' label' after' ,
                   PSWsteals 'successful, RC='RC
           'SET ALARM'
           Exit
         End
       PSWsteals = PSWsteals + 1
     End
This makes the fact that you are stealing PSWs transparent as far as your operational procedures are concerned.

Return codes

0
Operation successful
1
No address specified
5
Syntax or other error in expression, or unsupported instruction
6
Module not yet loaded, or maximum number of PSWSTEALs already set

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014