BPX1PTR (ptrace) example

The following code enables a process (PROCID) to be debugged with ptrace. For the callable service, see ptrace (BPX1PTR, BPX4PTR) — Control another process for debugging. For the data structure, see BPXYPTRC — Map parameters for ptrace. AMODE 64 callers use BPX4PTR (ptrace) example.
                                              
*        MVC   PROCID,  Process ID from fork                            
         SPACE ,                                                        
         CALL  BPX1PTR,              Debug another process             +
               (=A(PT_ATTACH),       Input: Request           BPXYPTRC +
               PROCID,               Input: Process ID                 +
               =A(0),                Input: Address                    +
               =A(0),                Input: Data                       +
               =A(0),                Input: Buffer                     +
               RETVAL,               Return value: 0, -1, or Request   +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               VL,MF=(E,PLIST)       ----------------------------------