COMPILATION LISTING OF SEGMENT trace_stack Compiled by: Multics PL/I Compiler, Release 28d, of September 14, 1983 Compiled at: Honeywell LCPD Phoenix, System M Compiled on: 10/03/83 1714.7 mst Mon 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 /* format: style4,delnl,insnl,tree,ifthenstmt,indnoniterend */ 12 trace_stack: 13 ts: 14 procedure options (variable); 15 16 /* TRACE_STACK - Produce output on the console for debugging. 17* Arguments are: 18* . -bf, -brief short output 19* . -long, -lg print octal dump 20* . -depth N, -dh N go back N frames only 21* . -stack_ptr P, -sp P start with stack frame at P 22* 23* This program is just a small command driver for the guts subroutine "trace_stack_". 24* THVV 7/70 */ 25 26 /* Modified March 1981 by C. Hornig to fix argument parsing bugs. */ 27 28 dcl ME char (32) static options (constant) init ("trace_stack"); 29 30 dcl argl fixed bin (21), /* length of arg */ 31 bchr char (argl) based (tp), /* for looking at argument */ 32 nargs fixed bin, /* number of arguments */ 33 argno fixed bin, /* steps thru argument list to command */ 34 mode fixed bin init (1), /* output verbosity */ 35 depth fixed bin init (-1), /* number of frames to trace back */ 36 stackp ptr, /* pointer to ts's stack frame */ 37 tp ptr, /* work pointer */ 38 ec fixed bin (35); /* file-system error code */ 39 40 dcl error_table_$badopt fixed bin (35) ext; 41 dcl error_table_$bad_conversion fixed bin (35) ext static; 42 43 dcl com_err_ entry options (variable), 44 find_condition_frame_ entry (ptr) returns (ptr), 45 trace_stack_ entry (ptr, fixed bin, fixed bin, char (32) aligned), 46 cv_dec_check_ entry (char (*), fixed bin (35)) returns (fixed bin), 47 cv_ptr_ entry (char (*), fixed bin (35)) returns (ptr), 48 cu_$arg_count entry (fixed bin, fixed bin (35)), 49 cu_$arg_ptr entry (fixed bin, ptr, fixed bin (21), fixed bin (35)), 50 ioa_ entry options (variable); 51 52 dcl null builtin; 53 54 call cu_$arg_count (nargs, ec); /* get argument count */ 55 if ec ^= 0 then do; 56 call com_err_ (ec, ME, "Usage: ts {-bf|-lg} {-dh N} {-sp PTR}"); 57 return; 58 end; 59 stackp = find_condition_frame_ (null ()); /* default to this stack frame */ 60 do argno = 1 to nargs; 61 call cu_$arg_ptr (argno, tp, argl, ec); /* look at all arguments */ 62 if ec ^= 0 then go to endarg; 63 64 if /* case */ (bchr = "-long") | (bchr = "-lg") then mode = 2; 65 else if (bchr = "-brief") | (bchr = "-bf") then mode = 0; 66 else if (bchr = "-depth") | (bchr = "-dh") then do; 67 argno = argno + 1; 68 call cu_$arg_ptr (argno, tp, argl, ec); 69 if ec ^= 0 then do; 70 call com_err_ (ec, ME, "A number must follow -depth."); 71 return; 72 end; 73 depth = cv_dec_check_ (bchr, ec); 74 if ec ^= 0 then do; 75 call com_err_ (error_table_$bad_conversion, ME, """^a""", bchr); 76 return; 77 end; 78 end; 79 else if (bchr = "-sp") | (bchr = "-stack_ptr") then do; 80 argno = argno + 1; 81 call cu_$arg_ptr (argno, tp, argl, ec); 82 if ec ^= 0 then do; 83 call com_err_ (ec, ME, "A virtual pointer must follow -stack_ptr."); 84 return; 85 end; 86 stackp = cv_ptr_ (bchr, ec); 87 if ec ^= 0 then do; 88 call com_err_ (ec, ME, """^a""", bchr); 89 return; 90 end; 91 end; 92 else do; 93 call com_err_ (error_table_$badopt, ME, """^a""", bchr); 94 return; 95 end; 96 end; 97 98 endarg: 99 call trace_stack_ (stackp, mode, depth, "user_output"); 100 101 if mode > 0 then call ioa_ ("End of trace.^/"); 102 103 return; 104 105 end trace_stack; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 10/03/83 1009.6 trace_stack.pl1 >spec>on>pl128d>trace_stack.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. ME 000000 constant char(32) initial unaligned dcl 28 set ref 56* 70* 75* 83* 88* 93* argl 000100 automatic fixed bin(21,0) dcl 30 set ref 61* 64 64 65 65 66 66 68* 73 73 75 75 79 79 81* 86 86 88 88 93 93 argno 000102 automatic fixed bin(17,0) dcl 30 set ref 60* 61* 67* 67 68* 80* 80 81* bchr based char unaligned dcl 30 set ref 64 64 65 65 66 66 73* 75* 79 79 86* 88* 93* com_err_ 000014 constant entry external dcl 43 ref 56 70 75 83 88 93 cu_$arg_count 000026 constant entry external dcl 43 ref 54 cu_$arg_ptr 000030 constant entry external dcl 43 ref 61 68 81 cv_dec_check_ 000022 constant entry external dcl 43 ref 73 cv_ptr_ 000024 constant entry external dcl 43 ref 86 depth 000104 automatic fixed bin(17,0) initial dcl 30 set ref 30* 73* 98* ec 000112 automatic fixed bin(35,0) dcl 30 set ref 54* 55 56* 61* 62 68* 69 70* 73* 74 81* 82 83* 86* 87 88* error_table_$bad_conversion 000012 external static fixed bin(35,0) dcl 41 set ref 75* error_table_$badopt 000010 external static fixed bin(35,0) dcl 40 set ref 93* find_condition_frame_ 000016 constant entry external dcl 43 ref 59 ioa_ 000032 constant entry external dcl 43 ref 101 mode 000103 automatic fixed bin(17,0) initial dcl 30 set ref 30* 64* 65* 98* 101 nargs 000101 automatic fixed bin(17,0) dcl 30 set ref 54* 60 null builtin function dcl 52 ref 59 59 stackp 000106 automatic pointer dcl 30 set ref 59* 86* 98* tp 000110 automatic pointer dcl 30 set ref 61* 64 64 65 65 66 66 68* 73 75 79 79 81* 86 88 93 trace_stack_ 000020 constant entry external dcl 43 ref 98 NAMES DECLARED BY EXPLICIT CONTEXT. endarg 000620 constant label dcl 98 ref 62 trace_stack 000126 constant entry external dcl 12 ts 000116 constant entry external dcl 12 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1014 1050 660 1024 Length 1234 660 34 150 133 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME ts 130 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME ts 000100 argl ts 000101 nargs ts 000102 argno ts 000103 mode ts 000104 depth ts 000106 stackp ts 000110 tp ts 000112 ec ts 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. com_err_ cu_$arg_count cu_$arg_ptr cv_dec_check_ cv_ptr_ find_condition_frame_ ioa_ trace_stack_ THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$bad_conversion error_table_$badopt LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 30 000107 12 000115 54 000134 55 000145 56 000147 57 000173 59 000174 60 000207 61 000217 62 000234 64 000236 65 000253 66 000265 67 000275 68 000276 69 000313 70 000315 71 000341 73 000342 74 000366 75 000370 76 000422 78 000423 79 000424 80 000434 81 000435 82 000452 83 000454 84 000500 86 000501 87 000525 88 000527 89 000561 91 000562 93 000563 94 000615 96 000616 98 000620 101 000640 103 000657 ----------------------------------------------------------- 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