COMPILATION LISTING OF SEGMENT probe_statement_number_ Compiled by: Multics PL/I Compiler, Release 31a, of October 12, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 10/24/88 1604.4 mst Mon Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1988 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 /****^ HISTORY COMMENTS: 15* 1) change(88-09-07,WAAnderson), approve(88-09-30,MCR7952), 16* audit(88-09-30,JRGray), install(88-10-24,MR12.2-1184): 17* Added format control comment to make the source more readable. 18* END HISTORY COMMENTS */ 19 20 21 /* format: style1,insnl,ifthendo,indthenelse,^indnoniterdo,^inditerdo,indcom,^indthenbegin,^indprocbody,ind2,ll78,initcol0,dclind4,idind24,struclvlind1,comcol41 */ 22 23 /**** * * * * * * * * * * * * * * * * * * * * * * * */ 24 25 probe_statement_number_: 26 proc (P_probe_info_ptr, P_location, P_seg_info_ptr) returns (fixed bin); 27 28 /* * This routine is used to find the statement number (the index in the 29* * array of map_array entries) of a given location in the object program. 30* * In order to save time, it first estimates the location of the entry. 31* * 32* * Created in the mists of antiquity, probably by J. M. Broughton 33* * Converted to probe 4.0 and renamed to probe_statement_number_, 05/28/79 W. Olin Sibert */ 34 35 dcl ( 36 P_probe_info_ptr pointer, 37 P_location bit (18), /* offset in object program */ 38 P_seg_info_ptr pointer 39 ) parameter; 40 41 dcl found_statement fixed bin; 42 43 dcl 1 map_array (1) aligned based like statement_map; 44 45 dcl probe_info_ptr pointer; /* to avoid including probe_info */ 46 dcl seg_info_ptr pointer; 47 dcl loc fixed bin (24); 48 /* binary version of location */ 49 dcl sp pointer; /* start of statement map */ 50 dcl first fixed bin (24); 51 /* first location in program */ 52 dcl last fixed bin (24); 53 /* last location plus one */ 54 dcl try fixed bin;/* first estimate of statement number */ 55 dcl (i, j) fixed bin; 56 57 dcl (binary, divide, fixed, null) 58 builtin; 59 /* */ 60 61 /* get pointers to statemen_map, etc, and make guess as to where entry is */ 62 63 probe_info_ptr = P_probe_info_ptr; 64 seg_info_ptr = P_seg_info_ptr; 65 66 if seg_info_ptr = null () 67 then /* something wrong with it */ 68 goto NOT_FOUND; 69 70 loc = binary (P_location, 18, 0); 71 sp = seg_info_ptr -> seg_info.statement_map_ptr; 72 if sp = null 73 then goto NOT_FOUND; /* caller may worry about error */ 74 75 first = binary (sp -> map_array (1).location, 18, 0); 76 if loc < first 77 then goto NOT_FOUND; /* location is before beginning */ 78 last = 79 binary (sp -> map_array (seg_info_ptr -> seg_info.map_size).location, 80 18, 0); 81 if loc >= last 82 then goto NOT_FOUND; /* location is after end */ 83 84 try = divide (seg_info_ptr -> seg_info.map_size * (loc - first), 85 (last - first), 17, 0) + 1; 86 87 /* look for appropriate map entry, ie one containing location */ 88 89 do i = try by 1 /* if too big, look for entry above loc wanted */ 90 while (loc > fixed (sp -> map_array (i).location)); 91 end; 92 93 do j = i by -1 /* look for one below loc, if too small */ 94 while (loc < fixed (sp -> map_array (j).location)); 95 end; 96 97 found_statement = j; /* if it was equal, it will fall through */ 98 99 return (found_statement); 100 101 102 NOT_FOUND: 103 found_statement = -1; 104 return (found_statement); 105 106 /* */ 107 1 1 /* BEGIN INCLUDE FILE ... probe_seg_info.incl.pl1 1 2* 1 3* 25 June 79 JRDavis 1 4* 1 5* Modified 7 April 1983, TO - Add fields for character offset/line 1 6* correction per file. 1 7**/ 1 8 1 9 dcl 1 seg_info based aligned, /* place to remember information about object seg */ 1 10 2 language_type fixed bin, /* language of source program */ 1 11 2 bits aligned, 1 12 3 ignore_case bit (1) unal, 1 13 3 bound_segment bit (1) unaligned, 1 14 3 component bit (1) unaligned, 1 15 3 pad bit (33) unal, 1 16 2 names, /* where to find it */ 1 17 3 directory_name character (168) unal, /* what directory */ 1 18 3 entry_name character (32) unal, /* what segment */ 1 19 3 segname character (32) unal, /* procedure segname definition */ 1 20 2 identifier fixed bin (71), /* time of object creation */ 1 21 2 pointers, /* location of various parts of segment */ 1 22 3 symbol_header_ptr ptr unal, /* to symbol section */ 1 23 3 original_source_ptr ptr unal, /* to segment source map */ 1 24 3 statement_map_ptr ptr unal, /* to segment statement map */ 1 25 3 break_info ptr unal, /* for unbound segments, and start of chain for 1 26* bound ones, -> break_map !obsolete, I think! */ 1 27 3 chain ptr unal, /* to entry for next component if bound */ 1 28 3 linkage_ptr ptr unal, /* to linkage section */ 1 29 2 bounds aligned, /* structure of bounds information */ 1 30 3 text_bounds, 1 31 4 start fixed bin (35), 1 32 4 end fixed bin (35), 1 33 3 symbol_bounds, 1 34 4 start fixed bin (35), 1 35 4 end fixed bin (35), 1 36 2 map_size fixed bin, /* size of statement map */ 1 37 2 error_code fixed bin (35), /* errors encoutered while getting info, are recorded here */ 1 38 2 bound_create_time fixed bin (71), /* time seg containing was bound or compiled. */ 1 39 2 bound_sym_header ptr unal, /* to sym. section header for bound seg */ 1 40 2 pad (1) fixed bin (35), 1 41 1 42 2 nfiles fixed bin, 1 43 2 per_file (seg_info_nfiles refer (seg_info.nfiles)), 1 44 3 file_pointers ptr unal, 1 45 3 break_line (0:3) fixed bin (18) unsigned unaligned; 1 46 1 47 dcl seg_info_nfiles fixed bin; /* for allocation purposes */ 1 48 1 49 1 50 /* END INCLUDE FILE ... probe_seg_info.incl.pl1 */ 108 109 110 /* ;;;;;;; */ 111 2 1 dcl 1 statement_map aligned based, 2 2 2 location bit(18) unaligned, 2 3 2 source_id unaligned, 2 4 3 file bit(8), 2 5 3 line bit(14), 2 6 3 statement bit(5), 2 7 2 source_info unaligned, 2 8 3 start bit(18), 2 9 3 length bit(9); 112 113 114 end; /* probe_statement_number_ external procedure */ SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/24/88 1343.2 probe_statement_number_.pl1 >special_ldd>install>MR12.2-1184>probe_statement_number_.pl1 108 1 11/02/83 1845.0 probe_seg_info.incl.pl1 >ldd>include>probe_seg_info.incl.pl1 112 2 05/06/74 1751.6 statement_map.incl.pl1 >ldd>include>statement_map.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. P_location parameter bit(18) packed unaligned dcl 35 ref 25 70 P_probe_info_ptr parameter pointer dcl 35 ref 25 63 P_seg_info_ptr parameter pointer dcl 35 ref 25 64 binary builtin function dcl 57 ref 70 75 78 divide builtin function dcl 57 ref 84 first 000112 automatic fixed bin(24,0) dcl 50 set ref 75* 76 84 84 fixed builtin function dcl 57 ref 89 93 found_statement 000100 automatic fixed bin(17,0) dcl 41 set ref 97* 99 102* 104 i 000115 automatic fixed bin(17,0) dcl 55 set ref 89* 89* 93 j 000116 automatic fixed bin(17,0) dcl 55 set ref 93* 93* 97 last 000113 automatic fixed bin(24,0) dcl 52 set ref 78* 81 84 loc 000106 automatic fixed bin(24,0) dcl 47 set ref 70* 76 81 84 89 93 location based bit(18) array level 2 packed packed unaligned dcl 43 ref 75 78 89 93 map_array based structure array level 1 dcl 43 map_size 110 based fixed bin(17,0) level 2 dcl 1-9 ref 78 84 null builtin function dcl 57 ref 66 72 pointers 76 based structure level 2 dcl 1-9 probe_info_ptr 000102 automatic pointer dcl 45 set ref 63* seg_info based structure level 1 dcl 1-9 seg_info_ptr 000104 automatic pointer dcl 46 set ref 64* 66 71 78 84 sp 000110 automatic pointer dcl 49 set ref 71* 72 75 78 89 93 statement_map based structure level 1 dcl 2-1 statement_map_ptr 100 based pointer level 3 packed packed unaligned dcl 1-9 ref 71 try 000114 automatic fixed bin(17,0) dcl 54 set ref 84* 89 NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. seg_info_nfiles automatic fixed bin(17,0) dcl 1-47 NAMES DECLARED BY EXPLICIT CONTEXT. NOT_FOUND 000140 constant label dcl 102 ref 66 72 76 81 probe_statement_number_ 000013 constant entry external dcl 25 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 174 204 144 204 Length 406 144 10 166 27 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME probe_statement_number_ 82 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME probe_statement_number_ 000100 found_statement probe_statement_number_ 000102 probe_info_ptr probe_statement_number_ 000104 seg_info_ptr probe_statement_number_ 000106 loc probe_statement_number_ 000110 sp probe_statement_number_ 000112 first probe_statement_number_ 000113 last probe_statement_number_ 000114 try probe_statement_number_ 000115 i probe_statement_number_ 000116 j probe_statement_number_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. return_mac ext_entry divide_fx3 NO EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 25 000006 63 000020 64 000024 66 000027 70 000033 71 000042 72 000044 75 000050 76 000053 78 000055 81 000062 84 000064 89 000076 91 000112 93 000114 95 000130 97 000133 99 000135 102 000140 104 000142 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved