1 /*        BEGIN INCLUDE FILE probe_break_info.incl.pl1
  2    Removed from probe_break_mgr_, 05/18/79 WOS
  3 
  4    Some of these things are found only in the probe segment (the break segment)
  5    such as "break_segment", "procedure_entry".
  6    If "macro_item" or   "symbol_item" were used, they'd go there, too.
  7    If probe_modes were kept in   the probe seg, they'd go there too.
  8    In the break_map of an object seg go "break_map", and "statement_item" and
  9    "break_slot" (there are two flavors of break_slot, one for "before",
 10    and one for "after".  The astute reader will notice that they are both the
 11    same , except in how they arrange the eight words in "sequence".  For cases
 12    where what is of interest is not in those eigth words, the more general "break_slot"
 13    structure may be used.  It may come to pass in the future that before and after will
 14    look different, of course.
 15 
 16    James R. Davis 23 Sept 79
 17 
 18    "symbol_item" removed, because probe variables are implemented differently
 19    then JMB seemed to envision.  SYMBOL_ITEM is left for compatibility, but not used
 20 */
 21 
 22 dcl 1 break_segment based (break_segp) aligned,             /* declaration of header for break segment */
 23     2 version fixed bin initial (2),                        /* version number */
 24     2 name character (8) initial ("breakseg"),
 25     2 upper_bound bit (18) unal,                            /* as described above */
 26     2 word_count bit (18) unal,
 27     2 first_free_item bit (18) unal,
 28     2 first_procedure_entry bit (18) unal,                  /* the break procedure only has procedure entries */
 29     2 first_symbol bit (18) unal,                           /* can be deleted */
 30     2 first_macro bit (18) unal;
 31 
 32 dcl  break_segp pointer;
 33 
 34 dcl 1 break_map based (bmp) aligned,                        /* declaration of header for break map */
 35     2 version fixed bin initial (2),                        /* version number */
 36     2 name character (8) initial ("breakmap"),
 37     2 upper_bound bit (18) unal,
 38     2 word_count bit (18) unal,
 39     2 first_free_item bit (18) unal,                        /* as above */
 40     2 symbol_header bit (18) unal,                          /* to symbol section of entire object seg */
 41     2 initial_word_count fixed bin (35),                    /* low water mark for allocations */
 42     2 identifier fixed bin (71),                            /* unique id of entire segment */
 43     2 map_sequence pointer;                                 /* beginning of code to call break handler */
 44                                                             /* pointer to align on double word */
 45 
 46 dcl 1 item based aligned,                                   /* canonical declaration for all items */
 47     2 item_type fixed bin,                                  /* separates different types */
 48     2 unused bit (18) unaligned,
 49     2 chain bit (18) unaligned,                             /* to next item of same type or (18)"0"b */
 50     2 size fixed bin;                                       /* number of words occupied by this item */
 51 
 52 dcl 1 free_item based aligned,                              /* little bundle of free storage */
 53     2 size fixed bin,                                       /* number free words contained here */
 54     2 unused bit (18) unaligned,
 55     2 chain bit (18) unaligned,
 56     2 zeros bit (0);                                        /* area to zero out when freed */
 57 
 58 dcl 1 procedure_entry based (ent) aligned,                  /* one entry for each procedure that has breaks */
 59     2 item_type fixed bin initial (PROCEDURE_ITEM),         /* as for all other items */
 60     2 unused bit (18) unaligned,
 61     2 chain bit (18) unaligned,
 62     2 size fixed bin,
 63     2 directory character (168) unal,                       /* directory portion of segment pathname */
 64     2 entry character (32) unal,                            /* entry portion of pathname */
 65     2 segname character (32) unal,                          /* name of "main" entry */
 66     2 pad fixed bin (71),                                   /* formerly time of proc. creation */
 67     2 time_stamp fixed bin (71),                            /* time of creation of containing seg. */
 68     2 first_statement bit (18) unal,                        /* chain of statements with breaks */
 69     2 first_symbol bit (18) unal,                           /* not used */
 70     2 first_macro bit (18) unal,
 71     2 first_debug_break bit (18) unal,                      /* chain of debug style breaks (not used yet) */
 72     2 break_map bit (18) unal,                              /* offset in object seg of break map */
 73     2 statement_map bit (18) unal,                          /* offset in object seg of map for this proc */
 74     2 statement_map_size bit (18) unal,                     /* number of entries in map */
 75     2 source_map bit (18) unal,                             /* offset of source map for proc */
 76     2 symbol_header bit (18) unal,                          /* offset of symbol section for this proc */
 77     2 bounds aligned,                                       /* structure of bounds information */
 78       3 text_bounds,
 79         4 start fixed bin (35),
 80         4 end fixed bin (35),
 81       3 symbol_bounds,
 82         4 start fixed bin (35),
 83         4 end fixed bin (35),
 84     2 language_type fixed bin;                              /* code for language of source program */
 85 
 86 dcl 1 statement_item based (stp) aligned,                   /* each statement with a break has a map entry */
 87     2 item_type fixed bin initial (STATEMENT_ITEM),
 88     2 unused bit (18) unaligned,
 89     2 chain bit (18) unaligned,
 90     2 size fixed bin,
 91     2 identifier fixed bin (71),                            /* id of proc this stmt is in */
 92     2 proc_entry bit (18) unal,                             /* offset of proc entry in break seg */
 93     2 number fixed bin,                                     /* statement number */
 94     2 slots (0:1) bit (18);                                 /* offset of break slots for insert and append */
 95 
 96 /* unused, here only as indication of what JMB (Amen!) may have had in mind
 97    for probe macros.  For the record, it looked like he was going to do
 98    probe variables in a similar way, and they are not done the way he seemed
 99   to envision.
100 */
101 
102 dcl 1 macro_item based aligned,                             /* definition of a probe macro */
103     2 item_type fixed bin initial (MACRO_ITEM),
104     2 unused bit (18) unaligned,
105     2 chain bit (18) unaligned,
106     2 size fixed bin,
107     2 name character (32),                                  /* macro name */
108     2 count fixed bin,                                      /* number of characters in command list */
109     2 command_list character (0);                           /* place to put command list */
110 
111 
112 dcl 1 break_slot_before aligned based (before_slot_ptr),
113     2 item_type fixed bin init (BREAK_ITEM),
114     2 breakmap_header_offset bit (18) unal,
115     2 statement_item_offset bit (18) unal,
116     2 size fixed bin,
117     2 sequence,                                             /* eight words */
118       3 word0 bit (36) init (SPRI_wd),
119       3 word1,
120         4 map_seq_offset bit (18) unal,
121         4 opcode bit (18) unal init (TSPLB_code),
122       3 word2,
123         4 slot_offset bit (18) unal,
124         4 opcode bit (18) unal init (NOP_code),
125       3 moved_instruction bit (36),                         /* first instr. of line, executed after break has occured */
126       3 moved_descs (3),                                    /* descriptors if needed */
127         4 offset bit (18) unal init (0),
128         4 opcode bit (18) unal init (NOP_code),             /* and harmless NOP if not */
129       3 return,
130         4 offset bit (18) unal,                             /* patched to be place to return to after break */
131         4 opcode bit (18) unal init (TRA_code),
132     2 old_instruction bit (36),                             /* former occupant, sans relocation */
133     2 symbol_block_offset bit (18) unal,
134     2 location bit (18) unal,
135     2 type fixed bin init (BREAK_BEFORE),
136     2 count fixed bin,
137     2 command_list char (command_list_size refer (break_slot_before.count));
138 
139 dcl 1 break_slot_after aligned based (after_slot_ptr),
140     2 item_type fixed bin init (BREAK_ITEM),
141     2 breakmap_header_offset bit (18) unal,
142     2 statement_item_offset bit (18) unal,
143     2 size fixed bin,
144     2 sequence,
145       3 moved_instruction bit (36),                         /* happens before the break occurs */
146       3 moved_descs (3),
147         4 offset bit (18) unal init ((3)0),
148         4 opcode bit (18) unal init ((3) NOP_code),
149       3 word4 bit (36) init (SPRI_wd),
150       3 word5,
151         4 map_seq_offset bit (18) unal,
152         4 opcode bit (18) unal init (TSPLB_code),
153       3 word6,
154         4 slot_offset bit (18) unal,
155         4 opcode bit (18) unal init (NOP_code),
156       3 return,
157         4 offset bit (18) unal,
158         4 opcode bit (18) unal init (TRA_code),
159     2 old_instruction bit (36),                             /* former occupant, sans relocation */
160     2 symbol_block_offset bit (18) unal,
161     2 location bit (18) unal,
162     2 type fixed bin init (BREAK_AFTER),
163     2 count fixed bin,
164     2 command_list char (command_list_size refer (break_slot_before.count));
165 
166 
167 /* we need these next two because PL/I wont take size(break_slot_before.sequence) */
168 dcl size_of_after_sequence fixed bin internal static init (8) options (constant);
169 dcl size_of_before_sequence fixed bin internal static init (8)  options (constant);
170 
171 
172 dcl (BREAK_ITEM init (0),
173      STATEMENT_ITEM init (1),
174      SYMBOL_ITEM init (2),                                  /* will never be used */
175      MACRO_ITEM init (3),                                   /* not used now */
176      PROCEDURE_ITEM init (4)) fixed bin internal static options (constant);
177 
178 dcl  command_list_size fixed bin (21);
179 
180 dcl (ent, bmp, stp, before_slot_ptr, after_slot_ptr) ptr;
181 
182 dcl  SPRI_wd bit (36) init ("600022254120"b3);              /* spri sp|stack_frame.next_sp,* */
183 
184 dcl (NOP_code init ("011003"b3),
185      TSPLB_code init ("671000"b3),
186      TRA_code init ("710000"b3)) internal static options (constant) bit (18) unal;
187 
188 
189 /* END INCLUDE FILE  ... probe_break_info.incl.pl1 */