annotate gcc/ada/ali.ads @ 118:fd00160c1b76

ifdef TARGET_64BIT
author mir3636
date Tue, 27 Feb 2018 15:01:35 +0900
parents 04ced10e8804
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT COMPILER COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- A L I --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
kono
parents:
diff changeset
9 -- Copyright (C) 1992-2017, Free Software Foundation, Inc. --
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
kono
parents:
diff changeset
17 -- for more details. You should have received a copy of the GNU General --
kono
parents:
diff changeset
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
kono
parents:
diff changeset
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
kono
parents:
diff changeset
20 -- --
kono
parents:
diff changeset
21 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
23 -- --
kono
parents:
diff changeset
24 ------------------------------------------------------------------------------
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 -- This package defines the internal data structures used for representation
kono
parents:
diff changeset
27 -- of Ada Library Information (ALI) acquired from the ALI files generated by
kono
parents:
diff changeset
28 -- the front end.
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 with Casing; use Casing;
kono
parents:
diff changeset
31 with Gnatvsn; use Gnatvsn;
kono
parents:
diff changeset
32 with Namet; use Namet;
kono
parents:
diff changeset
33 with Rident; use Rident;
kono
parents:
diff changeset
34 with Table;
kono
parents:
diff changeset
35 with Types; use Types;
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 with GNAT.HTable; use GNAT.HTable;
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 package ALI is
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 --------------
kono
parents:
diff changeset
42 -- Id Types --
kono
parents:
diff changeset
43 --------------
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 type ALI_Id is range 0 .. 99_999_999;
kono
parents:
diff changeset
46 -- Id values used for ALIs table entries
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 type Unit_Id is range 0 .. 99_999_999;
kono
parents:
diff changeset
49 -- Id values used for Unit table entries
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 type With_Id is range 0 .. 99_999_999;
kono
parents:
diff changeset
52 -- Id values used for Withs table entries
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 type Arg_Id is range 0 .. 99_999_999;
kono
parents:
diff changeset
55 -- Id values used for argument table entries
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 type Sdep_Id is range 0 .. 99_999_999;
kono
parents:
diff changeset
58 -- Id values used for Sdep table entries
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 type Source_Id is range 0 .. 99_999_999;
kono
parents:
diff changeset
61 -- Id values used for Source table entries
kono
parents:
diff changeset
62
kono
parents:
diff changeset
63 type Interrupt_State_Id is range 0 .. 99_999_999;
kono
parents:
diff changeset
64 -- Id values used for Interrupt_State table entries
kono
parents:
diff changeset
65
kono
parents:
diff changeset
66 type Priority_Specific_Dispatching_Id is range 0 .. 99_999_999;
kono
parents:
diff changeset
67 -- Id values used for Priority_Specific_Dispatching table entries
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 --------------------
kono
parents:
diff changeset
70 -- ALI File Table --
kono
parents:
diff changeset
71 --------------------
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 -- Each ALI file read generates an entry in the ALIs table
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 No_ALI_Id : constant ALI_Id := ALI_Id'First;
kono
parents:
diff changeset
76 -- Special value indicating no ALI entry
kono
parents:
diff changeset
77
kono
parents:
diff changeset
78 First_ALI_Entry : constant ALI_Id := No_ALI_Id + 1;
kono
parents:
diff changeset
79 -- Id of first actual entry in table
kono
parents:
diff changeset
80
kono
parents:
diff changeset
81 type Main_Program_Type is (None, Proc, Func);
kono
parents:
diff changeset
82 -- Indicator of whether unit can be used as main program
kono
parents:
diff changeset
83
kono
parents:
diff changeset
84 type ALIs_Record is record
kono
parents:
diff changeset
85
kono
parents:
diff changeset
86 Afile : File_Name_Type;
kono
parents:
diff changeset
87 -- Name of ALI file
kono
parents:
diff changeset
88
kono
parents:
diff changeset
89 Ofile_Full_Name : File_Name_Type;
kono
parents:
diff changeset
90 -- Full name of object file corresponding to the ALI file
kono
parents:
diff changeset
91
kono
parents:
diff changeset
92 Sfile : File_Name_Type;
kono
parents:
diff changeset
93 -- Name of source file that generates this ALI file (which is equal
kono
parents:
diff changeset
94 -- to the name of the source file in the first unit table entry for
kono
parents:
diff changeset
95 -- this ALI file, since the body if present is always first).
kono
parents:
diff changeset
96
kono
parents:
diff changeset
97 Ver : String (1 .. Ver_Len_Max);
kono
parents:
diff changeset
98 -- Value of library version (V line in ALI file). Not set if
kono
parents:
diff changeset
99 -- V lines are ignored as a result of the Ignore_Lines parameter.
kono
parents:
diff changeset
100
kono
parents:
diff changeset
101 Ver_Len : Natural;
kono
parents:
diff changeset
102 -- Length of characters stored in Ver. Not set if V lines are ignored as
kono
parents:
diff changeset
103 -- a result of the Ignore_Lines parameter.
kono
parents:
diff changeset
104
kono
parents:
diff changeset
105 SAL_Interface : Boolean;
kono
parents:
diff changeset
106 -- Set True when this is an interface to a standalone library
kono
parents:
diff changeset
107
kono
parents:
diff changeset
108 First_Unit : Unit_Id;
kono
parents:
diff changeset
109 -- Id of first Unit table entry for this file
kono
parents:
diff changeset
110
kono
parents:
diff changeset
111 Last_Unit : Unit_Id;
kono
parents:
diff changeset
112 -- Id of last Unit table entry for this file
kono
parents:
diff changeset
113
kono
parents:
diff changeset
114 First_Sdep : Sdep_Id;
kono
parents:
diff changeset
115 -- Id of first Sdep table entry for this file
kono
parents:
diff changeset
116
kono
parents:
diff changeset
117 Last_Sdep : Sdep_Id;
kono
parents:
diff changeset
118 -- Id of last Sdep table entry for this file
kono
parents:
diff changeset
119
kono
parents:
diff changeset
120 Main_Program : Main_Program_Type;
kono
parents:
diff changeset
121 -- Indicator of whether first unit can be used as main program. Not set
kono
parents:
diff changeset
122 -- if 'M' appears in Ignore_Lines.
kono
parents:
diff changeset
123
kono
parents:
diff changeset
124 Main_Priority : Int;
kono
parents:
diff changeset
125 -- Indicates priority value if Main_Program field indicates that this
kono
parents:
diff changeset
126 -- can be a main program. A value of -1 (No_Main_Priority) indicates
kono
parents:
diff changeset
127 -- that no parameter was found, or no M line was present. Not set if
kono
parents:
diff changeset
128 -- 'M' appears in Ignore_Lines.
kono
parents:
diff changeset
129
kono
parents:
diff changeset
130 Main_CPU : Int;
kono
parents:
diff changeset
131 -- Indicates processor if Main_Program field indicates that this can
kono
parents:
diff changeset
132 -- be a main program. A value of -1 (No_Main_CPU) indicates that no C
kono
parents:
diff changeset
133 -- parameter was found, or no M line was present. Not set if 'M' appears
kono
parents:
diff changeset
134 -- in Ignore_Lines.
kono
parents:
diff changeset
135
kono
parents:
diff changeset
136 Time_Slice_Value : Int;
kono
parents:
diff changeset
137 -- Indicates value of time slice parameter from T=xxx on main program
kono
parents:
diff changeset
138 -- line. A value of -1 indicates that no T=xxx parameter was found, or
kono
parents:
diff changeset
139 -- no M line was present. Not set if 'M' appears in Ignore_Lines.
kono
parents:
diff changeset
140
kono
parents:
diff changeset
141 WC_Encoding : Character;
kono
parents:
diff changeset
142 -- Wide character encoding if main procedure. Otherwise not relevant.
kono
parents:
diff changeset
143 -- Not set if 'M' appears in Ignore_Lines.
kono
parents:
diff changeset
144
kono
parents:
diff changeset
145 Locking_Policy : Character;
kono
parents:
diff changeset
146 -- Indicates locking policy for units in this file. Space means tasking
kono
parents:
diff changeset
147 -- was not used, or that no Locking_Policy pragma was present or that
kono
parents:
diff changeset
148 -- this is a language defined unit. Otherwise set to first character
kono
parents:
diff changeset
149 -- (upper case) of policy name. Not set if 'P' appears in Ignore_Lines.
kono
parents:
diff changeset
150
kono
parents:
diff changeset
151 Partition_Elaboration_Policy : Character;
kono
parents:
diff changeset
152 -- Indicates partition elaboration policy for units in this file. Space
kono
parents:
diff changeset
153 -- means that no Partition_Elaboration_Policy pragma was present or that
kono
parents:
diff changeset
154 -- this is a language defined unit. Otherwise set to first character
kono
parents:
diff changeset
155 -- (upper case) of policy name. Not set if 'P' appears in Ignore_Lines.
kono
parents:
diff changeset
156
kono
parents:
diff changeset
157 Queuing_Policy : Character;
kono
parents:
diff changeset
158 -- Indicates queuing policy for units in this file. Space means tasking
kono
parents:
diff changeset
159 -- was not used, or that no Queuing_Policy pragma was present or that
kono
parents:
diff changeset
160 -- this is a language defined unit. Otherwise set to first character
kono
parents:
diff changeset
161 -- (upper case) of policy name. Not set if 'P' appears in Ignore_Lines.
kono
parents:
diff changeset
162
kono
parents:
diff changeset
163 Task_Dispatching_Policy : Character;
kono
parents:
diff changeset
164 -- Indicates task dispatching policy for units in this file. Space means
kono
parents:
diff changeset
165 -- tasking was not used, or that no Task_Dispatching_Policy pragma was
kono
parents:
diff changeset
166 -- present or that this is a language defined unit. Otherwise set to
kono
parents:
diff changeset
167 -- first character (upper case) of policy name. Not set if 'P' appears
kono
parents:
diff changeset
168 -- in Ignore_Lines.
kono
parents:
diff changeset
169
kono
parents:
diff changeset
170 Compile_Errors : Boolean;
kono
parents:
diff changeset
171 -- Set to True if compile errors for unit. Note that No_Object will
kono
parents:
diff changeset
172 -- always be set as well in this case. Not set if 'P' appears in
kono
parents:
diff changeset
173 -- Ignore_Lines.
kono
parents:
diff changeset
174
kono
parents:
diff changeset
175 GNATprove_Mode : Boolean;
kono
parents:
diff changeset
176 -- Set to True if ALI and object file produced in GNATprove_Mode as
kono
parents:
diff changeset
177 -- signalled by GP appearing on the P line. Not set if 'P' appears in
kono
parents:
diff changeset
178 -- Ignore_Lines.
kono
parents:
diff changeset
179
kono
parents:
diff changeset
180 No_Component_Reordering : Boolean;
kono
parents:
diff changeset
181 -- Set to True if file was compiled with a configuration pragma file
kono
parents:
diff changeset
182 -- containing pragma No_Component_Reordering. Not set if 'P' appears
kono
parents:
diff changeset
183 -- in Ignore_Lines.
kono
parents:
diff changeset
184
kono
parents:
diff changeset
185 No_Object : Boolean;
kono
parents:
diff changeset
186 -- Set to True if no object file generated. Not set if 'P' appears in
kono
parents:
diff changeset
187 -- Ignore_Lines.
kono
parents:
diff changeset
188
kono
parents:
diff changeset
189 Normalize_Scalars : Boolean;
kono
parents:
diff changeset
190 -- Set to True if file was compiled with Normalize_Scalars. Not set if
kono
parents:
diff changeset
191 -- 'P' appears in Ignore_Lines.
kono
parents:
diff changeset
192
kono
parents:
diff changeset
193 SSO_Default : Character;
kono
parents:
diff changeset
194 -- Set to 'H' or 'L' if file was compiled with a configuration pragma
kono
parents:
diff changeset
195 -- file containing Default_Scalar_Storage_Order (High/Low_Order_First).
kono
parents:
diff changeset
196 -- Set to ' ' if neither pragma was present. Not set if 'P' appears in
kono
parents:
diff changeset
197 -- Ignore_Lines.
kono
parents:
diff changeset
198
kono
parents:
diff changeset
199 Unit_Exception_Table : Boolean;
kono
parents:
diff changeset
200 -- Set to True if unit exception table pointer generated. Not set if 'P'
kono
parents:
diff changeset
201 -- appears in Ignore_Lines.
kono
parents:
diff changeset
202
kono
parents:
diff changeset
203 Frontend_Exceptions : Boolean;
kono
parents:
diff changeset
204 -- Set to True if file was compiled with front-end exceptions. Not set
kono
parents:
diff changeset
205 -- if 'P' appears in Ignore_Lines.
kono
parents:
diff changeset
206
kono
parents:
diff changeset
207 Zero_Cost_Exceptions : Boolean;
kono
parents:
diff changeset
208 -- Set to True if file was compiled with zero cost exceptions. Not set
kono
parents:
diff changeset
209 -- if 'P' appears in Ignore_Lines.
kono
parents:
diff changeset
210
kono
parents:
diff changeset
211 Restrictions : Restrictions_Info;
kono
parents:
diff changeset
212 -- Restrictions information reconstructed from R lines
kono
parents:
diff changeset
213
kono
parents:
diff changeset
214 First_Interrupt_State : Interrupt_State_Id;
kono
parents:
diff changeset
215 Last_Interrupt_State : Interrupt_State_Id'Base;
kono
parents:
diff changeset
216 -- These point to the first and last entries in the interrupt state
kono
parents:
diff changeset
217 -- table for this unit. If no entries, then Last_Interrupt_State =
kono
parents:
diff changeset
218 -- First_Interrupt_State - 1 (that's why the 'Base reference is there,
kono
parents:
diff changeset
219 -- it can be one less than the lower bound of the subtype). Not set if
kono
parents:
diff changeset
220 -- 'I' appears in Ignore_Lines
kono
parents:
diff changeset
221
kono
parents:
diff changeset
222 First_Specific_Dispatching : Priority_Specific_Dispatching_Id;
kono
parents:
diff changeset
223 Last_Specific_Dispatching : Priority_Specific_Dispatching_Id'Base;
kono
parents:
diff changeset
224 -- These point to the first and last entries in the priority specific
kono
parents:
diff changeset
225 -- dispatching table for this unit. If there are no entries, then
kono
parents:
diff changeset
226 -- Last_Specific_Dispatching = First_Specific_Dispatching - 1. That
kono
parents:
diff changeset
227 -- is why the 'Base reference is there, it can be one less than the
kono
parents:
diff changeset
228 -- lower bound of the subtype. Not set if 'S' appears in Ignore_Lines.
kono
parents:
diff changeset
229
kono
parents:
diff changeset
230 end record;
kono
parents:
diff changeset
231
kono
parents:
diff changeset
232 No_Main_Priority : constant Int := -1;
kono
parents:
diff changeset
233 -- Code for no main priority set
kono
parents:
diff changeset
234
kono
parents:
diff changeset
235 No_Main_CPU : constant Int := -1;
kono
parents:
diff changeset
236 -- Code for no main cpu set
kono
parents:
diff changeset
237
kono
parents:
diff changeset
238 package ALIs is new Table.Table (
kono
parents:
diff changeset
239 Table_Component_Type => ALIs_Record,
kono
parents:
diff changeset
240 Table_Index_Type => ALI_Id,
kono
parents:
diff changeset
241 Table_Low_Bound => First_ALI_Entry,
kono
parents:
diff changeset
242 Table_Initial => 500,
kono
parents:
diff changeset
243 Table_Increment => 200,
kono
parents:
diff changeset
244 Table_Name => "ALIs");
kono
parents:
diff changeset
245
kono
parents:
diff changeset
246 ----------------
kono
parents:
diff changeset
247 -- Unit Table --
kono
parents:
diff changeset
248 ----------------
kono
parents:
diff changeset
249
kono
parents:
diff changeset
250 -- Each unit within an ALI file generates an entry in the unit table
kono
parents:
diff changeset
251
kono
parents:
diff changeset
252 No_Unit_Id : constant Unit_Id := Unit_Id'First;
kono
parents:
diff changeset
253 -- Special value indicating no unit table entry
kono
parents:
diff changeset
254
kono
parents:
diff changeset
255 First_Unit_Entry : constant Unit_Id := No_Unit_Id + 1;
kono
parents:
diff changeset
256 -- Id of first actual entry in table
kono
parents:
diff changeset
257
kono
parents:
diff changeset
258 type Unit_Type is (Is_Spec, Is_Body, Is_Spec_Only, Is_Body_Only);
kono
parents:
diff changeset
259 -- Indicates type of entry, if both body and spec appear in the ALI file,
kono
parents:
diff changeset
260 -- then the first unit is marked Is_Body, and the second is marked Is_Spec.
kono
parents:
diff changeset
261 -- If only a spec appears, then it is marked as Is_Spec_Only, and if only
kono
parents:
diff changeset
262 -- a body appears, then it is marked Is_Body_Only).
kono
parents:
diff changeset
263
kono
parents:
diff changeset
264 subtype Version_String is String (1 .. 8);
kono
parents:
diff changeset
265 -- Version string, taken from unit record
kono
parents:
diff changeset
266
kono
parents:
diff changeset
267 type Unit_Record is record
kono
parents:
diff changeset
268
kono
parents:
diff changeset
269 My_ALI : ALI_Id;
kono
parents:
diff changeset
270 -- Corresponding ALI entry
kono
parents:
diff changeset
271
kono
parents:
diff changeset
272 Uname : Unit_Name_Type;
kono
parents:
diff changeset
273 -- Name of Unit
kono
parents:
diff changeset
274
kono
parents:
diff changeset
275 Sfile : File_Name_Type;
kono
parents:
diff changeset
276 -- Name of source file
kono
parents:
diff changeset
277
kono
parents:
diff changeset
278 Preelab : Boolean;
kono
parents:
diff changeset
279 -- Indicates presence of PR parameter for a preelaborated package
kono
parents:
diff changeset
280
kono
parents:
diff changeset
281 No_Elab : Boolean;
kono
parents:
diff changeset
282 -- Indicates presence of NE parameter for a unit that has does not
kono
parents:
diff changeset
283 -- have an elaboration routine (since it has no elaboration code).
kono
parents:
diff changeset
284
kono
parents:
diff changeset
285 Pure : Boolean;
kono
parents:
diff changeset
286 -- Indicates presence of PU parameter for a package having pragma Pure
kono
parents:
diff changeset
287
kono
parents:
diff changeset
288 Dynamic_Elab : Boolean;
kono
parents:
diff changeset
289 -- Set to True if the unit was compiled with dynamic elaboration checks
kono
parents:
diff changeset
290 -- (i.e. either -gnatE or pragma Elaboration_Checks (RM) was used to
kono
parents:
diff changeset
291 -- compile the unit).
kono
parents:
diff changeset
292
kono
parents:
diff changeset
293 Elaborate_Body : Boolean;
kono
parents:
diff changeset
294 -- Indicates presence of EB parameter for a package which has a pragma
kono
parents:
diff changeset
295 -- Elaborate_Body, and also for generic package instantiations.
kono
parents:
diff changeset
296
kono
parents:
diff changeset
297 Set_Elab_Entity : Boolean;
kono
parents:
diff changeset
298 -- Indicates presence of EE parameter for a unit which has an
kono
parents:
diff changeset
299 -- elaboration entity which must be set true as part of the
kono
parents:
diff changeset
300 -- elaboration of the unit.
kono
parents:
diff changeset
301
kono
parents:
diff changeset
302 Has_RACW : Boolean;
kono
parents:
diff changeset
303 -- Indicates presence of RA parameter for a package that declares at
kono
parents:
diff changeset
304 -- least one Remote Access to Class_Wide (RACW) object.
kono
parents:
diff changeset
305
kono
parents:
diff changeset
306 Remote_Types : Boolean;
kono
parents:
diff changeset
307 -- Indicates presence of RT parameter for a package which has a
kono
parents:
diff changeset
308 -- pragma Remote_Types.
kono
parents:
diff changeset
309
kono
parents:
diff changeset
310 Serious_Errors : Boolean;
kono
parents:
diff changeset
311 -- Indicates presence of SE parameter indicating that compilation of
kono
parents:
diff changeset
312 -- the unit encountered as serious error.
kono
parents:
diff changeset
313
kono
parents:
diff changeset
314 Shared_Passive : Boolean;
kono
parents:
diff changeset
315 -- Indicates presence of SP parameter for a package which has a pragma
kono
parents:
diff changeset
316 -- Shared_Passive.
kono
parents:
diff changeset
317
kono
parents:
diff changeset
318 RCI : Boolean;
kono
parents:
diff changeset
319 -- Indicates presence of RC parameter for a package which has a pragma
kono
parents:
diff changeset
320 -- Remote_Call_Interface.
kono
parents:
diff changeset
321
kono
parents:
diff changeset
322 Predefined : Boolean;
kono
parents:
diff changeset
323 -- Indicates if unit is language predefined (or a child of such a unit)
kono
parents:
diff changeset
324
kono
parents:
diff changeset
325 Internal : Boolean;
kono
parents:
diff changeset
326 -- Indicates if unit is an internal unit (or a child of such a unit)
kono
parents:
diff changeset
327
kono
parents:
diff changeset
328 First_With : With_Id;
kono
parents:
diff changeset
329 -- Id of first withs table entry for this file
kono
parents:
diff changeset
330
kono
parents:
diff changeset
331 Last_With : With_Id;
kono
parents:
diff changeset
332 -- Id of last withs table entry for this file
kono
parents:
diff changeset
333
kono
parents:
diff changeset
334 First_Arg : Arg_Id;
kono
parents:
diff changeset
335 -- Id of first args table entry for this file
kono
parents:
diff changeset
336
kono
parents:
diff changeset
337 Last_Arg : Arg_Id;
kono
parents:
diff changeset
338 -- Id of last args table entry for this file
kono
parents:
diff changeset
339
kono
parents:
diff changeset
340 Utype : Unit_Type;
kono
parents:
diff changeset
341 -- Type of entry
kono
parents:
diff changeset
342
kono
parents:
diff changeset
343 Is_Generic : Boolean;
kono
parents:
diff changeset
344 -- True for generic unit (i.e. a generic declaration, or a generic
kono
parents:
diff changeset
345 -- body). False for a non-generic unit.
kono
parents:
diff changeset
346
kono
parents:
diff changeset
347 Unit_Kind : Character;
kono
parents:
diff changeset
348 -- Indicates the nature of the unit. 'p' for Packages and 's' for
kono
parents:
diff changeset
349 -- subprograms.
kono
parents:
diff changeset
350
kono
parents:
diff changeset
351 Version : Version_String;
kono
parents:
diff changeset
352 -- Version of unit
kono
parents:
diff changeset
353
kono
parents:
diff changeset
354 Icasing : Casing_Type;
kono
parents:
diff changeset
355 -- Indicates casing of identifiers in source file for this unit. This
kono
parents:
diff changeset
356 -- is used for informational output, and also for constructing the main
kono
parents:
diff changeset
357 -- unit if it is being built in Ada.
kono
parents:
diff changeset
358
kono
parents:
diff changeset
359 Kcasing : Casing_Type;
kono
parents:
diff changeset
360 -- Indicates casing of keywords in source file for this unit. This is
kono
parents:
diff changeset
361 -- used for informational output, and also for constructing the main
kono
parents:
diff changeset
362 -- unit if it is being built in Ada.
kono
parents:
diff changeset
363
kono
parents:
diff changeset
364 Elab_Position : Nat;
kono
parents:
diff changeset
365 -- Initialized to zero. Set non-zero when a unit is chosen and
kono
parents:
diff changeset
366 -- placed in the elaboration order. The value represents the
kono
parents:
diff changeset
367 -- ordinal position in the elaboration order.
kono
parents:
diff changeset
368
kono
parents:
diff changeset
369 Init_Scalars : Boolean;
kono
parents:
diff changeset
370 -- Set True if IS qualifier appears in ALI file, indicating that
kono
parents:
diff changeset
371 -- an Initialize_Scalars pragma applies to the unit.
kono
parents:
diff changeset
372
kono
parents:
diff changeset
373 SAL_Interface : Boolean;
kono
parents:
diff changeset
374 -- Set True when this is an interface to a standalone library
kono
parents:
diff changeset
375
kono
parents:
diff changeset
376 Directly_Scanned : Boolean;
kono
parents:
diff changeset
377 -- True iff it is a unit from an ALI file specified to gnatbind
kono
parents:
diff changeset
378
kono
parents:
diff changeset
379 Body_Needed_For_SAL : Boolean;
kono
parents:
diff changeset
380 -- Indicates that the source for the body of the unit (subprogram,
kono
parents:
diff changeset
381 -- package, or generic unit) must be included in a standalone library.
kono
parents:
diff changeset
382
kono
parents:
diff changeset
383 Elaborate_Body_Desirable : Boolean;
kono
parents:
diff changeset
384 -- Indicates that the front end elaboration circuitry decided that it
kono
parents:
diff changeset
385 -- would be a good idea if this package had Elaborate_Body. The binder
kono
parents:
diff changeset
386 -- will attempt, but does not promise, to place the elaboration call
kono
parents:
diff changeset
387 -- for the body right after the call for the spec, or at least as close
kono
parents:
diff changeset
388 -- together as possible.
kono
parents:
diff changeset
389
kono
parents:
diff changeset
390 Optimize_Alignment : Character;
kono
parents:
diff changeset
391 -- Optimize_Alignment setting. Set to L/S/T/O for OL/OS/OT/OO present.
kono
parents:
diff changeset
392
kono
parents:
diff changeset
393 Has_Finalizer : Boolean;
kono
parents:
diff changeset
394 -- Indicates whether a package body or a spec has a library-level
kono
parents:
diff changeset
395 -- finalization routine.
kono
parents:
diff changeset
396
kono
parents:
diff changeset
397 Primary_Stack_Count : Int;
kono
parents:
diff changeset
398 -- Indicates the number of task objects declared in this unit that have
kono
parents:
diff changeset
399 -- default sized primary stacks.
kono
parents:
diff changeset
400
kono
parents:
diff changeset
401 Sec_Stack_Count : Int;
kono
parents:
diff changeset
402 -- Indicates the number of task objects declared in this unit that have
kono
parents:
diff changeset
403 -- default sized secondary stacks.
kono
parents:
diff changeset
404 end record;
kono
parents:
diff changeset
405
kono
parents:
diff changeset
406 package Units is new Table.Table (
kono
parents:
diff changeset
407 Table_Component_Type => Unit_Record,
kono
parents:
diff changeset
408 Table_Index_Type => Unit_Id,
kono
parents:
diff changeset
409 Table_Low_Bound => First_Unit_Entry,
kono
parents:
diff changeset
410 Table_Initial => 100,
kono
parents:
diff changeset
411 Table_Increment => 200,
kono
parents:
diff changeset
412 Table_Name => "Unit");
kono
parents:
diff changeset
413
kono
parents:
diff changeset
414 ---------------------------
kono
parents:
diff changeset
415 -- Interrupt State Table --
kono
parents:
diff changeset
416 ---------------------------
kono
parents:
diff changeset
417
kono
parents:
diff changeset
418 -- An entry is made in this table for each I (interrupt state) line
kono
parents:
diff changeset
419 -- encountered in the input ALI file. The First/Last_Interrupt_Id
kono
parents:
diff changeset
420 -- fields of the ALI file entry show the range of entries defined
kono
parents:
diff changeset
421 -- within a particular ALI file.
kono
parents:
diff changeset
422
kono
parents:
diff changeset
423 type Interrupt_State_Record is record
kono
parents:
diff changeset
424 Interrupt_Id : Nat;
kono
parents:
diff changeset
425 -- Id from interrupt state entry
kono
parents:
diff changeset
426
kono
parents:
diff changeset
427 Interrupt_State : Character;
kono
parents:
diff changeset
428 -- State from interrupt state entry ('u'/'r'/'s')
kono
parents:
diff changeset
429
kono
parents:
diff changeset
430 IS_Pragma_Line : Nat;
kono
parents:
diff changeset
431 -- Line number of Interrupt_State pragma
kono
parents:
diff changeset
432 end record;
kono
parents:
diff changeset
433
kono
parents:
diff changeset
434 package Interrupt_States is new Table.Table (
kono
parents:
diff changeset
435 Table_Component_Type => Interrupt_State_Record,
kono
parents:
diff changeset
436 Table_Index_Type => Interrupt_State_Id'Base,
kono
parents:
diff changeset
437 Table_Low_Bound => Interrupt_State_Id'First,
kono
parents:
diff changeset
438 Table_Initial => 100,
kono
parents:
diff changeset
439 Table_Increment => 200,
kono
parents:
diff changeset
440 Table_Name => "Interrupt_States");
kono
parents:
diff changeset
441
kono
parents:
diff changeset
442 -----------------------------------------
kono
parents:
diff changeset
443 -- Priority Specific Dispatching Table --
kono
parents:
diff changeset
444 -----------------------------------------
kono
parents:
diff changeset
445
kono
parents:
diff changeset
446 -- An entry is made in this table for each S (priority specific
kono
parents:
diff changeset
447 -- dispatching) line encountered in the input ALI file. The
kono
parents:
diff changeset
448 -- First/Last_Specific_Dispatching_Id fields of the ALI file
kono
parents:
diff changeset
449 -- entry show the range of entries defined within a particular
kono
parents:
diff changeset
450 -- ALI file.
kono
parents:
diff changeset
451
kono
parents:
diff changeset
452 type Specific_Dispatching_Record is record
kono
parents:
diff changeset
453 Dispatching_Policy : Character;
kono
parents:
diff changeset
454 -- First character (upper case) of the corresponding policy name
kono
parents:
diff changeset
455
kono
parents:
diff changeset
456 First_Priority : Nat;
kono
parents:
diff changeset
457 -- Lower bound of the priority range to which the specified dispatching
kono
parents:
diff changeset
458 -- policy applies.
kono
parents:
diff changeset
459
kono
parents:
diff changeset
460 Last_Priority : Nat;
kono
parents:
diff changeset
461 -- Upper bound of the priority range to which the specified dispatching
kono
parents:
diff changeset
462 -- policy applies.
kono
parents:
diff changeset
463
kono
parents:
diff changeset
464 PSD_Pragma_Line : Nat;
kono
parents:
diff changeset
465 -- Line number of Priority_Specific_Dispatching pragma
kono
parents:
diff changeset
466 end record;
kono
parents:
diff changeset
467
kono
parents:
diff changeset
468 package Specific_Dispatching is new Table.Table (
kono
parents:
diff changeset
469 Table_Component_Type => Specific_Dispatching_Record,
kono
parents:
diff changeset
470 Table_Index_Type => Priority_Specific_Dispatching_Id'Base,
kono
parents:
diff changeset
471 Table_Low_Bound => Priority_Specific_Dispatching_Id'First,
kono
parents:
diff changeset
472 Table_Initial => 100,
kono
parents:
diff changeset
473 Table_Increment => 200,
kono
parents:
diff changeset
474 Table_Name => "Priority_Specific_Dispatching");
kono
parents:
diff changeset
475
kono
parents:
diff changeset
476 --------------
kono
parents:
diff changeset
477 -- Switches --
kono
parents:
diff changeset
478 --------------
kono
parents:
diff changeset
479
kono
parents:
diff changeset
480 -- These switches record status information about ali files that
kono
parents:
diff changeset
481 -- have been read, for quick reference without searching tables.
kono
parents:
diff changeset
482
kono
parents:
diff changeset
483 -- Note: a switch will be left set at its default value if the line
kono
parents:
diff changeset
484 -- which might otherwise set it is ignored (from Ignore_Lines).
kono
parents:
diff changeset
485
kono
parents:
diff changeset
486 Dynamic_Elaboration_Checks_Specified : Boolean := False;
kono
parents:
diff changeset
487 -- Set to False by Initialize_ALI. Set to True if Scan_ALI reads
kono
parents:
diff changeset
488 -- a unit for which dynamic elaboration checking is enabled.
kono
parents:
diff changeset
489
kono
parents:
diff changeset
490 Frontend_Exceptions_Specified : Boolean := False;
kono
parents:
diff changeset
491 -- Set to False by Initialize_ALI. Set to True if an ali file is read that
kono
parents:
diff changeset
492 -- has a P line specifying the generation of front-end exceptions.
kono
parents:
diff changeset
493
kono
parents:
diff changeset
494 GNATprove_Mode_Specified : Boolean := False;
kono
parents:
diff changeset
495 -- Set to True if an ali file was produced in GNATprove mode.
kono
parents:
diff changeset
496
kono
parents:
diff changeset
497 Initialize_Scalars_Used : Boolean := False;
kono
parents:
diff changeset
498 -- Set True if an ali file contains the Initialize_Scalars flag
kono
parents:
diff changeset
499
kono
parents:
diff changeset
500 Locking_Policy_Specified : Character := ' ';
kono
parents:
diff changeset
501 -- Set to blank by Initialize_ALI. Set to the appropriate locking policy
kono
parents:
diff changeset
502 -- character if an ali file contains a P line setting the locking policy.
kono
parents:
diff changeset
503
kono
parents:
diff changeset
504 No_Normalize_Scalars_Specified : Boolean := False;
kono
parents:
diff changeset
505 -- Set to False by Initialize_ALI. Set to True if an ali file indicates
kono
parents:
diff changeset
506 -- that the file was compiled without normalize scalars.
kono
parents:
diff changeset
507
kono
parents:
diff changeset
508 No_Component_Reordering_Specified : Boolean := False;
kono
parents:
diff changeset
509 -- Set to False by Initialize_ALI. Set to True if an ali file contains
kono
parents:
diff changeset
510 -- the No_Component_Reordering flag.
kono
parents:
diff changeset
511
kono
parents:
diff changeset
512 No_Object_Specified : Boolean := False;
kono
parents:
diff changeset
513 -- Set to False by Initialize_ALI. Set to True if an ali file contains
kono
parents:
diff changeset
514 -- the No_Object flag.
kono
parents:
diff changeset
515
kono
parents:
diff changeset
516 Normalize_Scalars_Specified : Boolean := False;
kono
parents:
diff changeset
517 -- Set to False by Initialize_ALI. Set to True if an ali file indicates
kono
parents:
diff changeset
518 -- that the file was compiled in Normalize_Scalars mode.
kono
parents:
diff changeset
519
kono
parents:
diff changeset
520 Partition_Elaboration_Policy_Specified : Character := ' ';
kono
parents:
diff changeset
521 -- Set to blank by Initialize_ALI. Set to the appropriate partition
kono
parents:
diff changeset
522 -- elaboration policy character if an ali file contains a P line setting
kono
parents:
diff changeset
523 -- the policy.
kono
parents:
diff changeset
524
kono
parents:
diff changeset
525 Queuing_Policy_Specified : Character := ' ';
kono
parents:
diff changeset
526 -- Set to blank by Initialize_ALI. Set to the appropriate queuing policy
kono
parents:
diff changeset
527 -- character if an ali file contains a P line setting the queuing policy.
kono
parents:
diff changeset
528
kono
parents:
diff changeset
529 Cumulative_Restrictions : Restrictions_Info := No_Restrictions;
kono
parents:
diff changeset
530 -- This variable records the cumulative contributions of R lines in all
kono
parents:
diff changeset
531 -- ali files, showing whether a restriction pragma exists anywhere, and
kono
parents:
diff changeset
532 -- accumulating the aggregate knowledge of violations.
kono
parents:
diff changeset
533
kono
parents:
diff changeset
534 SSO_Default_Specified : Boolean := False;
kono
parents:
diff changeset
535 -- Set to True if at least one ALI file contains an OH/OL flag indicating
kono
parents:
diff changeset
536 -- that it was compiled with a configuration pragmas file containing the
kono
parents:
diff changeset
537 -- pragma Default_Scalar_Storage_Order (OH/OL present in ALI file P line).
kono
parents:
diff changeset
538
kono
parents:
diff changeset
539 Stack_Check_Switch_Set : Boolean := False;
kono
parents:
diff changeset
540 -- Set to True if at least one ALI file contains '-fstack-check' in its
kono
parents:
diff changeset
541 -- argument list.
kono
parents:
diff changeset
542
kono
parents:
diff changeset
543 Task_Dispatching_Policy_Specified : Character := ' ';
kono
parents:
diff changeset
544 -- Set to blank by Initialize_ALI. Set to the appropriate task dispatching
kono
parents:
diff changeset
545 -- policy character if an ali file contains a P line setting the
kono
parents:
diff changeset
546 -- task dispatching policy.
kono
parents:
diff changeset
547
kono
parents:
diff changeset
548 Unreserve_All_Interrupts_Specified : Boolean := False;
kono
parents:
diff changeset
549 -- Set to False by Initialize_ALI. Set to True if an ali file is read that
kono
parents:
diff changeset
550 -- has P line specifying unreserve all interrupts mode.
kono
parents:
diff changeset
551
kono
parents:
diff changeset
552 Zero_Cost_Exceptions_Specified : Boolean := False;
kono
parents:
diff changeset
553 -- Set to False by Initialize_ALI. Set to True if an ali file is read that
kono
parents:
diff changeset
554 -- has a P line specifying the generation of zero cost exceptions.
kono
parents:
diff changeset
555
kono
parents:
diff changeset
556 -----------------
kono
parents:
diff changeset
557 -- Withs Table --
kono
parents:
diff changeset
558 -----------------
kono
parents:
diff changeset
559
kono
parents:
diff changeset
560 -- Each With line (W line) in an ALI file generates a Withs table entry
kono
parents:
diff changeset
561
kono
parents:
diff changeset
562 -- Note: there will be no entries in this table if 'W' lines are ignored
kono
parents:
diff changeset
563
kono
parents:
diff changeset
564 No_With_Id : constant With_Id := With_Id'First;
kono
parents:
diff changeset
565 -- Special value indicating no withs table entry
kono
parents:
diff changeset
566
kono
parents:
diff changeset
567 First_With_Entry : constant With_Id := No_With_Id + 1;
kono
parents:
diff changeset
568 -- Id of first actual entry in table
kono
parents:
diff changeset
569
kono
parents:
diff changeset
570 type With_Record is record
kono
parents:
diff changeset
571
kono
parents:
diff changeset
572 Uname : Unit_Name_Type;
kono
parents:
diff changeset
573 -- Name of Unit
kono
parents:
diff changeset
574
kono
parents:
diff changeset
575 Sfile : File_Name_Type;
kono
parents:
diff changeset
576 -- Name of source file, set to No_File in generic case
kono
parents:
diff changeset
577
kono
parents:
diff changeset
578 Afile : File_Name_Type;
kono
parents:
diff changeset
579 -- Name of ALI file, set to No_File in generic case
kono
parents:
diff changeset
580
kono
parents:
diff changeset
581 Elaborate : Boolean;
kono
parents:
diff changeset
582 -- Indicates presence of E parameter
kono
parents:
diff changeset
583
kono
parents:
diff changeset
584 Elaborate_All : Boolean;
kono
parents:
diff changeset
585 -- Indicates presence of EA parameter
kono
parents:
diff changeset
586
kono
parents:
diff changeset
587 Elab_All_Desirable : Boolean;
kono
parents:
diff changeset
588 -- Indicates presence of AD parameter
kono
parents:
diff changeset
589
kono
parents:
diff changeset
590 Elab_Desirable : Boolean;
kono
parents:
diff changeset
591 -- Indicates presence of ED parameter
kono
parents:
diff changeset
592
kono
parents:
diff changeset
593 SAL_Interface : Boolean := False;
kono
parents:
diff changeset
594 -- True if the Unit is an Interface of a Stand-Alone Library
kono
parents:
diff changeset
595
kono
parents:
diff changeset
596 Limited_With : Boolean := False;
kono
parents:
diff changeset
597 -- True if unit is named in a limited_with_clause
kono
parents:
diff changeset
598
kono
parents:
diff changeset
599 Implicit_With_From_Instantiation : Boolean := False;
kono
parents:
diff changeset
600 -- True if this is an implicit with from a generic instantiation
kono
parents:
diff changeset
601 end record;
kono
parents:
diff changeset
602
kono
parents:
diff changeset
603 package Withs is new Table.Table (
kono
parents:
diff changeset
604 Table_Component_Type => With_Record,
kono
parents:
diff changeset
605 Table_Index_Type => With_Id,
kono
parents:
diff changeset
606 Table_Low_Bound => First_With_Entry,
kono
parents:
diff changeset
607 Table_Initial => 5000,
kono
parents:
diff changeset
608 Table_Increment => 200,
kono
parents:
diff changeset
609 Table_Name => "Withs");
kono
parents:
diff changeset
610
kono
parents:
diff changeset
611 ---------------------
kono
parents:
diff changeset
612 -- Arguments Table --
kono
parents:
diff changeset
613 ---------------------
kono
parents:
diff changeset
614
kono
parents:
diff changeset
615 -- Each Arg line (A line) in an ALI file generates an Args table entry
kono
parents:
diff changeset
616
kono
parents:
diff changeset
617 -- Note: there will be no entries in this table if 'A' lines are ignored
kono
parents:
diff changeset
618
kono
parents:
diff changeset
619 No_Arg_Id : constant Arg_Id := Arg_Id'First;
kono
parents:
diff changeset
620 -- Special value indicating no args table entry
kono
parents:
diff changeset
621
kono
parents:
diff changeset
622 First_Arg_Entry : constant Arg_Id := No_Arg_Id + 1;
kono
parents:
diff changeset
623 -- Id of first actual entry in table
kono
parents:
diff changeset
624
kono
parents:
diff changeset
625 package Args is new Table.Table (
kono
parents:
diff changeset
626 Table_Component_Type => String_Ptr,
kono
parents:
diff changeset
627 Table_Index_Type => Arg_Id,
kono
parents:
diff changeset
628 Table_Low_Bound => First_Arg_Entry,
kono
parents:
diff changeset
629 Table_Initial => 1000,
kono
parents:
diff changeset
630 Table_Increment => 100,
kono
parents:
diff changeset
631 Table_Name => "Args");
kono
parents:
diff changeset
632
kono
parents:
diff changeset
633 --------------------------
kono
parents:
diff changeset
634 -- Linker_Options Table --
kono
parents:
diff changeset
635 --------------------------
kono
parents:
diff changeset
636
kono
parents:
diff changeset
637 -- If an ALI file has one of more Linker_Options lines, then a single
kono
parents:
diff changeset
638 -- entry is made in this table. If more than one Linker_Options lines
kono
parents:
diff changeset
639 -- appears in a given ALI file, then the arguments are concatenated
kono
parents:
diff changeset
640 -- to form the entry in this table, using a NUL character as the
kono
parents:
diff changeset
641 -- separator, and a final NUL character is appended to the end.
kono
parents:
diff changeset
642
kono
parents:
diff changeset
643 -- Note: there will be no entries in this table if 'L' lines are ignored
kono
parents:
diff changeset
644
kono
parents:
diff changeset
645 type Linker_Option_Record is record
kono
parents:
diff changeset
646 Name : Name_Id;
kono
parents:
diff changeset
647 -- Name entry containing concatenated list of Linker_Options
kono
parents:
diff changeset
648 -- arguments separated by NUL and ended by NUL as described above.
kono
parents:
diff changeset
649
kono
parents:
diff changeset
650 Unit : Unit_Id;
kono
parents:
diff changeset
651 -- Unit_Id for the entry
kono
parents:
diff changeset
652
kono
parents:
diff changeset
653 Internal_File : Boolean;
kono
parents:
diff changeset
654 -- Set True if the linker options are from an internal file. This is
kono
parents:
diff changeset
655 -- used to insert certain standard entries after all the user entries
kono
parents:
diff changeset
656 -- but before the entries from the run-time.
kono
parents:
diff changeset
657
kono
parents:
diff changeset
658 Original_Pos : Positive;
kono
parents:
diff changeset
659 -- Keep track of original position in the linker options table. This
kono
parents:
diff changeset
660 -- is used to implement a stable sort when we sort the linker options
kono
parents:
diff changeset
661 -- table.
kono
parents:
diff changeset
662 end record;
kono
parents:
diff changeset
663
kono
parents:
diff changeset
664 -- The indexes of active entries in this table range from 1 to the
kono
parents:
diff changeset
665 -- value of Linker_Options.Last. The zero'th element is for sort call.
kono
parents:
diff changeset
666
kono
parents:
diff changeset
667 package Linker_Options is new Table.Table (
kono
parents:
diff changeset
668 Table_Component_Type => Linker_Option_Record,
kono
parents:
diff changeset
669 Table_Index_Type => Integer,
kono
parents:
diff changeset
670 Table_Low_Bound => 0,
kono
parents:
diff changeset
671 Table_Initial => 200,
kono
parents:
diff changeset
672 Table_Increment => 400,
kono
parents:
diff changeset
673 Table_Name => "Linker_Options");
kono
parents:
diff changeset
674
kono
parents:
diff changeset
675 -----------------
kono
parents:
diff changeset
676 -- Notes Table --
kono
parents:
diff changeset
677 -----------------
kono
parents:
diff changeset
678
kono
parents:
diff changeset
679 -- The notes table records entries from N lines
kono
parents:
diff changeset
680
kono
parents:
diff changeset
681 type Notes_Record is record
kono
parents:
diff changeset
682 Pragma_Type : Character;
kono
parents:
diff changeset
683 -- 'A', 'C', 'I', 'S', 'T' for Annotate/Comment/Ident/Subtitle/Title
kono
parents:
diff changeset
684
kono
parents:
diff changeset
685 Pragma_Line : Nat;
kono
parents:
diff changeset
686 -- Line number of pragma
kono
parents:
diff changeset
687
kono
parents:
diff changeset
688 Pragma_Col : Nat;
kono
parents:
diff changeset
689 -- Column number of pragma
kono
parents:
diff changeset
690
kono
parents:
diff changeset
691 Pragma_Source_File : File_Name_Type;
kono
parents:
diff changeset
692 -- Source file of pragma
kono
parents:
diff changeset
693
kono
parents:
diff changeset
694 Pragma_Args : Name_Id;
kono
parents:
diff changeset
695 -- Pragma arguments. No_Name if no arguments, otherwise a single
kono
parents:
diff changeset
696 -- name table entry consisting of all the characters on the notes
kono
parents:
diff changeset
697 -- line from the first non-blank character following the source
kono
parents:
diff changeset
698 -- location to the last character on the line.
kono
parents:
diff changeset
699 end record;
kono
parents:
diff changeset
700
kono
parents:
diff changeset
701 -- The indexes of active entries in this table range from 1 to the
kono
parents:
diff changeset
702 -- value of Linker_Options.Last. The zero'th element is for convenience
kono
parents:
diff changeset
703 -- if the table needs to be sorted.
kono
parents:
diff changeset
704
kono
parents:
diff changeset
705 package Notes is new Table.Table (
kono
parents:
diff changeset
706 Table_Component_Type => Notes_Record,
kono
parents:
diff changeset
707 Table_Index_Type => Integer,
kono
parents:
diff changeset
708 Table_Low_Bound => 0,
kono
parents:
diff changeset
709 Table_Initial => 200,
kono
parents:
diff changeset
710 Table_Increment => 400,
kono
parents:
diff changeset
711 Table_Name => "Notes");
kono
parents:
diff changeset
712
kono
parents:
diff changeset
713 -------------------------------------------
kono
parents:
diff changeset
714 -- External Version Reference Hash Table --
kono
parents:
diff changeset
715 -------------------------------------------
kono
parents:
diff changeset
716
kono
parents:
diff changeset
717 -- This hash table keeps track of external version reference strings
kono
parents:
diff changeset
718 -- as read from E lines in the ali file. The stored values do not
kono
parents:
diff changeset
719 -- include the terminating quote characters.
kono
parents:
diff changeset
720
kono
parents:
diff changeset
721 -- Note: there will be no entries in this table if 'E' lines are ignored
kono
parents:
diff changeset
722
kono
parents:
diff changeset
723 type Vindex is range 0 .. 98;
kono
parents:
diff changeset
724 -- Type to define range of headers
kono
parents:
diff changeset
725
kono
parents:
diff changeset
726 function SHash (S : String_Ptr) return Vindex;
kono
parents:
diff changeset
727 -- Hash function for this table
kono
parents:
diff changeset
728
kono
parents:
diff changeset
729 function SEq (F1, F2 : String_Ptr) return Boolean;
kono
parents:
diff changeset
730 -- Equality function for this table
kono
parents:
diff changeset
731
kono
parents:
diff changeset
732 package Version_Ref is new Simple_HTable (
kono
parents:
diff changeset
733 Header_Num => Vindex,
kono
parents:
diff changeset
734 Element => Boolean,
kono
parents:
diff changeset
735 No_Element => False,
kono
parents:
diff changeset
736 Key => String_Ptr,
kono
parents:
diff changeset
737 Hash => SHash,
kono
parents:
diff changeset
738 Equal => SEq);
kono
parents:
diff changeset
739
kono
parents:
diff changeset
740 -------------------------
kono
parents:
diff changeset
741 -- No_Dependency Table --
kono
parents:
diff changeset
742 -------------------------
kono
parents:
diff changeset
743
kono
parents:
diff changeset
744 -- Each R line for a No_Dependency Restriction generates an entry in
kono
parents:
diff changeset
745 -- this No_Dependency table.
kono
parents:
diff changeset
746
kono
parents:
diff changeset
747 type No_Dep_Record is record
kono
parents:
diff changeset
748 ALI_File : ALI_Id;
kono
parents:
diff changeset
749 -- ALI File containing the entry
kono
parents:
diff changeset
750
kono
parents:
diff changeset
751 No_Dep_Unit : Name_Id;
kono
parents:
diff changeset
752 -- Id for names table entry including entire name, including periods
kono
parents:
diff changeset
753 end record;
kono
parents:
diff changeset
754
kono
parents:
diff changeset
755 package No_Deps is new Table.Table (
kono
parents:
diff changeset
756 Table_Component_Type => No_Dep_Record,
kono
parents:
diff changeset
757 Table_Index_Type => Integer,
kono
parents:
diff changeset
758 Table_Low_Bound => 0,
kono
parents:
diff changeset
759 Table_Initial => 200,
kono
parents:
diff changeset
760 Table_Increment => 400,
kono
parents:
diff changeset
761 Table_Name => "No_Deps");
kono
parents:
diff changeset
762
kono
parents:
diff changeset
763 ------------------------------------
kono
parents:
diff changeset
764 -- Sdep (Source Dependency) Table --
kono
parents:
diff changeset
765 ------------------------------------
kono
parents:
diff changeset
766
kono
parents:
diff changeset
767 -- Each source dependency (D line) in an ALI file generates an entry in the
kono
parents:
diff changeset
768 -- Sdep table.
kono
parents:
diff changeset
769
kono
parents:
diff changeset
770 -- Note: there will be no entries in this table if 'D' lines are ignored
kono
parents:
diff changeset
771
kono
parents:
diff changeset
772 No_Sdep_Id : constant Sdep_Id := Sdep_Id'First;
kono
parents:
diff changeset
773 -- Special value indicating no Sdep table entry
kono
parents:
diff changeset
774
kono
parents:
diff changeset
775 First_Sdep_Entry : Sdep_Id := No_Sdep_Id + 1;
kono
parents:
diff changeset
776 -- Id of first Sdep entry for current ali file. This is initialized to the
kono
parents:
diff changeset
777 -- first Sdep entry in the table, and then incremented appropriately as
kono
parents:
diff changeset
778 -- successive ALI files are scanned.
kono
parents:
diff changeset
779
kono
parents:
diff changeset
780 type Sdep_Record is record
kono
parents:
diff changeset
781
kono
parents:
diff changeset
782 Sfile : File_Name_Type;
kono
parents:
diff changeset
783 -- Name of source file
kono
parents:
diff changeset
784
kono
parents:
diff changeset
785 Stamp : Time_Stamp_Type;
kono
parents:
diff changeset
786 -- Time stamp value. Note that this will be all zero characters for the
kono
parents:
diff changeset
787 -- dummy entries for missing or non-dependent files.
kono
parents:
diff changeset
788
kono
parents:
diff changeset
789 Checksum : Word;
kono
parents:
diff changeset
790 -- Checksum value. Note that this will be all zero characters for the
kono
parents:
diff changeset
791 -- dummy entries for missing or non-dependent files
kono
parents:
diff changeset
792
kono
parents:
diff changeset
793 Dummy_Entry : Boolean;
kono
parents:
diff changeset
794 -- Set True for dummy entries that correspond to missing files or files
kono
parents:
diff changeset
795 -- where no dependency relationship exists.
kono
parents:
diff changeset
796
kono
parents:
diff changeset
797 Subunit_Name : Name_Id;
kono
parents:
diff changeset
798 -- Name_Id for subunit name if present, else No_Name
kono
parents:
diff changeset
799
kono
parents:
diff changeset
800 Unit_Name : Name_Id;
kono
parents:
diff changeset
801 -- Name_Id for the unit name if not a subunit (No_Name for a subunit)
kono
parents:
diff changeset
802 Rfile : File_Name_Type;
kono
parents:
diff changeset
803 -- Reference file name. Same as Sfile unless a Source_Reference pragma
kono
parents:
diff changeset
804 -- was used, in which case it reflects the name used in the pragma.
kono
parents:
diff changeset
805
kono
parents:
diff changeset
806 Start_Line : Nat;
kono
parents:
diff changeset
807 -- Starting line number in file. Always 1, unless a Source_Reference
kono
parents:
diff changeset
808 -- pragma was used, in which case it reflects the line number value
kono
parents:
diff changeset
809 -- given in the pragma.
kono
parents:
diff changeset
810
kono
parents:
diff changeset
811 end record;
kono
parents:
diff changeset
812
kono
parents:
diff changeset
813 package Sdep is new Table.Table (
kono
parents:
diff changeset
814 Table_Component_Type => Sdep_Record,
kono
parents:
diff changeset
815 Table_Index_Type => Sdep_Id,
kono
parents:
diff changeset
816 Table_Low_Bound => First_Sdep_Entry,
kono
parents:
diff changeset
817 Table_Initial => 5000,
kono
parents:
diff changeset
818 Table_Increment => 200,
kono
parents:
diff changeset
819 Table_Name => "Sdep");
kono
parents:
diff changeset
820
kono
parents:
diff changeset
821 ----------------------------
kono
parents:
diff changeset
822 -- Use of Name Table Info --
kono
parents:
diff changeset
823 ----------------------------
kono
parents:
diff changeset
824
kono
parents:
diff changeset
825 -- All unit names and file names are entered into the Names table. The Info
kono
parents:
diff changeset
826 -- fields of these entries are used as follows:
kono
parents:
diff changeset
827
kono
parents:
diff changeset
828 -- Unit name Info field has Unit_Id of unit table entry
kono
parents:
diff changeset
829 -- ALI file name Info field has ALI_Id of ALI table entry
kono
parents:
diff changeset
830 -- Source file name Info field has Source_Id of source table entry
kono
parents:
diff changeset
831
kono
parents:
diff changeset
832 --------------------------
kono
parents:
diff changeset
833 -- Cross-Reference Data --
kono
parents:
diff changeset
834 --------------------------
kono
parents:
diff changeset
835
kono
parents:
diff changeset
836 -- The following table records cross-reference sections, there is one entry
kono
parents:
diff changeset
837 -- for each X header line in the ALI file for an xref section.
kono
parents:
diff changeset
838
kono
parents:
diff changeset
839 -- Note: there will be no entries in this table if 'X' lines are ignored
kono
parents:
diff changeset
840
kono
parents:
diff changeset
841 type Xref_Section_Record is record
kono
parents:
diff changeset
842 File_Num : Sdep_Id;
kono
parents:
diff changeset
843 -- Dependency number for file (entry in Sdep.Table)
kono
parents:
diff changeset
844
kono
parents:
diff changeset
845 File_Name : File_Name_Type;
kono
parents:
diff changeset
846 -- Name of file
kono
parents:
diff changeset
847
kono
parents:
diff changeset
848 First_Entity : Nat;
kono
parents:
diff changeset
849 -- First entry in Xref_Entity table
kono
parents:
diff changeset
850
kono
parents:
diff changeset
851 Last_Entity : Nat;
kono
parents:
diff changeset
852 -- Last entry in Xref_Entity table
kono
parents:
diff changeset
853 end record;
kono
parents:
diff changeset
854
kono
parents:
diff changeset
855 package Xref_Section is new Table.Table (
kono
parents:
diff changeset
856 Table_Component_Type => Xref_Section_Record,
kono
parents:
diff changeset
857 Table_Index_Type => Nat,
kono
parents:
diff changeset
858 Table_Low_Bound => 1,
kono
parents:
diff changeset
859 Table_Initial => 50,
kono
parents:
diff changeset
860 Table_Increment => 300,
kono
parents:
diff changeset
861 Table_Name => "Xref_Section");
kono
parents:
diff changeset
862
kono
parents:
diff changeset
863 -- The following is used to indicate whether a typeref field is present
kono
parents:
diff changeset
864 -- for the entity, and if so what kind of typeref field.
kono
parents:
diff changeset
865
kono
parents:
diff changeset
866 type Tref_Kind is (
kono
parents:
diff changeset
867 Tref_None, -- No typeref present
kono
parents:
diff changeset
868 Tref_Access, -- Access type typeref (points to designated type)
kono
parents:
diff changeset
869 Tref_Derived, -- Derived type typeref (points to parent type)
kono
parents:
diff changeset
870 Tref_Type); -- All other cases
kono
parents:
diff changeset
871
kono
parents:
diff changeset
872 type Visibility_Kind is
kono
parents:
diff changeset
873 (Global, -- Library level entity
kono
parents:
diff changeset
874 Static, -- Static C/C++ entity
kono
parents:
diff changeset
875 Other); -- Local and other entity
kono
parents:
diff changeset
876
kono
parents:
diff changeset
877 -- The following table records entities for which xrefs are recorded
kono
parents:
diff changeset
878
kono
parents:
diff changeset
879 type Xref_Entity_Record is record
kono
parents:
diff changeset
880 Line : Pos;
kono
parents:
diff changeset
881 -- Line number of definition
kono
parents:
diff changeset
882
kono
parents:
diff changeset
883 Etype : Character;
kono
parents:
diff changeset
884 -- Set to the identification character for the entity. See section
kono
parents:
diff changeset
885 -- "Cross-Reference Entity Identifiers" in lib-xref.ads for details.
kono
parents:
diff changeset
886
kono
parents:
diff changeset
887 Col : Pos;
kono
parents:
diff changeset
888 -- Column number of definition
kono
parents:
diff changeset
889
kono
parents:
diff changeset
890 Visibility : Visibility_Kind;
kono
parents:
diff changeset
891 -- Visibility of entity
kono
parents:
diff changeset
892
kono
parents:
diff changeset
893 Entity : Name_Id;
kono
parents:
diff changeset
894 -- Name of entity
kono
parents:
diff changeset
895
kono
parents:
diff changeset
896 Iref_File_Num : Sdep_Id;
kono
parents:
diff changeset
897 -- This field is set to the dependency reference for the file containing
kono
parents:
diff changeset
898 -- the generic entity that this one instantiates, or to No_Sdep_Id if
kono
parents:
diff changeset
899 -- the current entity is not an instantiation
kono
parents:
diff changeset
900
kono
parents:
diff changeset
901 Iref_Line : Nat;
kono
parents:
diff changeset
902 -- This field is set to the line number in Iref_File_Num of the generic
kono
parents:
diff changeset
903 -- entity that this one instantiates, or to zero if the current entity
kono
parents:
diff changeset
904 -- is not an instantiation.
kono
parents:
diff changeset
905
kono
parents:
diff changeset
906 Rref_Line : Nat;
kono
parents:
diff changeset
907 -- This field is set to the line number of a renaming reference if
kono
parents:
diff changeset
908 -- one is present, or to zero if no renaming reference is present
kono
parents:
diff changeset
909
kono
parents:
diff changeset
910 Rref_Col : Nat;
kono
parents:
diff changeset
911 -- This field is set to the column number of a renaming reference
kono
parents:
diff changeset
912 -- if one is present, or to zero if no renaming reference is present.
kono
parents:
diff changeset
913
kono
parents:
diff changeset
914 Tref : Tref_Kind;
kono
parents:
diff changeset
915 -- Indicates if a typeref is present, and if so what kind. Set to
kono
parents:
diff changeset
916 -- Tref_None if no typeref field is present.
kono
parents:
diff changeset
917
kono
parents:
diff changeset
918 Tref_File_Num : Sdep_Id;
kono
parents:
diff changeset
919 -- This field is set to No_Sdep_Id if no typeref is present, or
kono
parents:
diff changeset
920 -- if the typeref refers to an entity in standard. Otherwise it
kono
parents:
diff changeset
921 -- it is the dependency reference for the file containing the
kono
parents:
diff changeset
922 -- declaration of the typeref entity.
kono
parents:
diff changeset
923
kono
parents:
diff changeset
924 Tref_Line : Nat;
kono
parents:
diff changeset
925 -- This field is set to zero if no typeref is present, or if the
kono
parents:
diff changeset
926 -- typeref refers to an entity in standard. Otherwise it contains
kono
parents:
diff changeset
927 -- the line number of the declaration of the typeref entity.
kono
parents:
diff changeset
928
kono
parents:
diff changeset
929 Tref_Type : Character;
kono
parents:
diff changeset
930 -- This field is set to blank if no typeref is present, or if the
kono
parents:
diff changeset
931 -- typeref refers to an entity in standard. Otherwise it contains
kono
parents:
diff changeset
932 -- the identification character for the typeref entity. See section
kono
parents:
diff changeset
933 -- "Cross-Reference Entity Identifiers" in lib-xref.ads for details.
kono
parents:
diff changeset
934
kono
parents:
diff changeset
935 Tref_Col : Nat;
kono
parents:
diff changeset
936 -- This field is set to zero if no typeref is present, or if the
kono
parents:
diff changeset
937 -- typeref refers to an entity in standard. Otherwise it contains
kono
parents:
diff changeset
938 -- the column number of the declaration of the parent type.
kono
parents:
diff changeset
939
kono
parents:
diff changeset
940 Tref_Standard_Entity : Name_Id;
kono
parents:
diff changeset
941 -- This field is set to No_Name if no typeref is present or if the
kono
parents:
diff changeset
942 -- typeref refers to a declared entity rather than an entity in
kono
parents:
diff changeset
943 -- package Standard. If there is a typeref that references an
kono
parents:
diff changeset
944 -- entity in package Standard, then this field is a Name_Id
kono
parents:
diff changeset
945 -- reference for the entity name.
kono
parents:
diff changeset
946
kono
parents:
diff changeset
947 Oref_File_Num : Sdep_Id;
kono
parents:
diff changeset
948 -- This field is set to No_Sdep_Id if the entity doesn't override any
kono
parents:
diff changeset
949 -- other entity, or to the dependency reference for the overridden
kono
parents:
diff changeset
950 -- entity.
kono
parents:
diff changeset
951
kono
parents:
diff changeset
952 Oref_Line : Nat;
kono
parents:
diff changeset
953 Oref_Col : Nat;
kono
parents:
diff changeset
954 -- These two fields are set to the line and column of the overridden
kono
parents:
diff changeset
955 -- entity.
kono
parents:
diff changeset
956
kono
parents:
diff changeset
957 First_Xref : Nat;
kono
parents:
diff changeset
958 -- Index into Xref table of first cross-reference
kono
parents:
diff changeset
959
kono
parents:
diff changeset
960 Last_Xref : Nat;
kono
parents:
diff changeset
961 -- Index into Xref table of last cross-reference. The value in
kono
parents:
diff changeset
962 -- Last_Xref can be less than the First_Xref value to indicate
kono
parents:
diff changeset
963 -- that no entries are present in the Xref Table.
kono
parents:
diff changeset
964 end record;
kono
parents:
diff changeset
965
kono
parents:
diff changeset
966 package Xref_Entity is new Table.Table (
kono
parents:
diff changeset
967 Table_Component_Type => Xref_Entity_Record,
kono
parents:
diff changeset
968 Table_Index_Type => Nat,
kono
parents:
diff changeset
969 Table_Low_Bound => 1,
kono
parents:
diff changeset
970 Table_Initial => 500,
kono
parents:
diff changeset
971 Table_Increment => 300,
kono
parents:
diff changeset
972 Table_Name => "Xref_Entity");
kono
parents:
diff changeset
973
kono
parents:
diff changeset
974 Array_Index_Reference : constant Character := '*';
kono
parents:
diff changeset
975 Interface_Reference : constant Character := 'I';
kono
parents:
diff changeset
976 -- Some special types of references. In the ALI file itself, these
kono
parents:
diff changeset
977 -- are output as attributes of the entity, not as references, but
kono
parents:
diff changeset
978 -- there is no provision in Xref_Entity_Record for storing multiple
kono
parents:
diff changeset
979 -- such references.
kono
parents:
diff changeset
980
kono
parents:
diff changeset
981 -- The following table records actual cross-references
kono
parents:
diff changeset
982
kono
parents:
diff changeset
983 type Xref_Record is record
kono
parents:
diff changeset
984 File_Num : Sdep_Id;
kono
parents:
diff changeset
985 -- Set to the file dependency number for the cross-reference. Note
kono
parents:
diff changeset
986 -- that if no file entry is present explicitly, this is just a copy
kono
parents:
diff changeset
987 -- of the reference for the current cross-reference section.
kono
parents:
diff changeset
988
kono
parents:
diff changeset
989 Line : Nat;
kono
parents:
diff changeset
990 -- Line number for the reference. This is zero when referencing a
kono
parents:
diff changeset
991 -- predefined entity, but in this case Name is set.
kono
parents:
diff changeset
992
kono
parents:
diff changeset
993 Rtype : Character;
kono
parents:
diff changeset
994 -- Indicates type of reference, using code used in ALI file:
kono
parents:
diff changeset
995 -- r = reference
kono
parents:
diff changeset
996 -- m = modification
kono
parents:
diff changeset
997 -- b = body entity
kono
parents:
diff changeset
998 -- c = completion of private or incomplete type
kono
parents:
diff changeset
999 -- x = type extension
kono
parents:
diff changeset
1000 -- i = implicit reference
kono
parents:
diff changeset
1001 -- Array_Index_Reference = reference to the index of an array
kono
parents:
diff changeset
1002 -- Interface_Reference = reference to an interface implemented
kono
parents:
diff changeset
1003 -- by the type
kono
parents:
diff changeset
1004 -- See description in lib-xref.ads for further details
kono
parents:
diff changeset
1005
kono
parents:
diff changeset
1006 Col : Nat;
kono
parents:
diff changeset
1007 -- Column number for the reference
kono
parents:
diff changeset
1008
kono
parents:
diff changeset
1009 Name : Name_Id := No_Name;
kono
parents:
diff changeset
1010 -- This is only used when referencing a predefined entity. Currently,
kono
parents:
diff changeset
1011 -- this only occurs for array indexes.
kono
parents:
diff changeset
1012
kono
parents:
diff changeset
1013 -- Note: for instantiation references, Rtype is set to ' ', and Col is
kono
parents:
diff changeset
1014 -- set to zero. One or more such entries can follow any other reference.
kono
parents:
diff changeset
1015 -- When there is more than one such entry, this is to be read as:
kono
parents:
diff changeset
1016 -- e.g. ref1 ref2 ref3
kono
parents:
diff changeset
1017 -- ref1 is a reference to an entity that was instantied at ref2.
kono
parents:
diff changeset
1018 -- ref2 itself is also the result of an instantiation, that took
kono
parents:
diff changeset
1019 -- place at ref3
kono
parents:
diff changeset
1020
kono
parents:
diff changeset
1021 Imported_Lang : Name_Id := No_Name;
kono
parents:
diff changeset
1022 Imported_Name : Name_Id := No_Name;
kono
parents:
diff changeset
1023 -- Language and name of imported entity reference
kono
parents:
diff changeset
1024 end record;
kono
parents:
diff changeset
1025
kono
parents:
diff changeset
1026 package Xref is new Table.Table (
kono
parents:
diff changeset
1027 Table_Component_Type => Xref_Record,
kono
parents:
diff changeset
1028 Table_Index_Type => Nat,
kono
parents:
diff changeset
1029 Table_Low_Bound => 1,
kono
parents:
diff changeset
1030 Table_Initial => 2000,
kono
parents:
diff changeset
1031 Table_Increment => 300,
kono
parents:
diff changeset
1032 Table_Name => "Xref");
kono
parents:
diff changeset
1033
kono
parents:
diff changeset
1034 --------------------------------------
kono
parents:
diff changeset
1035 -- Subprograms for Reading ALI File --
kono
parents:
diff changeset
1036 --------------------------------------
kono
parents:
diff changeset
1037
kono
parents:
diff changeset
1038 procedure Initialize_ALI;
kono
parents:
diff changeset
1039 -- Initialize the ALI tables. Also resets all switch values to defaults
kono
parents:
diff changeset
1040
kono
parents:
diff changeset
1041 function Scan_ALI
kono
parents:
diff changeset
1042 (F : File_Name_Type;
kono
parents:
diff changeset
1043 T : Text_Buffer_Ptr;
kono
parents:
diff changeset
1044 Ignore_ED : Boolean;
kono
parents:
diff changeset
1045 Err : Boolean;
kono
parents:
diff changeset
1046 Read_Xref : Boolean := False;
kono
parents:
diff changeset
1047 Read_Lines : String := "";
kono
parents:
diff changeset
1048 Ignore_Lines : String := "X";
kono
parents:
diff changeset
1049 Ignore_Errors : Boolean := False;
kono
parents:
diff changeset
1050 Directly_Scanned : Boolean := False) return ALI_Id;
kono
parents:
diff changeset
1051 -- Given the text, T, of an ALI file, F, scan and store the information
kono
parents:
diff changeset
1052 -- from the file, and return the Id of the resulting entry in the ALI
kono
parents:
diff changeset
1053 -- table. Switch settings may be modified as described above in the
kono
parents:
diff changeset
1054 -- switch description settings.
kono
parents:
diff changeset
1055 --
kono
parents:
diff changeset
1056 -- Ignore_ED is normally False. If set to True, it indicates that
kono
parents:
diff changeset
1057 -- all AD/ED (elaboration desirable) indications in the ALI file are
kono
parents:
diff changeset
1058 -- to be ignored. This parameter is obsolete now that the -f switch
kono
parents:
diff changeset
1059 -- is removed from gnatbind, and should be removed ???
kono
parents:
diff changeset
1060 --
kono
parents:
diff changeset
1061 -- Err determines the action taken on an incorrectly formatted file.
kono
parents:
diff changeset
1062 -- If Err is False, then an error message is output, and the program
kono
parents:
diff changeset
1063 -- is terminated. If Err is True, then no error message is output,
kono
parents:
diff changeset
1064 -- and No_ALI_Id is returned.
kono
parents:
diff changeset
1065 --
kono
parents:
diff changeset
1066 -- Ignore_Lines requests that Scan_ALI ignore any lines that start
kono
parents:
diff changeset
1067 -- with any given key character. The default value of X causes all
kono
parents:
diff changeset
1068 -- Xref lines to be ignored. The corresponding data in the ALI
kono
parents:
diff changeset
1069 -- tables will not be filled in this case. It is not possible
kono
parents:
diff changeset
1070 -- to ignore U (unit) lines, they are always read.
kono
parents:
diff changeset
1071 --
kono
parents:
diff changeset
1072 -- Read_Lines requests that Scan_ALI process only lines that start
kono
parents:
diff changeset
1073 -- with one of the given characters. The corresponding data in the
kono
parents:
diff changeset
1074 -- ALI file for any characters not given in the list will not be
kono
parents:
diff changeset
1075 -- set. The default value of the null string indicates that all
kono
parents:
diff changeset
1076 -- lines should be read (unless Ignore_Lines is specified). U
kono
parents:
diff changeset
1077 -- (unit) lines are always read regardless of the value of this
kono
parents:
diff changeset
1078 -- parameter.
kono
parents:
diff changeset
1079 --
kono
parents:
diff changeset
1080 -- Note: either Ignore_Lines or Read_Lines should be non-null, but not
kono
parents:
diff changeset
1081 -- both. If both are provided then only the Read_Lines value is used,
kono
parents:
diff changeset
1082 -- and the Ignore_Lines parameter is ignored.
kono
parents:
diff changeset
1083 --
kono
parents:
diff changeset
1084 -- Read_XREF is set True to read and acquire the cross-reference
kono
parents:
diff changeset
1085 -- information. If Read_XREF is set to True, then the effect is to ignore
kono
parents:
diff changeset
1086 -- all lines other than U, W, D and X lines and the Ignore_Lines and
kono
parents:
diff changeset
1087 -- Read_Lines parameters are ignored (i.e. the use of True for Read_XREF
kono
parents:
diff changeset
1088 -- is equivalent to specifying an argument of "UWDX" for Read_Lines.
kono
parents:
diff changeset
1089 --
kono
parents:
diff changeset
1090 -- Ignore_Errors is normally False. If it is set True, then Scan_ALI
kono
parents:
diff changeset
1091 -- will do its best to scan through a file and extract all information
kono
parents:
diff changeset
1092 -- it can, even if there are errors. In this case Err is only set if
kono
parents:
diff changeset
1093 -- Scan_ALI was completely unable to process the file (e.g. it did not
kono
parents:
diff changeset
1094 -- look like an ALI file at all). Ignore_Errors is intended to improve
kono
parents:
diff changeset
1095 -- the downward compatibility of new compilers with old tools.
kono
parents:
diff changeset
1096 --
kono
parents:
diff changeset
1097 -- Directly_Scanned is normally False. If it is set to True, then the
kono
parents:
diff changeset
1098 -- units (spec and/or body) corresponding to the ALI file are marked as
kono
parents:
diff changeset
1099 -- such. It is used to decide for what units gnatbind should generate
kono
parents:
diff changeset
1100 -- the symbols corresponding to 'Version or 'Body_Version in
kono
parents:
diff changeset
1101 -- Stand-Alone Libraries.
kono
parents:
diff changeset
1102
kono
parents:
diff changeset
1103 end ALI;