COMPILATION LISTING OF SEGMENT probe_fault_handler_ Compiled by: Multics PL/I Compiler, Release 31a, of October 12, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 10/27/88 1230.4 mst Thu 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_fault_handler_: 26 proc (P_probe_info_ptr); 27 28 /* * This procedure is invoked when it appears that there was a fault caused by an 29* * invalid pointer. It decides whether the condition probably was caused by a bad 30* * pointer, calling probe_error_ if so, or continuing to signal if not. 31* * 32* * Written by Olin Sibert 33* * Modified 10/09/79 by JRDavis to say where fault happened. */ 34 /* Added null_pointer to list of handled conditions 01/15/85 Steve Herbst */ 35 /* Changed to quit probe after handling if condition occurred during quit request 01/15/85 Steve Herbst */ 36 37 38 dcl P_probe_info_ptr pointer parameter; 39 40 dcl idx fixed bin; 41 dcl code fixed bin (35); 42 43 dcl 1 cond_info aligned like condition_info automatic; 44 45 dcl storage_condition_count fixed bin internal static init (0); 46 /* to limit the number of these */ 47 48 dcl com_err_ entry options (variable); 49 dcl cu_$cl entry (bit (1) aligned); 50 dcl continue_to_signal_ entry (fixed bin (35)); 51 dcl find_condition_info_ entry (ptr, ptr, fixed bin (35)); 52 dcl probe_error_ entry options (variable); 53 54 dcl POINTER_FAULTS (13) char (32) internal static 55 options (constant) init 56 ("fault_tag_1", 57 "fault_tag_3", 58 "no_read_permission", 59 "no_write_permission", 60 "not_in_read_bracket", 61 "not_in_write_bracket", 62 "null_pointer", 63 "out_of_bounds", 64 "seg_fault_error", 65 "storage", 66 "packed_pointer_fault", 67 "lot_fault", 68 "isot_fault"); 69 dcl STORAGE_CONDITION char (32) internal static 70 options (constant) init ("storage"); 71 72 dcl (addr, hbound, null) 73 builtin; 74 75 probe_info_ptr = P_probe_info_ptr; 76 77 call find_condition_info_ (null, addr (cond_info), code); 78 if code ^= 0 then do; 79 call probe_error_ (probe_info_ptr, code, "In pointer error handler."); 80 return; 81 end; 82 83 if ^probe_static_info.no_handle_faults_sw 84 then 85 do idx = 1 to hbound (POINTER_FAULTS, 1); 86 if cond_info.condition_name = POINTER_FAULTS (idx) then do; 87 /* One of ours */ 88 if cond_info.condition_name = STORAGE_CONDITION 89 then /* special handling */ 90 storage_condition_count = storage_condition_count + 1; 91 if storage_condition_count > 2 then do; 92 /* warn the user */ 93 call com_err_ (0, probe_static_info.name, 94 "Storage condition occurred. Shorten stack and restart."); 95 call cu_$cl ("0"b); 96 storage_condition_count = 0; 97 end; 98 else do; 99 call probe_error_ (probe_info_ptr, 0, 100 "Condition ""^a"" occurred ^[in lower ring^] at ^p. Possible invalid pointer.", 101 cond_info.condition_name, 102 cond_info.flags.crawlout, 103 cond_info.user_loc_ptr); 104 end; 105 if probe_info.executing_quit_request 106 then go to probe_info.abort_probe_label; 107 else return; 108 end; 109 end; /* of loop checking fault names */ 110 111 continue_to_signal: 112 call continue_to_signal_ ((0)); /* not one of ours, see who else wants it */ 113 return; 114 1 1 /* BEGIN INCLUDE FILE probe_info.incl.pl1 */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(88-10-24,WAAnderson), approve(88-10-24,MCR7952), 1 7* audit(88-10-24,RWaters), install(88-10-27,MR12.2-1194): 1 8* Added field 'retry_using_main' to add new C feature. 1 9* END HISTORY COMMENTS */ 1 10 1 11 1 12 /* Created: 04/22/79 W. Olin Sibert, from subsystem_info 1 13* Modified: 22 Sept 79 JRd to remove: default (ptr & (auto|based)) init (null ()); 1 14* Added flags.setting_break 08/22/83 Steve Herbst 1 15* Added flags.executing_quit_request 01/15/85 Steve Herbst 1 16**/ 1 17 1 18 dcl 1 probe_info aligned based (probe_info_ptr), /* standard data for a probe invocation */ 1 19 2 probe_info_version fixed bin, /* version of this structure */ 1 20 1 21 2 static_info_ptr pointer unaligned, /* pointer to static information structure */ 1 22 2 modes_ptr pointer unaligned, /* pointer to probe_modes structure */ 1 23 1 24 2 ptr_to_current_source ptr, /* current_source is based on this */ 1 25 2 ptr_to_initial_source ptr, /* initial_source is based on this */ 1 26 2 machine_cond_ptr pointer, /* pointer to machine conditions, if we faulted to get here */ 1 27 1 28 2 token_info aligned, /* information about token chain currently being processed */ 1 29 3 first_token pointer unaligned, /* first token in chain */ 1 30 3 ct pointer unaligned, /* pointer to current token; updated in MANY places */ 1 31 3 end_token bit (18) aligned, /* token type at which to stop scanning token chain */ 1 32 3 buffer_ptr pointer unaligned, /* pointer to input buffer */ 1 33 3 buffer_lth fixed bin (21), /* and length */ 1 34 1 35 2 random_info aligned, 1 36 3 current_stack_frame pointer unaligned, /* stack frame pointer for frame in which probe was invoked */ 1 37 3 input_type fixed bin, /* current input type */ 1 38 3 language_type fixed bin, /* current language being processed */ 1 39 3 return_method fixed bin, /* how we should return after exiting probe */ 1 40 3 entry_method fixed bin, /* how we got here in the first place */ 1 41 3 pad1 (19) bit (36) aligned, 1 42 1 43 2 break_info, /* break info -- only interesting if we got here via a break */ 1 44 3 break_slot_ptr pointer, /* pointer to break slot -- non-null IFF at a break */ 1 45 3 last_break_slot_ptr pointer unaligned, /* pointer to previous break slot, not presently used */ 1 46 3 break_reset bit (1) aligned, /* this break has been reset by somebody further on */ 1 47 3 real_break_return_loc pointer, /* where to REALLY return to, modulo previous bit */ 1 48 1 49 2 probe_area_info, /* information about various probe areas */ 1 50 3 break_segment_ptr pointer unaligned, /* pointer to Personid.probe */ 1 51 3 break_area_ptr pointer unaligned, /* pointer to area in break segment */ 1 52 3 scratch_area_ptr pointer unaligned, /* pointer to probe scratch seg in process dir */ 1 53 3 probe_area_ptr pointer unaligned, /* This area lasts as long as an invocation of probe. */ 1 54 3 work_area_ptr pointer unaligned, /* This area lasts as long as the current request line */ 1 55 3 expression_area_ptr pointer unaligned, /* This area lasts as long as the current command */ 1 56 1 57 2 flags aligned, /* this, in particular, should be saved and restored correctly */ 1 58 (3 execute, /* "1"b => execute requests, "0"b => just check syntax */ 1 59 3 in_listener, /* ON => in probe listener loop */ 1 60 3 executing_request, /* ON => executing a request */ 1 61 3 in_interpret_line, /* executing in probe_listen_$interpret_line */ 1 62 3 setting_break, /* executing "after" or "before": check syntax of "if" */ 1 63 3 executing_quit_request, /* to prevent error looping during "quit" request */ 1 64 3 pad (30)) bit (1) unaligned, 1 65 1 66 2 io_switches, /* switches probe will do normal I/O on */ 1 67 3 input_switch pointer, 1 68 3 output_switch pointer, 1 69 1 70 2 error_info, /* information about the last error saved for later printing */ 1 71 3 error_code fixed bin (35), 1 72 3 error_message char (300) varying, 1 73 1 74 2 listener_info, /* internal use by probe listener */ 1 75 3 request_name character (32) varying, /* primary name of the request being processed */ 1 76 3 abort_probe_label label variable, 1 77 3 abort_line_label label variable, 1 78 3 depth fixed binary, /* count of active invocations of probe */ 1 79 3 previous pointer unaligned, /* -> previous invocation's info */ 1 80 3 next pointer unaligned, 1 81 1 82 2 end_of_probe_info pointer aligned, 1 83 2 retry_using_main fixed bin aligned; 1 84 1 85 1 86 dcl probe_info_ptr pointer; 1 87 1 88 dcl probe_info_version fixed bin static options (constant) initial (1); 1 89 1 90 dcl probe_info_version_1 fixed bin static options (constant) initial (1); 1 91 1 92 dcl scratch_area area based (probe_info.scratch_area_ptr); 1 93 dcl probe_area area based (probe_info.probe_area_ptr); 1 94 dcl work_area area based (probe_info.work_area_ptr); 1 95 dcl expression_area area based (probe_info.expression_area_ptr); 1 96 1 97 /* END INCLUDE FILE probe_info.incl.pl1 */ 115 116 2 1 /* BEGIN INCLUDE FILE probe_static_info.incl.pl1 */ 2 2 2 3 /* * This include file describes per-process information about probe, such 2 4* * as various options available and the info directories and modes. 2 5* * 2 6* * Created: 06/06/79 W. Olin Sibert */ 2 7 2 8 dcl 1 probe_static_info aligned based (probe_info.static_info_ptr), /* per-process data about probe */ 2 9 2 probe_info_version fixed bin, /* same as probe_info.probe_info_version */ 2 10 2 11 2 version aligned, 2 12 3 major_version fixed bin, 2 13 3 minor_version fixed bin, 2 14 3 version_string char (32) unaligned, /* like "4.3f, patch 1" */ 2 15 2 16 2 name char (32) unaligned, /* "probe" */ 2 17 2 prompt character (40) varying, /* prompt for reading requests */ 2 18 2 switches, 2 19 3 brief_sw bit (1) unaligned, /* briefer break messages, no header (default OFF) */ 2 20 3 no_handle_faults_sw bit (1) unaligned, /* don't handle bad ptr faults (default OFF) */ 2 21 3 recursive_breaks_sw bit (1) unaligned, /* don't ignore recursive breaks in probe */ 2 22 3 prompt_on_sw bit (1) unaligned, /* prompt for request lines */ 2 23 3 switch_pad bit (32) unaligned, 2 24 2 25 2 scratch_segment_ptr pointer, /* pointer to probe_scratch_ -- always valid */ 2 26 2 break_segment_ptr pointer, /* pointer to Person.breaks -- valid only if needed */ 2 27 2 28 2 seg_info_offset_ptr pointer, /* pointer to seg_info_offset array */ 2 29 2 30 2 probe_segno bit (18), /* segment number of probe itself */ 2 31 2 last_break_segno bit (18), /* segment number of last interrupted program */ 2 32 2 33 2 stack_info aligned, /* information about the stack trace in probe_scratch_ */ 2 34 3 level_chain pointer unaligned, /* first level frame entry pointer */ 2 35 3 max_level fixed bin, /* number of stack levels */ 2 36 3 flags aligned, 2 37 (4 good_stack, 2 38 4 traced_with_all, /* whether the stack trace includes support frames */ 2 39 4 pad1 (34)) bit (1) unaligned, 2 40 2 41 2 modes_ptr pointer unaligned, /* pointer to modes -- same as probe_info.modes_ptr */ 2 42 2 43 2 request_table_info aligned, /* info for request definitions */ 2 44 3 array_ptr pointer, /* pointer to array of request table pointers */ 2 45 3 array_size fixed bin, /* number of elements in use */ 2 46 3 array_max_size fixed bin, /* max number of elements in array */ 2 47 3 using_internal_array bit (1) aligned, /* whether or not we are using the array in probe_static_info */ 2 48 2 49 2 io_switches, /* switches probe does its I/O on */ 2 50 3 input_switch pointer, 2 51 3 output_switch pointer, 2 52 3 (private_input_sw, private_output_sw) bit (1) aligned, 2 53 /* created by ids, ods and should be destroyed */ 2 54 2 55 2 info_directory_info aligned, /* info about info directories */ 2 56 3 array_ptr pointer, 2 57 3 array_size fixed bin, 2 58 3 array_max_size fixed bin, 2 59 3 using_internal_array bit (1) aligned, 2 60 2 61 2 exclude_name_info aligned, /* info for exclude array used in printing values */ 2 62 3 array_ptr pointer, 2 63 3 array_size fixed bin, 2 64 3 array_max_size fixed bin, 2 65 3 using_internal_array bit (1) aligned, 2 66 2 67 2 null_seg_info_ptr pointer unaligned, /* pointer to the "null" seg_info block */ 2 68 2 69 2 initial_arrays, /* initial versions of various arrays */ 2 70 3 request_table_ptr_array (10) pointer aligned, 2 71 3 info_directory_name_array (3) char (168) unaligned, 2 72 3 exclude_name_array (6) char (32) unaligned, 2 73 2 74 2 metering_info, /* last values for "mode meter" */ 2 75 3 last_clock fixed bin (71), 2 76 3 last_vclock fixed bin (71), 2 77 3 last_page_faults fixed bin, 2 78 2 79 2 end_of_probe_static_info fixed bin; 2 80 2 81 2 82 dcl 1 probe_seg_info_array aligned based (probe_static_info.seg_info_offset_ptr), 2 83 2 count fixed bin, /* number of entries in seg_info_offset array */ 2 84 2 seg_info_offset (0 : seg_info_offset_count refer (probe_seg_info_array.count)) bit (18) aligned; 2 85 2 86 dcl seg_info_offset_count fixed bin; /* one less than the number of info_offsets */ 2 87 2 88 dcl probe_request_tables (probe_static_info.request_table_info.array_max_size) /* array of request table pointers */ 2 89 pointer aligned based (probe_static_info.request_table_info.array_ptr); 2 90 2 91 dcl probe_info_directories (probe_static_info.info_directory_info.array_max_size) /* array of info directories */ 2 92 char (168) unaligned based (probe_static_info.info_directory_info.array_ptr); 2 93 2 94 dcl probe_exclude_names (probe_static_info.exclude_name_info.array_max_size) /* array of exclude names */ 2 95 char (168) unaligned based (probe_static_info.exclude_name_info.array_ptr); 2 96 2 97 /* END INCLUDE FILE probe_static_info.incl.pl1 */ 117 118 3 1 /* BEGIN INCLUDE FILE ... condition_info.incl.pl1 */ 3 2 3 3 /* Structure for find_condition_info_. 3 4* 3 5* Written 1-Mar-79 by M. N. Davidoff. 3 6**/ 3 7 3 8 /* automatic */ 3 9 3 10 declare condition_info_ptr pointer; 3 11 3 12 /* based */ 3 13 3 14 declare 1 condition_info aligned based (condition_info_ptr), 3 15 2 mc_ptr pointer, /* pointer to machine conditions at fault time */ 3 16 2 version fixed binary, /* Must be 1 */ 3 17 2 condition_name char (32) varying, /* name of condition */ 3 18 2 info_ptr pointer, /* pointer to the condition data structure */ 3 19 2 wc_ptr pointer, /* pointer to wall crossing machine conditions */ 3 20 2 loc_ptr pointer, /* pointer to location where condition occured */ 3 21 2 flags unaligned, 3 22 3 crawlout bit (1), /* on if condition occured in lower ring */ 3 23 3 pad1 bit (35), 3 24 2 pad2 bit (36), 3 25 2 user_loc_ptr pointer, /* ptr to most recent nonsupport loc before condition occurred */ 3 26 2 pad3 (4) bit (36); 3 27 3 28 /* internal static */ 3 29 3 30 declare condition_info_version_1 3 31 fixed binary internal static options (constant) initial (1); 3 32 3 33 /* END INCLUDE FILE ... condition_info.incl.pl1 */ 119 120 121 122 end probe_fault_handler_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/27/88 1224.9 probe_fault_handler_.pl1 >spec>install>MR12.2-1194>probe_fault_handler_.pl1 115 1 10/27/88 1223.7 probe_info.incl.pl1 >spec>install>MR12.2-1194>probe_info.incl.pl1 117 2 11/12/82 1624.3 probe_static_info.incl.pl1 >ldd>include>probe_static_info.incl.pl1 119 3 06/28/79 1204.8 condition_info.incl.pl1 >ldd>include>condition_info.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. POINTER_FAULTS 000010 constant char(32) initial array packed unaligned dcl 54 ref 83 86 P_probe_info_ptr parameter pointer dcl 38 ref 25 75 STORAGE_CONDITION 000000 constant char(32) initial packed unaligned dcl 69 ref 88 abort_probe_label 222 based label variable level 3 dcl 1-18 ref 105 addr builtin function dcl 72 ref 77 77 code 000101 automatic fixed bin(35,0) dcl 41 set ref 77* 78 79* com_err_ 000012 constant entry external dcl 48 ref 93 cond_info 000102 automatic structure level 1 dcl 43 set ref 77 77 condition_info based structure level 1 dcl 3-14 condition_name 3 000102 automatic varying char(32) level 2 dcl 43 set ref 86 88 99* continue_to_signal_ 000016 constant entry external dcl 50 ref 111 crawlout 22 000102 automatic bit(1) level 3 packed packed unaligned dcl 43 set ref 99* cu_$cl 000014 constant entry external dcl 49 ref 95 executing_quit_request 64(05) based bit(1) level 3 packed packed unaligned dcl 1-18 ref 105 find_condition_info_ 000020 constant entry external dcl 51 ref 77 flags 64 based structure level 2 in structure "probe_info" dcl 1-18 in procedure "probe_fault_handler_" flags 22 000102 automatic structure level 2 in structure "cond_info" packed packed unaligned dcl 43 in procedure "probe_fault_handler_" hbound builtin function dcl 72 ref 83 idx 000100 automatic fixed bin(17,0) dcl 40 set ref 83* 86* listener_info 210 based structure level 2 dcl 1-18 name 13 based char(32) level 2 packed packed unaligned dcl 2-8 set ref 93* no_handle_faults_sw 36(01) based bit(1) level 3 packed packed unaligned dcl 2-8 ref 83 null builtin function dcl 72 ref 77 77 probe_error_ 000022 constant entry external dcl 52 ref 79 99 probe_info based structure level 1 dcl 1-18 probe_info_ptr 000134 automatic pointer dcl 1-86 set ref 75* 79* 83 93 99* 105 105 probe_static_info based structure level 1 dcl 2-8 static_info_ptr 1 based pointer level 2 packed packed unaligned dcl 1-18 ref 83 93 storage_condition_count 000010 internal static fixed bin(17,0) initial dcl 45 set ref 88* 88 91 96* switches 36 based structure level 2 dcl 2-8 user_loc_ptr 24 000102 automatic pointer level 2 dcl 43 set ref 99* NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. condition_info_ptr automatic pointer dcl 3-10 condition_info_version_1 internal static fixed bin(17,0) initial dcl 3-30 expression_area based area(1024) dcl 1-95 probe_area based area(1024) dcl 1-93 probe_exclude_names based char(168) array packed unaligned dcl 2-94 probe_info_directories based char(168) array packed unaligned dcl 2-91 probe_info_version internal static fixed bin(17,0) initial dcl 1-88 probe_info_version_1 internal static fixed bin(17,0) initial dcl 1-90 probe_request_tables based pointer array dcl 2-88 probe_seg_info_array based structure level 1 dcl 2-82 scratch_area based area(1024) dcl 1-92 seg_info_offset_count automatic fixed bin(17,0) dcl 2-86 work_area based area(1024) dcl 1-94 NAMES DECLARED BY EXPLICIT CONTEXT. continue_to_signal 000473 constant label dcl 111 probe_fault_handler_ 000247 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 576 622 504 606 Length 1054 504 24 216 72 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME probe_fault_handler_ 182 external procedure is an external procedure. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 storage_condition_count probe_fault_handler_ STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME probe_fault_handler_ 000100 idx probe_fault_handler_ 000101 code probe_fault_handler_ 000102 cond_info probe_fault_handler_ 000134 probe_info_ptr probe_fault_handler_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac tra_ext_2 ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ continue_to_signal_ cu_$cl find_condition_info_ probe_error_ NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 25 000244 75 000254 77 000260 78 000276 79 000300 80 000324 83 000325 86 000337 88 000346 91 000355 93 000361 95 000407 96 000420 97 000422 99 000423 105 000462 107 000470 109 000471 111 000473 113 000503 ----------------------------------------------------------- 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