BPXYPTRC — Map parameters for ptrace

VARLEN defines the number of bytes needed to hold the pathname (the default is the maximum pathname, 1024).
                                                      
            BPXYPTRC                                                            
*                                                                               
* ********************************************************************          
* *                                                                  *          
* * Ptrace PT_LDINFO return structure.  Note that this maps one      *          
* * element, corresponding to one load module.  Each element         *          
* * consists of a fixed portion, and a variable portion (the path    *          
* * name and member name character strings).  The character strings  *          
* * are terminated with a null value (X'00').  Each loader info      *          
* * element immediately follows the last null terminator for the     *          
* * previous element.  The first full word of each element is an     *          
* * offset to the next element.  Thus, the start of the next element *          
* * can be specified as follows:                                     *          
* *                                                                  *          
* *     NextLDInfo = Addr(PtLDInfo)+PtLDInfoNext                     *          
* *                                                                  *          
* ********************************************************************          
*                                                                               
*                                                                               
PTLDINFO DSECT                                                                  
PTLDFIXEDAREA DS 0CL0032                                                        
PTLDINFONEXT DS 1FL4     Offset to next element                                 
PTLDINFOFD DS  1FL4      File descriptor for this load module (not     X        
                         used)                                                  
PTLDTEXTORG DS 1AL4      Program text origin address (i.e. load point  X        
                         address)                                               
PTLDTEXTSIZE DS 1FL4     Length of text                                         
PTLDTEXTSUBPOOL DS 1CL0001 Subpool where text is loaded                         
PTLDTEXTFLAGS DS 0BL1    Text related flags                                     
PTLDTEXTWRITE EQU X'80'  0 = text can be read but not written into 1 = X        
                         text can be read and written into                      
PTLDTEXTMVS EQU X'40'    0 = File system load module 1 = MVS load      X        
                         module                                                 
PTLDTEXTEXT EQU X'20'    0 = Only 1 text extent 1 = More than one text X        
                         extent. First extent is in this element,      X        
                         extent 2 - n are in the PtLDInfoExt area               
         ORG   PTLDTEXTFLAGS+X'00000001'                                        
PTLDOFFEXT DS  1FL2      Offset from this element to element           X        
                         extension. 0 if there is no extension for     X        
                         this element                                           
PTLDDATAORG DS 1AL4      Program data origin address (not used)                 
PTLDDATASIZE DS 1FL4     Length of data (not used)                              
PTLDDATASUBPOOL DS 1FL1  Subpool where data is loaded (not used)                
PTLDDATAFLAGS DS 1BL1    Data related flags (not used)                          
         DS    1FL2      Reserved                                               
PTLDVARAREA DS 0C                                                               
PTLDPATHNAME DS 0C       Fully qualified path name of load module               
PTLDMEMBERNAME DS 0C     Member name of load module (not used)                  
PTLDINFO_LEN EQU *-PTLDINFO                                                     
PTLDINFOEXT DSECT                                                               
PTLDINFONUMTEXTEXT DS 1FL2 Number of additional text extents in the    X        
                         following arrays that are meaningful, up to   X        
                         15 in this area, for a total of 16                     
         DS    1FL2      reserved                                               
PTLDTEXTORGEXT DS 1AL4   Program text origin address (i.e. load point  X        
                         address)                                               
         ORG   PTLDTEXTORGEXT+X'0000003C'                                       
PTLDTEXTSIZEEXT DS 1FL4  Length of text                                         
PTLDNULLTERM EQU 0       Null terminator for character strings                  
         ORG   PTLDINFOEXT+X'0000007C'                                          
PTLDINFOEXT_LEN EQU *-PTLDINFOEXT                                               
*                                                                               
* ********************************************************************          
* *                                                                  *          
* * Ptrace thread information return structure.  Note that this      *          
* * maps one element, corresponding to one thread.                   *          
* *                                                                  *          
* * Note: the only valid information for a dead thread is:           *          
* *                                                                  *          
* *   PTPTNEXT, PTPTTHID, PTPTSTATEACTIVE=0, PTPTKERNELPTHREAD,      *          
* *   PTPTEXITSTATUS                                                 *          
* ********************************************************************          
*                                                                               
*                                                                               
PTPTINFO DSECT                                                                  
PTPTNEXT DS    1AL4      Offset to next element                                 
PTPTTHID DS    1CL0008   Thread ID                                              
PTPTRESERVED DS 1CL0016  Reserved                                               
PTPTSTATE DS   0BL4      Thread state flags                                     
PTPTSTATE1 DS  0BL1      Thread state flag byte                                 
PTPTSTATEACTIVE EQU X'80'                                                       
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 0 = thread is dead                                                     
*      * 1 = thread is active                                                   
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
PTPTSTATEASYNC EQU X'40'                                                        
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 1 = thread is asynchronous                                             
*      * (is also active but not                                                
*      * yet running)                                                           
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
PTPTSTATECANCELPEND EQU X'20'                                                   
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 1 = cancel is pending                                                  
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
         ORG   PTPTSTATE1+X'00000001'                                           
PTPTSTATE2 DS  1BL1      Thread state flag byte                                 
PTPTSTATE3 DS  1BL1      Thread state flag byte                                 
PTPTSTATE4 DS  1BL1      Thread state flag byte                                 
PTPTKERNELATTR DS 0BL4   Thread kernel attributes                               
PTPTKERNEL1 DS 0BL1      Thread kernel attribute byte                           
PTPTKERNELDETACH EQU X'80'                                                      
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 0 = thread is not detached                                             
*      * 1 = thread is detached                                                 
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
PTPTKERNELMEDIUM EQU X'40'                                                      
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 0 = thread is heavyweight                                              
*      * 1 = thread is mediumweight                                             
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
PTPTKERNELASYNC EQU X'20'                                                       
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 0 = thread is synchronous                                              
*      * 1 = thread is asynchronous                                             
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
PTPTKERNELPTHREAD EQU X'10'                                                     
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 1 = thread is created via                                              
*      * pthread create                                                         
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
         ORG   PTPTKERNEL1+X'00000001'                                          
PTPTKERNEL2 DS 0BL1      Thread kernel attribute byte                           
PTPTKERNELHOLD EQU X'80'                                                        
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 1 = thread is held                                                     
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
         ORG   PTPTKERNEL2+X'00000001'                                          
PTPTKERNEL3 DS 1BL1      Reserved                                               
PTPTKERNEL4 DS 1BL1      Reserved                                               
PTPTEXITSTATUS DS 1CL0004                                                       
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * Thread exit status if dead                                             
*      * (PtptStateActive = 0)                                                  
*      * (Low half if AMODE 64)                                                 
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
PTPTPENDINGSIGMASK DS 1BL8                                                      
PTPTEXITSTATUSHIGH DS 1CL0004                                                   
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * If AMODE 64, high half of thread exit status                           
*      * (PtptStateActive = 0)                                                  
*      * (Not used for AMODE 31)                                                
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
         DS    1FL4      Reserved                                               
PTPTINFO_LEN EQU *-PTPTINFO                                                     
*                                                                               
*    *****************************************************************          
*    *                                                               *          
*    * Mask of pending signals                                                  
*    * (bit 0 represents signal 1)                                              
*    * (bit 63 represents signal 64)                                            
*    *                                                               *          
*    *****************************************************************          
*                                                                               
* ********************************************************************          
* *                                                                  *          
* * Ptrace thread information extended structure. Note that this     *          
* * maps one element, corresponding to one thread. PtpxInfo maps     *          
* * exactly to PtPtInfo                                              *          
* *                                                                  *          
* *                                                                  *          
* *                                                                  *          
* * Note: the only valid information for a dead thread is:           *          
* *                                                                  *          
* *   PTPXNEXT, PTPXTHID, PTPXSTATEACTIVE=0, PTPXKERNELPTHREAD,      *          
* *   PTPXEXITSTATUS                                                 *          
* ********************************************************************          
*                                                                               
*                                                                               
PTPHINFO DSECT           PT_THREAD_INFO_EXTENDED header information             
PTPHINFOBASE DS 0CL0052                                                         
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * PtphInfoBase contains information about the process and     *          
*      * pointers to the next array of thread info                              
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
PTPHID   DS    1CL0004   Acronym                                                
PTPHNEXT DS    1AL4      Address of the next PtPhInfo                           
PTPHPTPXOFF DS 1AL4      Offset of first Ptpx in this chunk of storage          
PTPHPID  DS    1FL4      Process id of the threads                              
PTPHPENDINGSIGMASK DS 1BL8 Signals pending at the process                       
PTPHBLOCKEDSIGMASK DS 1BL8 blocked signals at process                           
PTPHTHREADNUM DS 1FL4    Total number of threads reported in chain              
PTPHTNUM DS    1CL0004   Threads in the Current buffer                          
PTPHPTPXLEN DS 1FL4      Length of the PtPx in this buffer                      
         DS    1CL0004   Reserved                                               
         ORG   PTPHINFO+X'00000034'                                             
PTPHINFO_LEN EQU *-PTPHINFO                                                     
PTPXINFO DSECT           PT_THREAD_INFO_EXTENDED maps a single entry            
PTPXINFOBASE DS 0CL0072                                                         
PTPXNEXT DS    1AL4      Offset to next element                                 
PTPXTHID DS    1CL0008   Thread ID                                              
PTPXTCB  DS    1AL4      Tcb address for this process                           
PTPXOTCB DS    1AL4      Otcb address for this process                          
PTPXBLOCKEDSIGMASK DS 1BL8 blocked signals                                      
PTPXSTATE DS   0BL4      Thread state flags                                     
PTPXSTATE1 DS  0BL1      Thread state flag byte                                 
PTPXSTATEACTIVE EQU X'80' 0 = thread is dead                                    
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 1 = thread is active                                                   
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
PTPXSTATEASYNC EQU X'40' 1 = N/A                                                
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * (is also active but not                                                
*      * yet running)                                                           
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
PTPXSTATECANCELPEND EQU X'20'                                                   
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 1 = cancel is pending                                                  
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
         ORG   PTPXSTATE1+X'00000001'                                           
PTPXSTATE2 DS  1BL1      Thread state flag byte                                 
PTPXSTATE3 DS  1BL1      Thread state flag byte                                 
PTPXSTATE4 DS  1BL1      Thread state flag byte                                 
PTPXKERNELATTR DS 0BL4   Thread kernel attrtes                                  
PTPXKERNEL1 DS 0BL1      Thread kernel attribute byte                           
PTPXKERNELDETACH EQU X'80'                                                      
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 0 = thread is not detached                                             
*      * 1 = thread is detached                                                 
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
PTPXKERNELMEDIUM EQU X'40'                                                      
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 0 = thread is heavyweight                                              
*      * 1 = thread is mediumweight                                             
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
PTPXKERNELASYNC EQU X'20'                                                       
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 0 = thread is synchronous                                              
*      * 1 = thread is asynchronous                                             
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
PTPXKERNELPTHREAD EQU X'10'                                                     
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 1 = thread is created via                                              
*      * pthread create                                                         
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
         ORG   PTPXKERNEL1+X'00000001'                                          
PTPXKERNEL2 DS 0BL1      Thread kernel attribute byte                           
PTPXKERNELHOLD EQU X'80'                                                        
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * 1 = thread is held                                                     
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
         ORG   PTPXKERNEL2+X'00000001'                                          
PTPXKERNEL3 DS 1BL1      Reserved                                               
PTPXKERNEL4 DS 1BL1      Reserved                                               
PTPXEXITSTATUS DS 1CL0004                                                       
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * Thread exit status if dead                                             
*      * (PTPXStateActive = 0)                                                  
*      * (Low half if AMODE 64)                                                 
*      *                                                             *          
*      ***************************************************************          
*                                                                               
*                                                                               
PTPXPENDINGSIGMASK DS 1BL8 Mask of pending signals is set) (bit 0      X        
                         represents signal 1)                                   
PTPXPID  DS    1FL4      Process id for this Thid                               
PTPXASID DS    1FL2                                                             
PTPXFLAGS DS   0BL2      Thread related flags                                   
PTPXIPT  EQU   X'80'     Ipt Thread                                             
PTPXINCOMPLETE EQU X'40' The reported thread information is incomplete          
         ORG   PTPXFLAGS+X'00000002'                                            
PTPXOAPB DS    1AL4      Pointer to the Oapb                                    
PTPXExitStatusHigh DS 1CL0004                                                   
*                                                                               
*      ***************************************************************          
*      *                                                             *          
*      * If AMODE 64, high half of thread exit status                           
*      * (PtptStateActive = 0)                                                  
*      * (Not used for AMODE 31)                                                
*      *                                                             *          
*      ***************************************************************          
*                                                                               
PTPXINFO_LEN EQU *-PTPXINFO                                                     
*                                                                               
* ********************************************************************          
* *                                                                  *          
* * Ptrace explain information return structure.                     *          
* *                                                                  *          
* ********************************************************************          
*                                                                               
*                                                                               
PTEXINFO DSECT                                                                  
PTEXREG1 DS    1FL4      Register 1 at CEEEVDBG entry                           
PTEXREG12 DS   1FL4      Register 12 at CEEEVDBG entry                          
PTEXREG13 DS   1FL4      Register 13 at CEEEVDBG entry                          
          DS   1FL4                                                             
PTEXG64R1  DS  FD        Register 1 at CEEEVDBG entry                           
PTEXG64R12 DS  FD        Register 12 at CEEEVDBG entry                          
PTEXG64R13 DS  FD        Register 13 at CEEEVDBG entry                          
PTEXINFO_LEN EQU *-PTEXINFO                                                     
*                                                                               
* ********************************************************************          
* *                                                                  *          
* * Ptrace program recovery parameters structure.                    *          
* * (This area is provided by the caller)                            *          
* *                                                                  *          
* ********************************************************************          
*                                                                               
*                                                                               
PTPICPARMS DSECT                                                                
PTPICREGISTERS DS 1AL4   Address of GPRs at time of interrupt                   
PTPICPSW DS    1AL4      Address of PSW at time of interrupt                    
PTPICINTCODE DS 1FL2     Program interrupt code                                 
PTPICSIGNUMBER DS 1FL2   Return value indicating signal number that    X        
                         should be raised by the caller if the         X        
                         PtPICUseSigNum flag is set                             
PTPICFLAGS DS  0BL4      Flags                                                  
PTPICICMODIFIED EQU X'80' 0 = The instruction counter portion of the   X        
                         PSW pointed to by the PtPICPSW field has not  X        
                         been modified 1 = The instruction counter     X        
                         portion of the PSW pointed to by the PtPICPSW X        
                         field has been modified - continue execution  X        
                         at this modified address                               
PTPICREGSMODIFIED EQU X'40' 0 = The registers pointed to by the        X        
                         PtPICRegisters field have not been modified 1 X        
                         = The registers pointed to by the             X        
                         PtPICRegisters field have been modified                
PTPICUSESIGNUM EQU X'20' 1 = Raise the signal number returned in the   X        
                         PtPICSigNumber field upon return                       
PTPICBYPASSSIG EQU X'10' 1 = Do not raise any signal upon return                
PTPICILCEXISTS EQU X'08' 1 = PtPICILC field is present                          
PTPICHIREGSEXISTS EQU X'04' 1 = The PtPICHiRegisters field is present           
PTPICHIREGSMODIFIED EQU X'02' 0 = The registers pointed to by the      X        
                         PtPICHiRegisters field have not been modified X        
                         1 = The registers pointed to by the           X        
                         PtPICHiRegisters field have been modified              
PTPICAMODE64   EQU X'01' 1 = use 64 bit addresses for PSW and          X        
                         registers                                              
         DS    1BL.024   Reserved                                               
         ORG   PTPICFLAGS+X'00000004'                                           
PTPICABENDCODE DS 0BL4   Abend code or zero                                     
PTPICABENDFLAGS DS 1BL1  Abend code flags                                       
PTPICABENDCC DS 1BL3     System completion code (first 12 bits) and    X        
                         user completion code (second 12 bits)                  
PTPICABENDREASON DS 1FL4 Abend reason code or zero                              
PTPICILC DS    1FL1      Instruction length code (only present if      X        
                         PtPICILCExists flag is set)                            
PTPICRESERVED DS 1CL0003 Reserved                                               
PTPICHIREGISTERS DS 1AL4 Address of high GPRs at time of interrupt              
PTPICREGISTERS64 DS  AD  Address of GPRs at time of interrupt                   
PTPICPSW64 DS    AD      Address of PSW at time of interrupt                    
PTPICHIREGISTERS64 DS AD Address of high GPRs at time of interrupt              
PTPICRSVD DS   1CL0008   Reserved. This area is provided by the caller X        
                         and may not be present in old releases of     X        
                         code                                                   
*                                                                               
* ********************************************************************          
* *                                                                  *          
* * Ptrace request parameter definitions.                            *          
* *                                                                  *          
* ********************************************************************          
*                                                                               
*                                                                               
PT_TRACE_ME EQU 0        Debug this process                                     
PT_READ_I EQU  1         Read a full word                                       
PT_READ_D EQU  2         Read a full word                                       
PT_READ_U EQU  3         Read control info                                      
PT_WRITE_I EQU 4         Write a full word                                      
PT_WRITE_D EQU 5         Write a full word                                      
PT_CONTINUE EQU 7        Continue the process                                   
PT_KILL  EQU   8         Terminate the process                                  
PT_READ_GPR EQU 11       Read GPR, CR, PSW                                      
PT_READ_FPR EQU 12       Read FPR                                               
PT_WRITE_GPR EQU 14      Write GPR, CR, PSW                                     
PT_WRITE_FPR EQU 15      Write FPR                                              
PT_READ_BLOCK EQU 17     Read storage                                           
PT_WRITE_BLOCK EQU 19    Write storage                                          
PT_READ_GPRH EQU 20      Read GPRH                                              
PT_WRITE_GPRH EQU 21     Write GPRH                                             
PT_REGHSET EQU 22        Read all GPRHs                                         
PT_ATTACH EQU  30        Attach to a process                                    
PT_DETACH EQU  31        Detach from a process                                  
PT_REGSET EQU  32        Read all GPRs                                          
PT_REATTACH EQU 33       Reattach to a process                                  
PT_LDINFO EQU  34        Read loader info                                       
PT_MULTI EQU   35        Multi process mode                                     
PT_BLOCKREQ EQU 40       Block request                                          
PT_THREAD_INFO EQU 60    Read thread info                                       
PT_THREAD_MODIFY EQU 61  **********************************************X        
                         *************** Modify thread kernel          X        
                         information **********************************X        
                         ***************************                            
PT_THREAD_READ_FOCUS EQU 62 *******************************************X        
                         ****************** Read current focus thread  X        
                         ID *******************************************X        
                         ******************                                     
PT_THREAD_WRITE_FOCUS EQU 63 ******************************************X        
                         ******************* Modify current focus      X        
                         thread ID ************************************X        
                         *************************                              
PT_THREAD_HOLD EQU 64    **********************************************X        
                         *************** Modify thread hold state *****X        
                         **********************************************X        
                         **********                                             
PT_THREAD_SIGNAL EQU 65  **********************************************X        
                         *************** Queue a signal for a thread **X        
                         **********************************************X        
                         *************                                          
PT_EXPLAIN EQU 66        **********************************************X        
                         *************** Return extended event info ***X        
                         **********************************************X        
                         ************                                           
PT_EVENTS EQU  67        **********************************************X        
                         *************** Modify extended events list **X        
                         **********************************************X        
                         *************                                          
PT_THREAD_INFO_EXTENDED EQU 68 ****************************************X        
                         ********************* Read extended thread    X        
                         info *****************************************X        
                         ********************                                   
PT_REATTACH2 EQU 71      **********************************************X        
                         *************** Reattach to a process         X        
                         (extended) ***********************************X        
                         **************************                             
PT_CAPTURE EQU 72        **********************************************X        
                         *************** Capture debugged storage *****X        
                         **********************************************X        
                         **********                                             
PT_UNCAPTURE EQU 73      **********************************************X        
                         *************** Uncapture debugged storage ***X        
                         **********************************************X        
                         ************                                           
PT_GET_THREAD_TCB EQU 74 **********************************************X        
                         *************** Get TCB address for thread ***X        
                         **********************************************X        
                         *********                                              
PT_GET_ALET       EQU 75 **********************************************X        
                         *************** Get Alet of target PID     ***X        
                         **********************************************X        
                         *********                                              
PT_SWAPIN         EQU 76 **********************************************X        
                         *************** Swapin target PID's A.S.   ***X        
                         **********************************************X        
                         *********                                              
PT_EXTENDED_EVENT EQU 98 **********************************************X        
                         *************** Debug an extended event ******X        
                         **********************************************X        
                         *********                                              
PT_RECOVER EQU 99        Debug a program check                                  
*                                                                               
* ********************************************************************          
* *                                                                  *          
* * Ptrace register definitions.  The following are defined:         *          
* *                                                                  *          
* * - General purpose registers                                      *          
* * - Floating point registers                                       *          
* * - PSW registers                                                  *          
* * - Control registers                                              *          
* * - General Purpose High Registers                                            
* *                                                                  *          
* ********************************************************************          
*                                                                               
*                                                                               
PT_GPR0  EQU   0         General purpose register 0                             
PT_GPR1  EQU   1         General purpose register 1                             
PT_GPR2  EQU   2         General purpose register 2                             
PT_GPR3  EQU   3         General purpose register 3                             
PT_GPR4  EQU   4         General purpose register 4                             
PT_GPR5  EQU   5         General purpose register 5                             
PT_GPR6  EQU   6         General purpose register 6                             
PT_GPR7  EQU   7         General purpose register 7                             
PT_GPR8  EQU   8         General purpose register 8                             
PT_GPR9  EQU   9         General purpose register 9                             
PT_GPR10 EQU   10        General purpose register 10                            
PT_GPR11 EQU   11        General purpose register 11                            
PT_GPR12 EQU   12        General purpose register 12                            
PT_GPR13 EQU   13        General purpose register 13                            
PT_GPR14 EQU   14        General purpose register 14                            
PT_GPR15 EQU   15        General purpose register 15                            
PT_FPR0  EQU   16        Floating point register 0                              
PT_FPR1  EQU   17        Floating point register 1                              
PT_FPR2  EQU   18        Floating point register 2                              
PT_FPR3  EQU   19        Floating point register 3                              
PT_FPR4  EQU   20        Floating point register 4                              
PT_FPR5  EQU   21        Floating point register 5                              
PT_FPR6  EQU   22        Floating point register 6                              
PT_FPR7  EQU   23        Floating point register 7                              
PT_FPR8  EQU   24        Floating point register 8                              
PT_FPR9  EQU   25        Floating point register 9                              
PT_FPR10 EQU   26        Floating point register 10                             
PT_FPR11 EQU   27        Floating point register 11                             
PT_FPR12 EQU   28        Floating point register 12                             
PT_FPR13 EQU   29        Floating point register 13                             
PT_FPR14 EQU   30        Floating point register 14                             
PT_FPR15 EQU   31        Floating point register 15                             
PT_FPC   EQU   32        Floating point control register                        
PT_PSW   EQU   40        PSW                                                    
PT_PSW0  EQU   40        Left half of the PSW                                   
PT_PSW1  EQU   41        Right half of the PSW                                  
PT_CR0   EQU   42        Control register 0                                     
PT_CR1   EQU   43        Control register 1                                     
PT_CR2   EQU   44        Control register 2                                     
PT_CR3   EQU   45        Control register 3                                     
PT_CR4   EQU   46        Control register 4                                     
PT_CR5   EQU   47        Control register 5                                     
PT_CR6   EQU   48        Control register 6                                     
PT_CR7   EQU   49        Control register 7                                     
PT_CR8   EQU   50        Control register 8                                     
PT_CR9   EQU   51        Control register 9                                     
PT_CR10  EQU   52        Control register 10                                    
PT_CR11  EQU   53        Control register 11                                    
PT_CR12  EQU   54        Control register 12                                    
PT_CR13  EQU   55        Control register 13                                    
PT_CR14  EQU   56        Control register 14                                    
PT_CR15  EQU   57        Control register 15                                    
PT_GPRH0 EQU   58        GP High register 0                                     
PT_GPRH1 EQU   59        GP High register 1                                     
PT_GPRH2 EQU   60        GP High register 2                                     
PT_GPRH3 EQU   61        GP High register 3                                     
PT_GPRH4 EQU   62        GP High register 4                                     
PT_GPRH5 EQU   63        GP High register 5                                     
PT_GPRH6 EQU   64        GP High register 6                                     
PT_GPRH7 EQU   65        GP High register 7                                     
PT_GPRH8 EQU   66        GP High register 8                                     
PT_GPRH9 EQU   67        GP High register 9                                     
PT_GPRH10 EQU  68        GP High register 10                                    
PT_GPRH11 EQU  69        GP High register 11                                    
PT_GPRH12 EQU  70        GP High register 12                                    
PT_GPRH13 EQU  71        GP High register 13                                    
PT_GPRH14 EQU  72        GP High register 14                                    
PT_GPRH15 EQU  73        GP High register 15                                    
*                                                                               
* ********************************************************************          
* *                                                                  *          
* * Ptrace User Area offset definitions.  Offsets for signal catcher *          
* * information are defined by the limits below.  Any offset between *          
* * the minimum and maximum signal numbers is a request for signal   *          
* * catcher information for that signal number (i.e. offset 3 means  *          
* * signal catcher information for signal number 3).                 *          
* *                                                                  *          
* ********************************************************************          
*                                                                               
*                                                                               
PTUAREA#MINSIG EQU 1     Lowest signal number                                   
PTUAREA#MAXSIG EQU 1024  Highest signal number                                  
PTUAREA#INTCODE EQU 1025 Request for program interrupt code                     
PTUAREA#ABENDCC EQU 1026 Request for abend completion code                      
PTUAREA#ABENDRC EQU 1027 Request for abend reason code                          
PTUAREA#SIGCODE EQU 1028 Request for signal code                                
PTUAREA#ILC EQU 1029     Request for instruction length code                    
PTUAREA#PRFLAGS EQU 1030 Request for process flags                              
*                                                                               
* ********************************************************************          
* *                                                                  *          
* * Ptrace miscellaneous definitions.                                *          
* *                                                                  *          
* ********************************************************************          
*                                                                               
*                                                                               
PTCONTNORM EQU 1         Continue normally (continue address not       X        
                         changed) for a PT_CONTINUE request                     
PTNOSTICKYPGM EQU 1      Main program of process is not sticky bit     X        
                         program. Returned on PTUAREA#PRFLAGS request           
PTMAXIMUMLENGTH EQU 64000 Maximum storage length                                
PTLD#FIXEDLEN EQU 32     Length of PtLDInfo fixed area                          
PTPT#LENGTH EQU 52       Length of PtptInfo fixed area                          
PTPH#LENGTH EQU 56       Length of PtPhInfo fixed area on double word  X        
                         boundary                                               
PTPX#LENGTH EQU 72       Length of PtpxInfo fixed area on double word  X        
                         boundary                                               
PTEX#LENGTH EQU 40       Length of PtExInfo                                     
PTEX31#LENGTH EQU 12     Length of PtExInfo 31 bit                              
PTPIC#LENGTH1 EQU 28     Length of PtPicParms if PtPicHiRegsExists =   X        
                         OFF                                                    
PTPIC#LENGTH2 EQU 32     Length of PtPicParms if PtPicHiRegsExists =   X        
                         ON                                                     
PTPIC#LENGTH EQU 64      Length of PtPICParms                                   
PTPICPARMS_LEN EQU *-PTPICPARMS                                                 
*                                                                               
* ********************************************************************          
* *                                                                  *          
* * Ptrace PT_BlockReq structure.  This request allows the user to   *          
* * block several different Ptrace requests into a single call to    *          
* * Ptrace.  The block request structures mapped below must be       *          
* * contained in a single large area.  This area is pointed to by    *          
* * the Ptrace Address parameter and its length is contained in the  *          
* * Ptrace Data parameter.  The PtBRInfo structure must be at offset *          
* * zero into the provided area.                                     *          
* *                                                                  *          
* * Offsets are used to locate all relevant areas so that the Ptrace *          
* * block request input may be relocated.  All offsets are relative  *          
* * to the main input, the PtBRInfo area.  A given request block,    *          
* * such as the PtBR_GPR structure, may be found using the           *          
* * PtBRInfo address + PtBRReqBlkOff(x).                             *          
* *                                                                  *          
* * Only certain requests may be blocked into a single call to       *          
* * Ptrace.  The requests that may be blocked are --                 *          
* *   PT_READ_GPR                                                    *          
* *   PT_WRITE_GPR                                                   *          
* *   PT_READ_FPR                                                    *          
* *   PT_WRITE_FPR                                                   *          
* *   PT_READ_GPRH                                                   *          
* *   PT_WRITE_GPRH                                                  *          
* *   PT_READ_U                                                      *          
* *   PT_READ_D                                                      *          
* *   PT_READ_I                                                      *          
* *   PT_WRITE_D                                                     *          
* *   PT_WRITE_I                                                     *          
* *   PT_READ_BLOCK                                                  *          
* *   PT_WRITE_BLOCK.                                                *          
* *                                                                             
* ********************************************************************          
*                                                                               
*                                                                               
PTBRINFO DSECT                                                                  
PTBRFIXEDAREA DS 0CL0016                                                        
PTBRNUMREQS DS 1FL4      Number of requests in PtBRReqs                         
         DS    1CL0012   Reserved                                               
PTBRREQS DS    0CL0016   requests                                               
PTBRTYPE DS    1FL4      Type of request. For example, PT_READ_BLOCK.  X        
                         This entry is ignored if this field is zero            
PTBRSTATUS DS  1FL4      Status from request. Same as reasoncode on    X        
                         individual call of same type                           
PTBRREQBLKOFF DS 1FL4    Offset to request block further defining      X        
                         request and whose format is dependant on the  X        
                         request type                                           
         DS    1CL0004   reserved                                               
PTBRINFO_LEN EQU *-PTBRINFO                                                     
*                                                                               
* ********************************************************************          
* * Structure for PT_Read_GPR and PT_Write_GPR.                      *          
* ********************************************************************          
*                                                                               
*                                                                               
PTBR_GPR DSECT                                                                  
PTBR_GPR_CNTLGPR DS 0BL2 Only used on write request                             
PTBR_GPR_CNTLGPR1 DS 0BL1                                                       
PTBR_GPR_WGPR0 EQU X'80' Write content of GPR 0                                 
PTBR_GPR_WGPR1 EQU X'40' Write content of GPR 1                                 
PTBR_GPR_WGPR2 EQU X'20' Write content of GPR 2                                 
PTBR_GPR_WGPR3 EQU X'10' Write content of GPR 3                                 
PTBR_GPR_WGPR4 EQU X'08' Write content of GPR 4                                 
PTBR_GPR_WGPR5 EQU X'04' Write content of GPR 5                                 
PTBR_GPR_WGPR6 EQU X'02' Write content of GPR 6                                 
PTBR_GPR_WGPR7 EQU X'01' Write content of GPR 7                                 
         ORG   PTBR_GPR_CNTLGPR1+X'00000001'                                    
PTBR_GPR_CNTLGPR2 DS 0BL1                                                       
PTBR_GPR_WGPR8 EQU X'80' Write content of GPR 8                                 
PTBR_GPR_WGPR9 EQU X'40' Write content of GPR 9                                 
PTBR_GPR_WGPR10 EQU X'20' Write content of GPR 10                               
PTBR_GPR_WGPR11 EQU X'10' Write content of GPR 11                               
PTBR_GPR_WGPR12 EQU X'08' Write content of GPR 12                               
PTBR_GPR_WGPR13 EQU X'04' Write content of GPR 13                               
PTBR_GPR_WGPR14 EQU X'02' Write content of GPR 14                               
PTBR_GPR_WGPR15 EQU X'01' Write content of GPR 15                               
         ORG   PTBR_GPR_CNTLGPR+X'00000002'                                     
PTBR_GPR_CNTLMISC DS 0BL2 Only used on write request                            
PTBR_GPR_WPSW EQU X'80'  Write content of PSW, word 2                           
         ORG   PTBR_GPR_CNTLMISC+X'00000002'                                    
         DS    1CL0012   Reserved                                               
PTBR_GPR_GPRS DS 0CL0064 General purpose registers                              
PTBR_GPR_GPR00 DS 1FL4   GPR 00                                                 
PTBR_GPR_GPR01 DS 1FL4   GPR 01                                                 
PTBR_GPR_GPR02 DS 1FL4   GPR 02                                                 
PTBR_GPR_GPR03 DS 1FL4   GPR 03                                                 
PTBR_GPR_GPR04 DS 1FL4   GPR 04                                                 
PTBR_GPR_GPR05 DS 1FL4   GPR 05                                                 
PTBR_GPR_GPR06 DS 1FL4   GPR 06                                                 
PTBR_GPR_GPR07 DS 1FL4   GPR 07                                                 
PTBR_GPR_GPR08 DS 1FL4   GPR 08                                                 
PTBR_GPR_GPR09 DS 1FL4   GPR 09                                                 
PTBR_GPR_GPR10 DS 1FL4   GPR 10                                                 
PTBR_GPR_GPR11 DS 1FL4   GPR 11                                                 
PTBR_GPR_GPR12 DS 1FL4   GPR 12                                                 
PTBR_GPR_GPR13 DS 1FL4   GPR 13                                                 
PTBR_GPR_GPR14 DS 1FL4   GPR 14                                                 
PTBR_GPR_GPR15 DS 1FL4   GPR 15                                                 
PTBR_GPR_CRS DS 0CL0064  Control registers. May be read but will not   X        
                         be written                                             
PTBR_GPR_CR00 DS 1FL4    CR 00                                                  
PTBR_GPR_CR01 DS 1FL4    CR 01                                                  
PTBR_GPR_CR02 DS 1FL4    CR 02                                                  
PTBR_GPR_CR03 DS 1FL4    CR 03                                                  
PTBR_GPR_CR04 DS 1FL4    CR 04                                                  
PTBR_GPR_CR05 DS 1FL4    CR 05                                                  
PTBR_GPR_CR06 DS 1FL4    CR 06                                                  
PTBR_GPR_CR07 DS 1FL4    CR 07                                                  
PTBR_GPR_CR08 DS 1FL4    CR 08                                                  
PTBR_GPR_CR09 DS 1FL4    CR 09                                                  
PTBR_GPR_CR10 DS 1FL4    CR 10                                                  
PTBR_GPR_CR11 DS 1FL4    CR 11                                                  
PTBR_GPR_CR12 DS 1FL4    CR 12                                                  
PTBR_GPR_CR13 DS 1FL4    CR 13                                                  
PTBR_GPR_CR14 DS 1FL4    CR 14                                                  
PTBR_GPR_CR15 DS 1FL4    CR 15                                                  
PTBR_GPR_PSW DS 0CL0008  PSW. May be read but only the rightmost 4     X        
                         bytes (word 2) will be written                         
PTBR_GPR_PSW_W1 DS 1CL0004 PSW word 1.                                          
PTBR_GPR_PSW_W2 DS 1CL0004 PSW word 2                                           
PTBR_GPR_LEN EQU *-PTBR_GPR                                                     
*                                                                               
* ********************************************************************          
* * Structure for PT_Read_FPR and PT_Write_FPR.                      *          
* ********************************************************************          
*                                                                               
*                                                                               
PTBR_FPR DSECT                                                                  
PTBR_FPR_CNTLFPR DS 0BL2 Only used on write request                             
PTBR_FPR_CNTLFPR1 DS 0BL1                                                       
PTBR_FPR_WFPR0 EQU X'80' Write content of FPR 0                                 
PTBR_FPR_WFPR1 EQU X'40' Write content of FPR 1                                 
PTBR_FPR_WFPR2 EQU X'20' Write content of FPR 2                                 
PTBR_FPR_WFPR3 EQU X'10' Write content of FPR 3                                 
PTBR_FPR_WFPR4 EQU X'08' Write content of FPR 4                                 
PTBR_FPR_WFPR5 EQU X'04' Write content of FPR 5                                 
PTBR_FPR_WFPR6 EQU X'02' Write content of FPR 6                                 
PTBR_FPR_WFPR7 EQU X'01' Write content of FPR 7                                 
         ORG   PTBR_FPR_CNTLFPR1+X'00000001'                                    
PTBR_FPR_CNTLFPR2 DS 0BL1                                                       
PTBR_FPR_WFPR8 EQU X'80' Write content of FPR 8                                 
PTBR_FPR_WFPR9 EQU X'40' Write content of FPR 9                                 
PTBR_FPR_WFPR10 EQU X'20' Write content of FPR 10                               
PTBR_FPR_WFPR11 EQU X'10' Write content of FPR 11                               
PTBR_FPR_WFPR12 EQU X'08' Write content of FPR 12                               
PTBR_FPR_WFPR13 EQU X'04' Write content of FPR 13                               
PTBR_FPR_WFPR14 EQU X'02' Write content of FPR 14                               
PTBR_FPR_WFPR15 EQU X'01' Write content of FPR 15                               
         ORG   PTBR_FPR_CNTLFPR+X'00000002'                                     
PTBR_FPR_CNTLMISC DS 0BL2 Only used on write request                            
PTBR_FPR_WFPC EQU X'80'  Write content of FPC                                   
         ORG   PTBR_FPR_CNTLMISC+X'00000002'                                    
         DS    1CL0012   Reserved                                               
PTBR_FPR_FPRS DS 0CL0128 Floating point registers                               
PTBR_FPR_FPR00 DS 1CL0008 FPR 00                                                
PTBR_FPR_FPR01 DS 1CL0008 FPR 01                                                
PTBR_FPR_FPR02 DS 1CL0008 FPR 02                                                
PTBR_FPR_FPR03 DS 1CL0008 FPR 03                                                
PTBR_FPR_FPR04 DS 1CL0008 FPR 04                                                
PTBR_FPR_FPR05 DS 1CL0008 FPR 05                                                
PTBR_FPR_FPR06 DS 1CL0008 FPR 06                                                
PTBR_FPR_FPR07 DS 1CL0008 FPR 07                                                
PTBR_FPR_FPR08 DS 1CL0008 FPR 08                                                
PTBR_FPR_FPR09 DS 1CL0008 FPR 09                                                
PTBR_FPR_FPR10 DS 1CL0008 FPR 10                                                
PTBR_FPR_FPR11 DS 1CL0008 FPR 11                                                
PTBR_FPR_FPR12 DS 1CL0008 FPR 12                                                
PTBR_FPR_FPR13 DS 1CL0008 FPR 13                                                
PTBR_FPR_FPR14 DS 1CL0008 FPR 14                                                
PTBR_FPR_FPR15 DS 1CL0008 FPR 15                                                
PTBR_FPR_FPC DS 1CL0004  Floating Point Control Register                        
PTBR_FPR_LEN EQU *-PTBR_FPR                                                     
*                                                                               
* ********************************************************************          
* * Structure for PT_Read_GPRH PT_Write_GPRH.                                   
* ********************************************************************          
*                                                                               
*                                                                               
PTBR_GPRH DSECT                                                                 
PTBR_GPRH_CNTLGPRH DS 0BL2 Only used on write request                           
PTBR_GPRH_CNTLGPRH1 DS 0BL1                                                     
PTBR_GPRH_WGPRH0 EQU X'80' Write content of GPRH 0                              
PTBR_GPRH_WGPRH1 EQU X'40' Write content of GPRH 1                              
PTBR_GPRH_WGPRH2 EQU X'20' Write content of GPRH 2                              
PTBR_GPRH_WGPRH3 EQU X'10' Write content of GPRH 3                              
PTBR_GPRH_WGPRH4 EQU X'08' Write content of GPRH 4                              
PTBR_GPRH_WGPRH5 EQU X'04' Write content of GPRH 5                              
PTBR_GPRH_WGPRH6 EQU X'02' Write content of GPRH 6                              
PTBR_GPRH_WGPRH7 EQU X'01' Write content of GPRH 7                              
         ORG   PTBR_GPRH_CNTLGPRH1+X'00000001'                                  
PTBR_GPRH_CNTLGPRH2 DS 0BL1                                                     
PTBR_GPRH_WGPRH8 EQU X'80' Write content of GPRH 8                              
PTBR_GPRH_WGPRH9 EQU X'40' Write content of GPRH 9                              
PTBR_GPRH_WGPRH10 EQU X'20' Write content of GPRH10                             
PTBR_GPRH_WGPRH11 EQU X'10' Write content of GPRH11                             
PTBR_GPRH_WGPRH12 EQU X'08' Write content of GPRH12                             
PTBR_GPRH_WGPRH13 EQU X'04' Write content of GPRH13                             
PTBR_GPRH_WGPRH14 EQU X'02' Write content of GPRH14                             
PTBR_GPRH_WGPRH15 EQU X'01' Write content of GPRH15                             
         ORG   PTBR_GPRH_CNTLGPRH+X'00000002'                                   
PTBR_GPRH_CNTLMISC DS 1BL2 Only used on write request                           
         DS    1CL0012   Reserved                                               
PTBR_GPRH_GPRHS DS 0CL0064 GP High registers.                                   
PTBR_GPRH_GPRH00 DS 1FL4 GPRH 00                                                
PTBR_GPRH_GPRH01 DS 1FL4 GPRH 01                                                
PTBR_GPRH_GPRH02 DS 1FL4 GPRH 02                                                
PTBR_GPRH_GPRH03 DS 1FL4 GPRH 03                                                
PTBR_GPRH_GPRH04 DS 1FL4 GPRH 04                                                
PTBR_GPRH_GPRH05 DS 1FL4 GPRH 05                                                
PTBR_GPRH_GPRH06 DS 1FL4 GPRH 06                                                
PTBR_GPRH_GPRH07 DS 1FL4 GPRH 07                                                
PTBR_GPRH_GPRH08 DS 1FL4 GPRH 08                                                
PTBR_GPRH_GPRH09 DS 1FL4 GPRH 09                                                
PTBR_GPRH_GPRH10 DS 1FL4 GPRH 10                                                
PTBR_GPRH_GPRH11 DS 1FL4 GPRH 11                                                
PTBR_GPRH_GPRH12 DS 1FL4 GPRH 12                                                
PTBR_GPRH_GPRH13 DS 1FL4 GPRH 13                                                
PTBR_GPRH_GPRH14 DS 1FL4 GPRH 14                                                
PTBR_GPRH_GPRH15 DS 1FL4 GPRH 15                                                
         DS    1CL0008   Reserved                                               
PTBR_GPRH_LEN EQU *-PTBR_GPRH                                                   
*                                                                               
* ********************************************************************          
* * Structure for PT_Read_Block and PT_Write_Block.                  *          
* ********************************************************************          
*                                                                               
*                                                                               
PTBR_BLOCK DSECT                                                                
PTBR_BLOCK_AADDR DS 1AL4 address of area to read                                
PTBR_BLOCK_ALEN DS 1FL4  length of area to read                                 
         DS    1CL0008   Reserved                                               
PTBR_BLOCK_BUF DS 0C     area to read into or write from. Must be at   X        
                         least PtBR_Block_ALen bytes large                      
PTBR_BLOCK_LEN EQU *-PTBR_BLOCK                                                 
PTBR_BLOCK64 DSECT                                                              
PTBR_BLOCK_AADDR64 DS AD   address of area to read                              
PTBR_BLOCK_ALEN64 DS 1FL4  length of area to read                               
         DS    1CL0004   Reserved                                               
PTBR_BLOCK_BUF64 DS 0C   area to read into or write from. Must be at   X        
                         least PtBR_Block_ALen bytes large                      
PTBR_BLOCK_LEN64 EQU *-PTBR_BLOCK64                                             
*                                                                               
* ********************************************************************          
* * Structure for PT_Read_D and PT_Write_D.                          *          
* ********************************************************************          
*                                                                               
*                                                                               
PTBR_D   DSECT                                                                  
PTBR_D_WORDPTR DS 1AL4   Address of fullword of data                            
PTBR_D_WORD DS 1FL4      fullword of data at specified address for a   X        
                         read request or the data to be written to the X        
                         specified address for a write request                  
PTBR_D_LEN EQU *-PTBR_D                                                         
PTBR_D64 DSECT                                                                  
PTBR_D_WORDPTR64 DS AD   Address of fullword of data                            
PTBR_D_WORD64 DS 1FL4    fullword of data at specified address for a   X        
                         read request or the data to be written to the X        
                         specified address for a write request                  
PTBR_D_LEN64 EQU *-PTBR_D64                                                     
*                                                                               
* ********************************************************************          
* * Structure for PT_Read_I and PT_Write_I.                          *          
* ********************************************************************          
*                                                                               
*                                                                               
PTBR_I   DSECT                                                                  
PTBR_I_WORDPTR DS 1AL4   Address of fullword of program data                    
PTBR_I_WORD DS 1FL4      fullword of program data at specified address X        
                         for a read request or the program data to be  X        
                         written to the specified address for a write  X        
                         request                                                
PTBR_I_LEN EQU *-PTBR_I                                                         
PTBR_I64 DSECT                                                                  
PTBR_I_WORDPTR64 DS AD   Address of fullword of program data                    
PTBR_I_WORD64 DS 1FL4    fullword of program data at specified address X        
                         for a read request or the program data to be  X        
                         written to the specified address for a write  X        
                         request                                                
PTBR_I_LEN64 EQU *-PTBR_I64                                                     
*                                                                               
* ********************************************************************          
* * Structure for PT_Read_U.                                         *          
* ********************************************************************          
*                                                                               
*                                                                               
PTBR_U   DSECT                                                                  
PTBR_U_NUMOFFSETS DS 1FL4 Number of entries in offset/control word     X        
                         array                                                  
         DS    1CL0004   Reserved                                               
PTBR_U_OWARRAY DS 0CL0008 Array of offsets and control words                    
PTBR_U_OFFSET DS 1FL4    Offset of fullword of control information              
PTBR_U_WORD DS 1FL4      fullword of control information from user     X        
                         area in the debugged process                           
PTBR_U_LEN EQU *-PTBR_U