1 01/14/87 pascal_display
  2 
  3 Syntax as a command:  pascal_display {entry_names}
  4 
  5 
  6 Function:  traces the Multics stack and displays on user_output
  7 contents of variables declared in all procedures active in the stack.
  8 
  9 
 10 Arguments:
 11 {entry_names}
 12    are Pascal entry names.  If you give entry_names, only the variables
 13    of named procedures that are currently active are displayed; if you
 14    give no entry_names, variables of all active Pascal procedures are
 15    displayed.
 16 
 17 
 18 Notes:  If you compile programs with -table, the contents of variables
 19 are symbolic and are displayed as they would be using the value request
 20 under probe.  Without symbol tables, octal and ASCII dumps of the
 21 variables are provided.  Dump location counters have the values of
 22 location counters available on the compilation listing.
 23 
 24 This command is particularly useful with absentee executions.  You can
 25 use it in an on condition, as follows:
 26 
 27    on pascal_error pascal_display program_name
 28 
 29 
 30 Examples:
 31 
 32     PROGRAM test_display (input, output) ;
 33 
 34        TYPE
 35           charac8 = string (8) ;
 36           ptbox = ^box ;
 37           box = RECORD
 38              name : charac8 ;
 39              value : real ;
 40              next : ptbox ;
 41           END ;
 42        VAR
 43           first : ptbox ;
 44           vfl : real ;
 45 str : charac8;
 46 
 47        PROCEDURE build (name : charac8 ; val : real) ;
 48 
 49           VAR
 50              newbox : ptbox ;
 51           BEGIN
 52              new (newbox) ;
 53              newbox^.name := name ;
 54              newbox^.value := val ;
 55              newbox^.next := first ;
 56              first := newbox ;
 57           END ;
 58 
 59        BEGIN
 60           first := NIL ;
 61           WHILE true DO
 62              BEGIN
 63                 str := '  ' ;
 64                 write ('name : ') ;
 65                 readln (str) ;
 66                 write ('value : ') ;
 67                 readln (vfl) ;
 68                 build (str, vfl) ;
 69              END ;
 70        END.
 71    pascal test_display
 72 Pascal 8.03
 73    on pascal_error pascal_display -long test_display
 74 name : ?Blaise
 75 value : ?134
 76 name : ?Deryl
 77 value : ?123.56
 78 name : ?Amy
 79 value : ?xx
 80 on:  Condition "pascal_error" raised.
 81 pascal_io_$READ_text: Error during READ at line 6 of Pascal file input
 82 pascal_error condition by
 83  >user_dir_dir>PASCAL>JMAthane>v803>info>test_display|133 (line 36)
 84   (actually by support procedure pascal_io_$READ_text|17422 (line 2907)
 85 (>user_dir_dir>PASCAL>JMAthane>v803>e>bound_pascal_runtime_|43506))
 86 
 87 input chain has a bad real format
 88 pascal_io_$READ_text:  Error during READ at line 6 of Pascal file input
 89 
 90 Active procedures in the Multics stack are
 91 234|46600 command_processor_$command_processor_|245
 92                                (bound_multics_bce_|245) (PL/I)
 93 234|46120 abbrev$abbrev_processor|1307 (bound_command_loop_|10111)
 94                                (PL/I)
 95 234|43540 on$handler|1505 (bound_command_env_|16331) (PL/I)
 96 234|43200 signal_$signal_|52 (bound_library_1_|7512) (PL/I)
 97 234|40320 pascal_io_$READ_text|6614 (bound_pascal_runtime_|32700)
 98                                (PL/I) (line 2907)
 99 234|40140 test_display$test_display|46 (PASCAL) (line 36)
100    - main -
101 
102 234|37300 command_processor_$command_processor_|245
103                                (bound_multics_bce_|245) (PL/I)
104 234|36620 abbrev$abbrev_processor|1307 (bound_command_loop_|10111)
105                                (PL/I)
106 234|36160 on$on|220 (bound_command_env_|15044) (PL/I)
107 234|35320 command_processor_$command_processor_|245
108                                (bound_multics_bce_|245) (PL/I)
109 234|34640 abbrev$abbrev_processor|1307 (bound_command_loop_|10111)
110                                (PL/I)
111 234|34340 listen_$release_stack|72 (bound_command_loop_|23444) (PL/I)
112 234|33740 get_to_cl_$unclaimed_signal|77 (bound_command_loop_|25025)
113                                (PL/I)
114 234|31200 default_error_handler_$wall|377 (bound_error_handlers_|377)
115                                (PL/I)
116 
117 234|31100 initialize_process_$any_other.2|431 (bound_process_init_|431)
118                                (PL/I)
119 234|30540 signal_$signal_|52 (bound_library_1_|7512) (PL/I)
120 234|27660 ipc_fast_$ipc_fast_$block|12 (bound_ipc_|54) (PL/I)
121 234|26220 tty_io_$tty_io_$get_line|3202 (bound_command_loop_|3202)
122                                (PL/I)
123 234|20060 audit_$audit_get_line|5702 (bound_audit_|5702) (PL/I)
124 234|16500 tedutil_$tedread_ptr_|2041 (bound_ted_|67331) (PL/I)
125 234|7400  ted_$ted__|3177 (bound_ted_|6425) (PL/I)
126 234|5660  ted_command_$ted|543 (bound_ted_|1033) (PL/I)
127 234|5220  command_processor_$read_list|5116 (bound_multics_bce_|5116)
128                                (PL/I)
129 234|4240  command_processor_$complex_command_processor|1741
130                                (bound_multics_bce_|1741) (PL/I)
131 
132 234|3400  command_processor_$command_processor_|245
133                                (bound_multics_bce_|245) (PL/I)
134 234|2700  abbrev$abbrev_processor|1307 (bound_command_loop_|10111)
135                                (PL/I)
136 234|2400  listen_$listen_|50 (bound_command_loop_|23422) (PL/I)
137 234|2000  initialize_process_$initialize_process_|241
138                                (bound_process_init_|241) (PL/I)
139 
140 globals for >user_dir_dir>PASCAL>JMAthane>v803>info>test_display are
141   str = "Amy"
142   vfl = 123.56
143   first = 522|116 [pd]> BBBJQWPnghPmKg.temp.0522
144   input =
145           - Multics io switch :
146              syn_ user_input
147              stream_input_output
148           - Pascal file status :
149              text file        input interactive
150   input^ = 'x'
151   output =
152           - Multics io switch :
153              syn_ user_output
154              stream_input_output
155           - Pascal file status :
156              text file        output interactive eof
157   output^ = ''
158 
159                     ---------------------------
160 
161  item at 522|116 [pd]> BBBJQWPnghPmKg.temp.0522
162   (box) =
163      name = "Deryl"
164      value = 123.56
165      next = 522|102 [pd]> BBBJQWPnghPmKg.temp.0522
166 
167                     ---------------------------
168 
169  item at 522|102 [pd]> BBBJQWPnghPmKg.temp.0522
170   (box) =
171      name = "Blaise"
172      value = 134.
173      next = null