Opened 2 years ago
Last modified 13 months ago
#336 closed enhancement
Enable ssu_ to be debugged using unbound components of bound_ssu_ with symbol tables. — at Version 1
| Reported by: | Gary Dixon | Owned by: | Eric Swenson |
|---|---|---|---|
| Priority: | major | Milestone: | MR12.9 |
| Component: | Standard Library | Version: | MR12.8 |
| Keywords: | Cc: |
Description (last modified by )
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)
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:
B583 ename = "";
B584 call hcs_$fs_get_seg_ptr ("ssu_et_", other_ssu_ptr, code);
B585 if (code ^= 0) then do; /* didn't find the refname at all */
B586 SWITCH_SSU_ET_REFNAME:
B587 call hcs_$fs_get_path_name (codeptr (ssu_invocation_), dirname, (0), ename, (0));
B588 if ename ^= "bound_ssu_" then return; /* skip all these tests if ssu_invocation_ is unbound */
B589 call term_$single_refname ("ssu_et_", (0)); /* terminate it, whether initiated or not */
B590 call hcs_$initiate (dirname, ename, "ssu_et_", 0, 0, (null ()), (0));
B591 end;
B592 else if pointer (other_ssu_ptr, 0) ^= pointer (codeptr (ssu_invocation_), 0) then go to SWITCH_SSU_ET_REFNAME;
B593 /* wrong object segment */
B594
B595 call hcs_$fs_get_seg_ptr ("ssu_requests_", other_ssu_ptr, code);
B596 if (code ^= 0) then do; /* didn't find the refname at all */
B597 SWITCH_SSU_REQUESTS_REFNAME:
B598 if ename = "" then
B599 call hcs_$fs_get_path_name (codeptr (ssu_invocation_), dirname, (0), ename, (0));
B600 if ename ^= "bound_ssu_" then return; /* skip all these tests if ssu_invocation_ is unbound */
B601 call term_$single_refname ("ssu_requests_", (0));
B602 /* terminate it, whether initiated or not */
B603 call hcs_$initiate (dirname, ename, "ssu_requests_", 0, 0, (null ()), (0));
B604 end;
B605 else if pointer (other_ssu_ptr, 0) ^= pointer (codeptr (ssu_invocation_), 0) then
B606 go to SWITCH_SSU_REQUESTS_REFNAME; /* wrong object segment */
B607
B608 call hcs_$fs_get_seg_ptr ("ssu_request_tables_", other_ssu_ptr, code);
B609 if (code ^= 0) then do; /* didn't find the refname at all */
B610 SWITCH_SSU_REQUEST_TABLES_REFNAME:
B611 if ename = "" then
B612 call hcs_$fs_get_path_name (codeptr (ssu_invocation_), dirname, (0), ename, (0));
B613 if ename ^= "bound_ssu_" then return; /* skip this test if ssu_invocation_ is unbound */
B614 call term_$single_refname ("ssu_request_tables_", (0));
B615 /* terminate it, whether initiated or not */
B616 call hcs_$initiate (dirname, ename, "ssu_request_tables_", 0, 0, (null ()), (0));
B617 end;
B618 else if pointer (other_ssu_ptr, 0) ^= pointer (codeptr (ssu_invocation_), 0) then
B619 go to SWITCH_SSU_REQUEST_TABLES_REFNAME; /* wrong object segment */
