COMPILATION LISTING OF SEGMENT db_parse_condition Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/04/82 1822.5 mst Thu Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 db_parse_condition: procedure; 12 13 14 /* This procedure is called to parse condition data involved with a conditional break. 15** This procedure was created so that semantic considerations would not be present 16** in db_break. 17** 18** Written in Dec 72 for the 6180 by Bill Silver. 19**/ 20 21 22 23 dcl arg_cond_ptr ptr, /* Pointer to condition data passed as an 24* * argument. */ 25 26 break_map_ptr ptr, /* Pointer to the segments break map. */ 27 28 cond_data char(236), /* Return area where condition data is 29* * actually built. */ 30 31 cond_len fixed bin, /* Actual size of the condition data. 32* * 0 => no condition. */ 33 34 sntp ptr; /* Pointer to debug's snt data. */ 35 36 37 dcl il char(132) aligned, 38 (lin, ill, acode) fixed bin; 39 40 41 dcl cond_flag fixed bin; /* Return flag indicating whether condition 42* * was met or not. 0 => YES, 1 => NO. */ 43 44 45 dcl return_string char(72) var; /* Used to return compare line. 46* 47* 48*/* This constant indicates the size of the whole condition data area. */ 49 50 dcl cond_size fixed bin init(224) internal static; 51 52 53 54 dcl cond_ptr ptr; /* Pointer to the condition data. */ 55 56 57 dcl 1 cond_map based ( cond_ptr ) aligned, 58 (2 relation, /* Relation between two variables. 59* * 1 => "=", 2 => "^=". */ 60 2 p1, /* offset of first comparand */ 61 2 p2, /* ditto for 2nd (both are -1 if variable) */ 62 2 lname1, /* length of name1 */ 63 2 lname2) fixed bin, /* length of name2 */ 64 2 (name1,name2) char(40), /* names of variables used in comparison */ 65 2 compare char(64) aligned, /* contents of compare line for cond. break */ 66 2 (constant1,constant2) bit(288) aligned; /* constants used in comparison */ 67 68 69 70 dcl (tp1,tp2,tp) ptr; 71 72 dcl 73 db_sym ext entry (char (72) var,ptr,ptr,fixed bin, fixed bin, 74 char(1) aligned, char(*) aligned, fixed bin, fixed bin, fixed bin(35)), 75 ioa_$ioa_stream ext entry options(variable), 76 db_parse_arg ext entry (char (132) aligned,fixed bin,fixed bin,ptr,fixed bin,fixed bin); 77 1 1 /* BEGIN INCLUDE FILE . . . db_ext_stat_.incl.pl1 1 2* * 1 3* * This include file is used to reference the common data that is passed from the 1 4* * main debug procedure "debug" to other debug procedures. This data is in db_ext_stat_.alm 1 5* * 1 6* * modified 7/75 by S.E. Barr for the break instructions 1 7**/ 1 8 1 9 dcl 1 db_ext_stat_$db_ext_stat_ ext static aligned, 1 10 1 11 2 debug_input char (32) aligned, /* Input switch name. Initially "user_input" */ 1 12 2 debug_output char (32) aligned, /* output switch name. Initially "user_output" */ 1 13 2 return_label label, /* The label used to do a non local goto out of debug when 1 14* it was entered via a fault. It will go to debug in 1 15* another frame. */ 1 16 1 17 2 debug_io_ptr (2) ptr, /* pointers to iocb for i/o 1 18* 1 = input switch iocb ptr 1 19* 2 = output switch iocb ptr */ 1 20 2 flags aligned, 1 21 3 debug_io_attach (2) bit (1) unaligned, /* 1= debug made the attachment */ 1 22 3 debug_io_open (2) bit (1) unaligned, /* 1 = debug opened the switch */ 1 23 3 in_debug bit (1) unaligned, /* Switch for the any_other condition. 0 = send the 1 24* condition on; 1 = use the debug condition handler */ 1 25 3 static_handler_call bit (1) unal, /* ON if mme2 call from static handler */ 1 26 3 pad bit (30) unaligned; /* Reserved for future use */ 1 27 dcl db_ext_stat_$break_instructions (9) bit (36) ext static aligned; 1 28 1 29 /* END OF INCLUDE FILE ... db_ext_stat_.incl.pl1 */ 78 79 80 dcl 81 (i,j) fixed bin, 82 code fixed bin(35), 83 exec fixed bin, 84 l fixed bin, 85 no fixed bin, 86 old_value fixed bin, 87 pc fixed bin, 88 pflag fixed bin, 89 t2 fixed bin, 90 temp fixed bin, 91 relation fixed bin; 92 93 dcl pcm fixed bin; 94 dcl cp ptr; 95 96 97 dcl char1 (32) char(1) based, 98 99 char32 char(32) based; 100 101 dcl 102 (c1,c2) char (1) aligned, 103 bits bit(pc) based, 104 n1 char(72) var, 105 str char (exec) based; 106 107 108 dcl 109 addr builtin, 110 fixed builtin, 111 null builtin, 112 ptr builtin, 113 rel builtin, 114 substr builtin, 115 unspec builtin; 116 /* */ 117 check: entry ( break_map_ptr, arg_cond_ptr, sntp, cond_flag ); 118 119 120 /* This entry is called by db_break to determine if the condition of the specified 121** break has been met. The answer will be returned in cond_flag where: 122** 0 => YES, and 1 => NO. Note, in the case of an error the cond_flag will 123** be set to 0. 124**/ 125 126 127 cond_ptr = arg_cond_ptr; /* Copy argument pointer. */ 128 129 pc = 36; /* Default size to compare is 1 word. */ 130 cond_flag = 0; /* Initialize return arg. */ 131 132 relation = cond_map.relation; 133 134 i = cond_map.p1; /* get default pointer to data */ 135 if i < 0 then do; 136 n1 = substr(cond_map.name1,1,cond_map.lname1); 137 if substr (n1,1,1) = "(" then do; /* got a numeric pointer (xxx|yyy) */ 138 call db_parse_arg((n1),2,cond_map.lname1,addr(cond_map.constant1),j,exec); 139 if substr(cond_map.constant1,31,6) ^= "100011"b then go to badcond; /* not "43" its pair */ 140 unspec(tp1) = substr(cond_map.constant1,1,72); 141 go to next_constant; 142 end; 143 call db_sym(n1,sntp,tp1,temp,t2,c1,c2,pc,pcm,code); /* get pointer to first data item */ 144 if code ^= 0 then do; 145 badcond: call ioa_$ioa_stream (debug_output, "Error in conditional break."); 146 return; 147 end; 148 if c2 = "a" then pc = pc * 9; 149 else if c2 = "p" then pc = 72; 150 end; 151 else tp1 = addr(cond_map.constant1); 152 next_constant: 153 i = cond_map.p2; 154 if i < 0 then do; 155 n1 = substr(cond_map.name2,1,cond_map.lname2); 156 call db_sym(n1,sntp,tp2,temp,t2,c1,c2,pc,pcm,code); 157 if code ^= 0 then go to badcond; 158 if c2 = "a" then pc = pc * 9; 159 else if c2 = "p" then pc = 72; 160 end; 161 else tp2 = addr(cond_map.constant2); 162 163 164 if tp1 -> bits = tp2 -> bits then do; /* make compare */ 165 if relation = 2 then cond_flag = 1; /* if looking for not equal we lose */ 166 return; 167 end; 168 if relation = 1 then cond_flag = 1; /* lose if looking for equal */ 169 170 171 return; 172 /* */ 173 print_line: entry ( arg_cond_ptr, return_string ); 174 175 176 /* This entry is called by db_break in order to get a string of data which it 177** can print about a condition. 178**/ 179 180 181 return_string = arg_cond_ptr -> cond_map.compare; 182 183 184 return; 185 /* */ 186 set: entry(il,lin,ill,cond_len,cond_data,acode); 187 188 189 /* This entry is called to parse the condition line entered by the user and 190** to convert this input line into the appropriate condition data. The condition 191** data will then be returned to the caller ( db_parse ). 192**/ 193 194 195 196 acode = 0; /* zero out return error code */ 197 pflag = 0; /* reset pointer relation flag */ 198 199 cond_ptr = addr(cond_data); /* We will build the condition data 200* * in our own area. */ 201 202 pc = 36; /* default number of bits to compare */ 203 if ill <= lin then do; /* resetting conditional break ? */ 204 cond_len = 0; /* YES, reset condition. */ 205 cond_data = " "; 206 return; 207 end; 208 cond_map.compare = substr(il,lin,ill-lin); /* save compare line */ 209 tp = addr(cond_map.constant1); /* default pointer to constant area */ 210 call db_parse_arg(il,lin,ill,tp,j,exec); /* pick off first argument */ 211 if j = 0 then do; /* a variable */ 212 cond_map.name1 = tp -> str; /* copy name of variable into break */ 213 if tp -> char1(1) = "/" then /* test for pointer */ 214 if substr(il,lin,1) = "/" then do; /* handle form /xxx/yyyy */ 215 pflag = 1; /* set flag for pointer case */ 216 cp = addr(il); /* get pointer to original string */ 217 tp -> char1(1) = "("; /* start change of form to (xxx|yyyy) */ 218 tp -> char1(exec + 1) = "|"; 219 do l = 1 to ill - lin while (cp->char1(lin + l) >= "0" & 220 cp->char1(lin + l) <= "7"); 221 tp -> char1(l + exec + 1) = cp -> char1(lin + l); 222 end; 223 224 exec = exec + l + 1; 225 lin = lin + l; 226 tp -> char1(exec) = ")"; 227 cond_map.name1 = substr(tp->char32,1,exec); 228 end; 229 cond_map.lname1 = exec; 230 cond_map.p1 = -1; /* indicate we've got a variable */ 231 end; 232 else if j < 0 then do; /* syntax error */ 233 ser: acode = 100; /* special error code indicates syntax error */ 234 return; 235 end; 236 else cond_map.p1 = 1; /* Filll in offset of constant area */ 237 238 skip_blanks: do lin = lin to ill while(substr(il,lin,1) = " "); /* skip blanks */ 239 end; 240 if lin >= ill then go to ser; 241 if pflag = 1 then /* are we handling pointer relation */ 242 if substr(il,lin,2) ="&t" then /* is it valid */ 243 do; 244 pflag = 0; 245 lin = lin + 2; /* start beyond the "&t" */ 246 go to skip_blanks; /* scan for next symbol */ 247 end; 248 else go to ser; /* incorrect syntax for pointer relation */ 249 if substr(il,lin,1) = "=" then relation = 1; /* get compare relation */ 250 else if substr(il,lin,2) = "^=" then do; /* not-equal compare relation */ 251 relation = 2; 252 lin = lin + 1; /* one more character to skip */ 253 end; 254 else do; /* bad compare relation */ 255 call ioa_$ioa_stream (debug_output, "Only ""="" and ""^^="" allowed."); 256 code0: acode = 100; 257 return; 258 end; 259 260 lin = lin + 1; /* scan over (rest of) compare relation */ 261 tp = addr(cond_map.constant2); /* set default pointer */ 262 call db_parse_arg(il,lin,ill,tp,j,exec); /* get second argument */ 263 if j = 0 then do; /* a variable */ 264 cond_map.name2 = tp -> str; /* copy name of variable into break */ 265 cond_map.lname2 = exec; 266 cond_map.p2 = -1; /* indicate we've got variable */ 267 end; 268 else if j < 0 then go to ser; 269 else cond_map.p2 = 2; 270 cond_map.relation = relation; /* Save relation for when condition 271* * is tested. */ 272 273 274 /* Now return condition line we have just made. Return the actual number of 275** characters used. The rest of the are will just be blank. 276**/ 277 278 cond_len = cond_size; 279 280 281 282 end db_parse_condition; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/04/82 1628.7 db_parse_condition.pl1 >dumps>old>recomp>db_parse_condition.pl1 78 1 08/12/76 1010.2 db_ext_stat_.incl.pl1 >ldd>include>db_ext_stat_.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. acode parameter fixed bin(17,0) dcl 37 set ref 186 196* 233* 256* addr builtin function dcl 108 ref 138 138 151 161 199 209 216 261 arg_cond_ptr parameter pointer dcl 23 ref 117 127 173 181 bits based bit unaligned dcl 101 ref 164 164 break_map_ptr parameter pointer dcl 23 ref 117 c1 000126 automatic char(1) dcl 101 set ref 143* 156* c2 000127 automatic char(1) dcl 101 set ref 143* 148 149 156* 158 159 char1 based char(1) array unaligned dcl 97 set ref 213 217* 218* 219 219 221* 221 226* char32 based char(32) unaligned dcl 97 ref 227 code 000112 automatic fixed bin(35,0) dcl 80 set ref 143* 144 156* 157 compare 31 based char(64) level 2 dcl 57 set ref 181 208* cond_data parameter char(236) unaligned dcl 23 set ref 186 199 205* cond_flag parameter fixed bin(17,0) dcl 41 set ref 117 130* 165* 168* cond_len parameter fixed bin(17,0) dcl 23 set ref 186 204* 278* cond_map based structure level 1 dcl 57 cond_ptr 000100 automatic pointer dcl 54 set ref 127* 132 134 136 136 138 138 138 139 140 151 152 155 155 161 199* 208 209 212 227 229 230 236 261 264 265 266 269 270 cond_size constant fixed bin(17,0) initial dcl 50 ref 278 constant1 51 based bit(288) level 2 dcl 57 set ref 138 138 139 140 151 209 constant2 61 based bit(288) level 2 dcl 57 set ref 161 261 cp 000124 automatic pointer dcl 94 set ref 216* 219 219 221 db_ext_stat_$db_ext_stat_ 000016 external static structure level 1 dcl 1-9 db_parse_arg 000014 constant entry external dcl 72 ref 138 210 262 db_sym 000010 constant entry external dcl 72 ref 143 156 debug_output 10 000016 external static char(32) level 2 dcl 1-9 set ref 145* 255* exec 000113 automatic fixed bin(17,0) dcl 80 set ref 138* 210* 212 218 221 224* 224 226 227 229 262* 264 265 i 000110 automatic fixed bin(17,0) dcl 80 set ref 134* 135 152* 154 il parameter char(132) dcl 37 set ref 186 208 210* 213 216 238 241 249 250 262* ill parameter fixed bin(17,0) dcl 37 set ref 186 203 208 210* 219 238 240 262* ioa_$ioa_stream 000012 constant entry external dcl 72 ref 145 255 j 000111 automatic fixed bin(17,0) dcl 80 set ref 138* 210* 211 232 262* 263 268 l 000114 automatic fixed bin(17,0) dcl 80 set ref 219* 219 219* 221 221* 224 225 lin parameter fixed bin(17,0) dcl 37 set ref 186 203 208 208 210* 213 219 219 219 221 225* 225 238* 238 238* 240 241 245* 245 249 250 252* 252 260* 260 262* lname1 3 based fixed bin(17,0) level 2 dcl 57 set ref 136 138* 229* lname2 4 based fixed bin(17,0) level 2 dcl 57 set ref 155 265* n1 000130 automatic varying char(72) dcl 101 set ref 136* 137 138 143* 155* 156* name1 5 based char(40) level 2 dcl 57 set ref 136 212* 227* name2 17 based char(40) level 2 dcl 57 set ref 155 264* p1 1 based fixed bin(17,0) level 2 dcl 57 set ref 134 230* 236* p2 2 based fixed bin(17,0) level 2 dcl 57 set ref 152 266* 269* pc 000115 automatic fixed bin(17,0) dcl 80 set ref 129* 143* 148* 148 149* 156* 158* 158 159* 164 164 202* pcm 000122 automatic fixed bin(17,0) dcl 93 set ref 143* 156* pflag 000116 automatic fixed bin(17,0) dcl 80 set ref 197* 215* 241 244* relation based fixed bin(17,0) level 2 in structure "cond_map" dcl 57 in procedure "db_parse_condition" set ref 132 270* relation 000121 automatic fixed bin(17,0) dcl 80 in procedure "db_parse_condition" set ref 132* 165 168 249* 251* 270 return_string parameter varying char(72) dcl 45 set ref 173 181* sntp parameter pointer dcl 23 set ref 117 143* 156* str based char unaligned dcl 101 ref 212 264 substr builtin function dcl 108 ref 136 137 139 140 155 208 213 227 238 241 249 250 t2 000117 automatic fixed bin(17,0) dcl 80 set ref 143* 156* temp 000120 automatic fixed bin(17,0) dcl 80 set ref 143* 156* tp 000106 automatic pointer dcl 70 set ref 209* 210* 212 213 217 218 221 226 227 261* 262* 264 tp1 000102 automatic pointer dcl 70 set ref 140* 143* 151* 164 tp2 000104 automatic pointer dcl 70 set ref 156* 161* 164 unspec builtin function dcl 108 set ref 140* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. db_ext_stat_$break_instructions external static bit(36) array dcl 1-27 fixed builtin function dcl 108 no automatic fixed bin(17,0) dcl 80 null builtin function dcl 108 old_value automatic fixed bin(17,0) dcl 80 ptr builtin function dcl 108 rel builtin function dcl 108 NAMES DECLARED BY EXPLICIT CONTEXT. badcond 000217 constant label dcl 145 ref 139 157 check 000045 constant entry external dcl 117 code0 000755 constant label dcl 256 db_parse_condition 000032 constant entry external dcl 11 next_constant 000260 constant label dcl 152 ref 141 print_line 000417 constant entry external dcl 173 ser 000645 constant label dcl 233 ref 240 241 268 set 000447 constant entry external dcl 186 skip_blanks 000654 constant label dcl 238 ref 246 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1142 1162 1042 1152 Length 1360 1042 20 162 100 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME db_parse_condition 204 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME db_parse_condition 000100 cond_ptr db_parse_condition 000102 tp1 db_parse_condition 000104 tp2 db_parse_condition 000106 tp db_parse_condition 000110 i db_parse_condition 000111 j db_parse_condition 000112 code db_parse_condition 000113 exec db_parse_condition 000114 l db_parse_condition 000115 pc db_parse_condition 000116 pflag db_parse_condition 000117 t2 db_parse_condition 000120 temp db_parse_condition 000121 relation db_parse_condition 000122 pcm db_parse_condition 000124 cp db_parse_condition 000126 c1 db_parse_condition 000127 c2 db_parse_condition 000130 n1 db_parse_condition THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. db_parse_arg db_sym ioa_$ioa_stream THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. db_ext_stat_$db_ext_stat_ LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000031 117 000037 127 000055 129 000060 130 000062 132 000064 134 000066 135 000070 136 000071 137 000101 138 000105 139 000135 140 000142 141 000145 143 000146 144 000215 145 000217 146 000240 148 000241 149 000251 150 000255 151 000256 152 000260 154 000263 155 000264 156 000274 157 000345 158 000347 159 000357 160 000363 161 000364 164 000366 165 000375 166 000403 168 000404 171 000412 173 000413 181 000427 184 000440 186 000441 196 000454 197 000456 199 000457 202 000461 203 000463 204 000466 205 000467 206 000473 208 000474 209 000502 210 000504 211 000525 212 000527 213 000535 215 000550 216 000552 217 000554 218 000557 219 000562 221 000606 222 000614 224 000616 225 000622 226 000625 227 000632 229 000636 230 000641 231 000643 232 000644 233 000645 234 000650 236 000651 238 000654 239 000672 240 000674 241 000676 244 000707 245 000710 246 000712 249 000713 250 000724 251 000730 252 000732 253 000733 255 000734 256 000755 257 000760 260 000761 261 000762 262 000765 263 001006 264 001010 265 001016 266 001020 267 001022 268 001023 269 001024 270 001027 278 001031 282 001034 ----------------------------------------------------------- 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