﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
336	Enable ssu_ to be debugged using unbound components of bound_ssu_ with symbol tables.	Gary Dixon	Eric Swenson	"Most bound objects permit debugging using unbound components from the bound object (compiled with symbol tables, changes, etc).  

However the ssu_invocation_.pl1 component of bound_ssu_ takes precautions to ensure that any unbound components referenced as links by bound_ssu_ (like the ssu_et_ error table values, ssu_request_tables_ entries and ssu_requests_ built-in request subroutines) are found within the bound_ssu_ bound object containing the running ssu_invocation_ component.  The switch_ssu_refnames internal procedure implements this precaution.

The precaution is reasonable when running ssu_ from the bound_ssu_ bound object to ensure that all ssu_ components see the expected component versions (those in the bound_ssu_ segment).  Without such precaution, any developer version of ssu_et_, ssu_request_tables_ or ssu_requests_ found by the user's linker search paths might be invoked unexpectedly when running the installed bound_ssu_.

But this precaution makes it impossible to debug bound_ssu_ even if all components in bound_ssu_.s.archive are compiled (with symbol tables when possible), and referenced as unbound objects, and are each explicitly initiated with appropriate reference names.  

Therefore, the precaution should disable itself if it finds that ssu_invocation_ is itself an unbound object (rather than being a component within bound_ssu_) to permit debugging by a knowledgeable ssu_ developer or problem investigator.

The suggested enhancement is shown below.


{{{
cpa [lpn ssu_invocation_.p] == -he
A >ldd>sss>source>bound_ssu_.s.archive::ssu_invocation_.pl1 (original)
B >user_dir_dir>Multics>GDixon>work>ssu_parms>ssu_invocation_.pl1 (new)


A123      dcl  (addr, codeptr, null, pointer, rtrim, stackframeptr, string) builtin;
Changed by B to:
B131      dcl  (addr, codeptr, null, rtrim, segno, stackframeptr, string) builtin;


A576                call hcs_$fs_get_seg_ptr (""ssu_et_"", other_ssu_ptr, code);
A577                if (code ^= 0) then do;                           /* didn't find the refname at all */
A578      SWITCH_SSU_ET_REFNAME:
A579                     call term_$single_refname (""ssu_et_"", (0));  /* terminate it, whether initiated or not */
A580                     call hcs_$fs_get_path_name (codeptr (ssu_invocation_), dirname, (0), ename, (0));
A581                     call hcs_$initiate (dirname, ename, ""ssu_et_"", 0, 0, (null ()), (0));
A582                end;
A583                else if pointer (other_ssu_ptr, 0) ^= pointer (codeptr (ssu_invocation_), 0) then go to SWITCH_SSU_ET_REFNAME;
A584                                                                  /* wrong object segment */
A585      
A586                call hcs_$fs_get_seg_ptr (""ssu_requests_"", other_ssu_ptr, code);
A587                if (code ^= 0) then do;                           /* didn't find the refname at all */
A588      SWITCH_SSU_REQUESTS_REFNAME:
A589                     call term_$single_refname (""ssu_requests_"", (0));
A590                                                                  /* terminate it, whether initiated or not */
A591                     call hcs_$fs_get_path_name (codeptr (ssu_invocation_), dirname, (0), ename, (0));
A592                     call hcs_$initiate (dirname, ename, ""ssu_requests_"", 0, 0, (null ()), (0));
A593                end;
A594                else if pointer (other_ssu_ptr, 0) ^= pointer (codeptr (ssu_invocation_), 0) then
A595                     go to SWITCH_SSU_REQUESTS_REFNAME;           /* wrong object segment */
A596      
A597                call hcs_$fs_get_seg_ptr (""ssu_request_tables_"", other_ssu_ptr, code);
A598                if (code ^= 0) then do;                           /* didn't find the refname at all */
A599      SWITCH_SSU_REQUEST_TABLES_REFNAME:
A600                     call term_$single_refname (""ssu_request_tables_"", (0));
A601                                                                  /* terminate it, whether initiated or not */
A602                     call hcs_$fs_get_path_name (codeptr (ssu_invocation_), dirname, (0), ename, (0));
A603                     call hcs_$initiate (dirname, ename, ""ssu_request_tables_"", 0, 0, (null ()), (0));
A604                end;
A605                else if pointer (other_ssu_ptr, 0) ^= pointer (codeptr (ssu_invocation_), 0) then
A606                     go to SWITCH_SSU_REQUEST_TABLES_REFNAME;     /* wrong object segment */
Changed by B to:
B584                ename = """";
B585                call hcs_$fs_get_seg_ptr (""ssu_et_"", other_ssu_ptr, code);
B586                if (code ^= 0) then do;                           /* didn't find the refname at all */
B587      SWITCH_SSU_ET_REFNAME:
B588                     call hcs_$fs_get_path_name (codeptr (ssu_invocation_), dirname, (0), ename, (0));
B589                     if ename ^= ""bound_ssu_"" then return;        /* skip all these tests if ssu_invocation_ is unbound */
B590                     call term_$single_refname (""ssu_et_"", (0));  /* terminate it, whether initiated or not */
B591                     call hcs_$initiate (dirname, ename, ""ssu_et_"", 0, 0, (null ()), (0));
B592                end;
B593                else if segno (other_ssu_ptr) ^= segno (codeptr (ssu_invocation_)) then go to SWITCH_SSU_ET_REFNAME;
B594                                                                  /* wrong object segment */
B595      
B596                call hcs_$fs_get_seg_ptr (""ssu_requests_"", other_ssu_ptr, code);
B597                if (code ^= 0) then do;                           /* didn't find the refname at all */
B598      SWITCH_SSU_REQUESTS_REFNAME:
B599                     if ename = """" then
B600                          call hcs_$fs_get_path_name (codeptr (ssu_invocation_), dirname, (0), ename, (0));
B601                     if ename ^= ""bound_ssu_"" then return;        /* skip all these tests if ssu_invocation_ is unbound */
B602                     call term_$single_refname (""ssu_requests_"", (0));
B603                                                                  /* terminate it, whether initiated or not */
B604                     call hcs_$initiate (dirname, ename, ""ssu_requests_"", 0, 0, (null ()), (0));
B605                end;
B606                else if segno (other_ssu_ptr) ^= segno (codeptr (ssu_invocation_)) then
B607                     go to SWITCH_SSU_REQUESTS_REFNAME;           /* wrong object segment */
B608      
B609                call hcs_$fs_get_seg_ptr (""ssu_request_tables_"", other_ssu_ptr, code);
B610                if (code ^= 0) then do;                           /* didn't find the refname at all */
B611      SWITCH_SSU_REQUEST_TABLES_REFNAME:
B612                     if ename = """" then
B613                          call hcs_$fs_get_path_name (codeptr (ssu_invocation_), dirname, (0), ename, (0));
B614                     if ename ^= ""bound_ssu_"" then return;        /* skip this test if ssu_invocation_ is unbound */
B615                     call term_$single_refname (""ssu_request_tables_"", (0));
B616                                                                  /* terminate it, whether initiated or not */
B617                     call hcs_$initiate (dirname, ename, ""ssu_request_tables_"", 0, 0, (null ()), (0));
B618                end;
B619                else if segno (other_ssu_ptr) ^= segno (codeptr (ssu_invocation_)) then
B620                     go to SWITCH_SSU_REQUEST_TABLES_REFNAME;     /* wrong object segment */
}}}

"	enhancement	new	major		Standard Library	MR12.8			
