/* attach TI: for PL/I symbolic debugger */ attach_ti: procedure; %include 'brksymdef.pli'; /*for ti_attached*/ %include 'tiqio.inc'; dcl io_att fixed bin(15) external, /*defined in debasm*/ (true, false) fixed bin(1) external, err fixed bin(15); /**************************************************************************************************************/ call tiqio(io_att,'attach',nnull,0,err); ti_attached = true; end; /* detach TI: for PL/I symbolic debugger */ detach_ti: procedure; %include 'brksymdef.pli'; /*for ti_attached*/ %include 'tiqio.inc'; dcl io_det fixed bin(15) external, /*defined in debasm*/ (true, false) fixed bin(1) external, err fixed bin(15); /**************************************************************************************************************/ if ti_attached then call tiqio(io_det,'detach',nnull,0,err); /*dont call if not attached or it will give error message (for example in call by debfinish)*/ ti_attached = false; end; /* routine to do a QIO to TI: for PL/I symbolic debugger %include 'tiqio.inc' for the proper entry declaration */ tiqio: procedure(function_word, function_name, parm1, parm2, err); dcl function_word fixed bin(15), /*QIO function code*/ function_name char(*), /*what we're doing, for error reporting*/ parm1 pointer, /*QIO parm, usually pointer to buffer*/ parm2 fixed bin(15), /*QIO parm, usually buffer size*/ err fixed bin(15); /*dsw or I/O status*/ %include 'putdef.pli'; dcl qio_event fixed bin(15) external, no_error fixed bin(15) external, /*IS.SUC RSX dsw/iostatus code*/ ti_lun fixed bin(15) static initial(1), /**we know that PL/I always opens TI: on lun 1*/ qio_parms(6) fixed bin(15) static initial((6)0), /*static only to conserve memory*/ parmaddr pointer, a_word fixed bin(15) based, status(2) fixed bin(15) static /*ditto*/, dsw fixed bin(15), iostatus fixed bin(7), a_byte fixed bin(7) based; /**************************************************************************************************************/ qio_parms(1) = addr(parm1)->a_word; /*qio_parms(1) = parm1*/ qio_parms(2) = parm2; status(1) = 0; call wtqio(function_word, ti_lun, qio_event, /*no pri*/, status, qio_parms, dsw); iostatus = addr(status(1))->a_byte; /*i/o status code is low-order byte*/ err = dsw; if dsw = no_error then err = iostatus; if err ^= no_error then call put_skip_list('error on ', function_name, ' QIOW to TI:, dsw =', dsw, ', I/O status =', iostatus); end;