annotate gcc/ada/lib-writ.ads @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
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 -- L I B . W R I T --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
9 -- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
111
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 contains the routines for writing the library information
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 package Lib.Writ is
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 -----------------------------------
kono
parents:
diff changeset
31 -- Format of Library Information --
kono
parents:
diff changeset
32 -----------------------------------
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 -- This section describes the format of the library information that is
kono
parents:
diff changeset
35 -- associated with object files. The exact method of this association is
kono
parents:
diff changeset
36 -- potentially implementation dependent and is described and implemented in
kono
parents:
diff changeset
37 -- package ali. From the point of view of the description here, all we need
kono
parents:
diff changeset
38 -- to know is that the information is represented as a string of characters
kono
parents:
diff changeset
39 -- that is somehow associated with an object file, and can be retrieved. If
kono
parents:
diff changeset
40 -- no library information exists for a given object file, then we take this
kono
parents:
diff changeset
41 -- as equivalent to the non-existence of the object file, as if source file
kono
parents:
diff changeset
42 -- has not been previously compiled.
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 -- The library information is written as a series of lines of the form:
kono
parents:
diff changeset
45
kono
parents:
diff changeset
46 -- Key_Character parameter parameter ...
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 -- The following sections describe the format of these lines in detail
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 --------------------------------------
kono
parents:
diff changeset
51 -- Making Changes to the ALI Format --
kono
parents:
diff changeset
52 --------------------------------------
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 -- A number of tools use ali.adb to parse ali files. This means that
kono
parents:
diff changeset
55 -- changes to this format can cause old versions of these tools to be
kono
parents:
diff changeset
56 -- incompatible with new versions of the compiler. Any changes to ali file
kono
parents:
diff changeset
57 -- formats must be carefully evaluated to understand any such possible
kono
parents:
diff changeset
58 -- conflicts, and in particular, it is very undesirable to create conflicts
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
59 -- between older versions of GNAT Studio and newer versions of the
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
60 -- compiler.
111
kono
parents:
diff changeset
61
kono
parents:
diff changeset
62 -- If the following guidelines are respected, downward compatibility
kono
parents:
diff changeset
63 -- problems (old tools reading new ali files) should be minimized:
kono
parents:
diff changeset
64
kono
parents:
diff changeset
65 -- The basic key character format must be kept
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 -- The V line must be the first line, this is checked by ali.adb even in
kono
parents:
diff changeset
68 -- Ignore_Errors mode, and is used to verify that the file at hand is
kono
parents:
diff changeset
69 -- indeed likely intended to be an ali file.
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 -- The P line must be present, though may be modified in contents
kono
parents:
diff changeset
72 -- according to remaining guidelines. Again, ali.adb assumes the P
kono
parents:
diff changeset
73 -- line is present even in Ignore_Errors mode.
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 -- New modifiers can generally be added (in particular adding new two
kono
parents:
diff changeset
76 -- letter modifiers to the P or U lines is always safe)
kono
parents:
diff changeset
77
kono
parents:
diff changeset
78 -- Adding entirely new lines (with a new key letter) to the ali file is
kono
parents:
diff changeset
79 -- always safe, at any point (other than before the V line), since such
kono
parents:
diff changeset
80 -- lines will be ignored.
kono
parents:
diff changeset
81
kono
parents:
diff changeset
82 -- Following the guidelines in this section should ensure that this problem
kono
parents:
diff changeset
83 -- is minimized and that old tools will be able to deal successfully with
kono
parents:
diff changeset
84 -- new ali formats. Note that this does not apply to the compiler itself,
kono
parents:
diff changeset
85 -- which always requires consistency between the ali files and the binder.
kono
parents:
diff changeset
86 -- That is because one of the main functions of the binder is to ensure
kono
parents:
diff changeset
87 -- consistency of the partition, and this can be compromised if the ali
kono
parents:
diff changeset
88 -- files are inconsistent.
kono
parents:
diff changeset
89
kono
parents:
diff changeset
90 ------------------
kono
parents:
diff changeset
91 -- Header Lines --
kono
parents:
diff changeset
92 ------------------
kono
parents:
diff changeset
93
kono
parents:
diff changeset
94 -- The initial header lines in the file give information about the
kono
parents:
diff changeset
95 -- compilation environment, and identify other special information such as
kono
parents:
diff changeset
96 -- main program parameters.
kono
parents:
diff changeset
97
kono
parents:
diff changeset
98 -- ----------------
kono
parents:
diff changeset
99 -- -- V Version --
kono
parents:
diff changeset
100 -- ----------------
kono
parents:
diff changeset
101
kono
parents:
diff changeset
102 -- V "xxxxxxxxxxxxxxxx"
kono
parents:
diff changeset
103 --
kono
parents:
diff changeset
104 -- This line indicates the library output version, as defined in
kono
parents:
diff changeset
105 -- Gnatvsn. It ensures that separate object modules of a program are
kono
parents:
diff changeset
106 -- consistent. It has to be changed if anything changes which would
kono
parents:
diff changeset
107 -- affect successful binding of separately compiled modules. Examples
kono
parents:
diff changeset
108 -- of such changes are modifications in the format of the library info
kono
parents:
diff changeset
109 -- described in this package, or modifications to calling sequences, or
kono
parents:
diff changeset
110 -- to the way that data is represented.
kono
parents:
diff changeset
111
kono
parents:
diff changeset
112 -- Note: the V line absolutely must be the first line, and no change
kono
parents:
diff changeset
113 -- to the ALI format should change this, since even in Ignore_Errors
kono
parents:
diff changeset
114 -- mode, Scan_ALI insists on finding a V line.
kono
parents:
diff changeset
115
kono
parents:
diff changeset
116 -- ---------------------
kono
parents:
diff changeset
117 -- -- M Main Program --
kono
parents:
diff changeset
118 -- ---------------------
kono
parents:
diff changeset
119
kono
parents:
diff changeset
120 -- M type [priority] [T=time-slice] [C=cpu] W=?
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 -- This line appears only if the main unit for this file is suitable
kono
parents:
diff changeset
123 -- for use as a main program. The parameters are:
kono
parents:
diff changeset
124
kono
parents:
diff changeset
125 -- type
kono
parents:
diff changeset
126
kono
parents:
diff changeset
127 -- P for a parameterless procedure
kono
parents:
diff changeset
128 -- F for a function returning a value of integral type
kono
parents:
diff changeset
129 -- (used for writing a main program returning an exit status)
kono
parents:
diff changeset
130
kono
parents:
diff changeset
131 -- priority
kono
parents:
diff changeset
132
kono
parents:
diff changeset
133 -- Present only if there was a valid pragma Priority in the
kono
parents:
diff changeset
134 -- corresponding unit to set the main task priority. It is an
kono
parents:
diff changeset
135 -- unsigned decimal integer.
kono
parents:
diff changeset
136
kono
parents:
diff changeset
137 -- T=time-slice
kono
parents:
diff changeset
138
kono
parents:
diff changeset
139 -- Present only if there was a valid pragma Time_Slice in the
kono
parents:
diff changeset
140 -- corresponding unit. It is an unsigned decimal integer in the
kono
parents:
diff changeset
141 -- range 0 .. 10**9 giving the time slice value in units of
kono
parents:
diff changeset
142 -- milliseconds. The actual significance of this parameter is
kono
parents:
diff changeset
143 -- target dependent.
kono
parents:
diff changeset
144
kono
parents:
diff changeset
145 -- C=cpu
kono
parents:
diff changeset
146
kono
parents:
diff changeset
147 -- Present only if there was a valid pragma CPU in the
kono
parents:
diff changeset
148 -- corresponding unit to set the main task affinity. It is an
kono
parents:
diff changeset
149 -- unsigned decimal integer.
kono
parents:
diff changeset
150
kono
parents:
diff changeset
151 -- W=?
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 -- This parameter indicates the wide character encoding method used
kono
parents:
diff changeset
154 -- when compiling the main program file. The ? character is the
kono
parents:
diff changeset
155 -- single character used in the -gnatW? switch. This is used to
kono
parents:
diff changeset
156 -- provide the default wide-character encoding for Wide_Text_IO
kono
parents:
diff changeset
157 -- files.
kono
parents:
diff changeset
158
kono
parents:
diff changeset
159 -- -----------------
kono
parents:
diff changeset
160 -- -- A Argument --
kono
parents:
diff changeset
161 -- -----------------
kono
parents:
diff changeset
162
kono
parents:
diff changeset
163 -- A argument
kono
parents:
diff changeset
164
kono
parents:
diff changeset
165 -- One of these lines appears for each of the arguments present in the
kono
parents:
diff changeset
166 -- call to the gnat1 program. This can be used if it is necessary to
kono
parents:
diff changeset
167 -- reconstruct this call (e.g. for fix and continue).
kono
parents:
diff changeset
168
kono
parents:
diff changeset
169 -- -------------------
kono
parents:
diff changeset
170 -- -- P Parameters --
kono
parents:
diff changeset
171 -- -------------------
kono
parents:
diff changeset
172
kono
parents:
diff changeset
173 -- P <<parameters>>
kono
parents:
diff changeset
174
kono
parents:
diff changeset
175 -- Indicates various information that applies to the compilation of the
kono
parents:
diff changeset
176 -- corresponding source file. Parameters is a sequence of zero or more
kono
parents:
diff changeset
177 -- two letter codes that indicate configuration pragmas and other
kono
parents:
diff changeset
178 -- parameters that apply:
kono
parents:
diff changeset
179
kono
parents:
diff changeset
180 -- The arguments are as follows:
kono
parents:
diff changeset
181
kono
parents:
diff changeset
182 -- CE Compilation errors. If this is present it means that the ali
kono
parents:
diff changeset
183 -- file resulted from a compilation with the -gnatQ switch set,
kono
parents:
diff changeset
184 -- and illegalities were detected. The ali file contents may
kono
parents:
diff changeset
185 -- not be completely reliable, but the format will be correct
kono
parents:
diff changeset
186 -- and complete. Note that NO is always present if CE is
kono
parents:
diff changeset
187 -- present.
kono
parents:
diff changeset
188
kono
parents:
diff changeset
189 -- DB Detect_Blocking pragma is in effect for all units in this
kono
parents:
diff changeset
190 -- file.
kono
parents:
diff changeset
191
kono
parents:
diff changeset
192 -- Ex A valid Partition_Elaboration_Policy pragma applies to all
kono
parents:
diff changeset
193 -- the units in this file, where x is the first character
kono
parents:
diff changeset
194 -- (upper case) of the policy name (e.g. 'C' for Concurrent).
kono
parents:
diff changeset
195
kono
parents:
diff changeset
196 -- FX Units in this file use front-end exceptions, with explicit
kono
parents:
diff changeset
197 -- handlers to trigger AT-END actions on exception paths.
kono
parents:
diff changeset
198
kono
parents:
diff changeset
199 -- GP Set if this compilation was done in GNATprove mode, either
kono
parents:
diff changeset
200 -- from direct use of GNATprove, or from use of -gnatdF.
kono
parents:
diff changeset
201
kono
parents:
diff changeset
202 -- Lx A valid Locking_Policy pragma applies to all the units in
kono
parents:
diff changeset
203 -- this file, where x is the first character (upper case) of
kono
parents:
diff changeset
204 -- the policy name (e.g. 'C' for Ceiling_Locking).
kono
parents:
diff changeset
205
kono
parents:
diff changeset
206 -- NO No object. This flag indicates that the units in this file
kono
parents:
diff changeset
207 -- were not compiled to produce an object. This can occur as a
kono
parents:
diff changeset
208 -- result of the use of -gnatc, or if no object can be produced
kono
parents:
diff changeset
209 -- (e.g. when a package spec is compiled instead of the body,
kono
parents:
diff changeset
210 -- or a subunit on its own). Note that in GNATprove mode, we
kono
parents:
diff changeset
211 -- do produce an object. The object is not suitable for binding
kono
parents:
diff changeset
212 -- and linking, but we do not set NO, instead we set GP.
kono
parents:
diff changeset
213
kono
parents:
diff changeset
214 -- NR No_Run_Time. Indicates that a pragma No_Run_Time applies
kono
parents:
diff changeset
215 -- to all units in the file.
kono
parents:
diff changeset
216
kono
parents:
diff changeset
217 -- NS Normalize_Scalars pragma in effect for all units in
kono
parents:
diff changeset
218 -- this file.
kono
parents:
diff changeset
219
kono
parents:
diff changeset
220 -- OH Pragma Default_Scalar_Storage_Order (High_Order_First) is
kono
parents:
diff changeset
221 -- present in a configuration pragma file that applies.
kono
parents:
diff changeset
222
kono
parents:
diff changeset
223 -- OL Pragma Default_Scalar_Storage_Order (Low_Order_First) is
kono
parents:
diff changeset
224 -- present in a configuration pragma file that applies.
kono
parents:
diff changeset
225
kono
parents:
diff changeset
226 -- Qx A valid Queueing_Policy pragma applies to all the units
kono
parents:
diff changeset
227 -- in this file, where x is the first character (upper case)
kono
parents:
diff changeset
228 -- of the policy name (e.g. 'P' for Priority_Queueing).
kono
parents:
diff changeset
229
kono
parents:
diff changeset
230 -- SL Indicates that the unit is an Interface to a Standalone
kono
parents:
diff changeset
231 -- Library. Note that this indication is never given by the
kono
parents:
diff changeset
232 -- compiler, but is added by the Project Manager in gnatmake
kono
parents:
diff changeset
233 -- when an Interface ALI file is copied to the library
kono
parents:
diff changeset
234 -- directory.
kono
parents:
diff changeset
235
kono
parents:
diff changeset
236 -- SS This unit references System.Secondary_Stack (that is,
kono
parents:
diff changeset
237 -- the unit makes use of the secondary stack facilities).
kono
parents:
diff changeset
238
kono
parents:
diff changeset
239 -- Tx A valid Task_Dispatching_Policy pragma applies to all
kono
parents:
diff changeset
240 -- the units in this file, where x is the first character
kono
parents:
diff changeset
241 -- (upper case) of the corresponding policy name (e.g. 'F'
kono
parents:
diff changeset
242 -- for FIFO_Within_Priorities).
kono
parents:
diff changeset
243
kono
parents:
diff changeset
244 -- UA Unreserve_All_Interrupts pragma was processed in one or
kono
parents:
diff changeset
245 -- more units in this file
kono
parents:
diff changeset
246
kono
parents:
diff changeset
247 -- ZX Units in this file use zero-cost exceptions and have
kono
parents:
diff changeset
248 -- generated exception tables. If ZX is not present, the
kono
parents:
diff changeset
249 -- longjmp/setjmp exception scheme is in use.
kono
parents:
diff changeset
250
kono
parents:
diff changeset
251 -- Note that language defined units never output policy (Lx, Tx, Qx)
kono
parents:
diff changeset
252 -- parameters. Language defined units must correctly handle all
kono
parents:
diff changeset
253 -- possible cases. These values are checked for consistency by the
kono
parents:
diff changeset
254 -- binder and then copied to the generated binder output file.
kono
parents:
diff changeset
255
kono
parents:
diff changeset
256 -- Note: The P line must be present. Even in Ignore_Errors mode, Scan_ALI
kono
parents:
diff changeset
257 -- insists on finding a P line. So if changes are made to the ALI format,
kono
parents:
diff changeset
258 -- they should not include removing the P line.
kono
parents:
diff changeset
259
kono
parents:
diff changeset
260 -- ---------------------
kono
parents:
diff changeset
261 -- -- R Restrictions --
kono
parents:
diff changeset
262 -- ---------------------
kono
parents:
diff changeset
263
kono
parents:
diff changeset
264 -- There are two forms for R lines, positional and named. The positional
kono
parents:
diff changeset
265 -- notation is now considered obsolescent, it is not generated by the most
kono
parents:
diff changeset
266 -- recent versions of the compiler except under control of the debug switch
kono
parents:
diff changeset
267 -- -gnatdR, but is still recognized by the binder.
kono
parents:
diff changeset
268
kono
parents:
diff changeset
269 -- The recognition by the binder is to ease the transition, and better deal
kono
parents:
diff changeset
270 -- with some cases of inconsistent builds using incompatible versions of
kono
parents:
diff changeset
271 -- the compiler and binder. The named notation is the current preferred
kono
parents:
diff changeset
272 -- approach.
kono
parents:
diff changeset
273
kono
parents:
diff changeset
274 -- Note that R lines are generated using the information in unit Rident,
kono
parents:
diff changeset
275 -- and intepreted by the binder using the information in System.Rident.
kono
parents:
diff changeset
276 -- Normally these two units should be effectively identical. However in
kono
parents:
diff changeset
277 -- some cases of inconsistent builds, they may be different. This may lead
kono
parents:
diff changeset
278 -- to binder diagnostics, which can be suppressed using the -C switch for
kono
parents:
diff changeset
279 -- the binder, which results in ignoring unrecognized restrictions in the
kono
parents:
diff changeset
280 -- ali files.
kono
parents:
diff changeset
281
kono
parents:
diff changeset
282 -- ---------------------------------------
kono
parents:
diff changeset
283 -- -- R Restrictions (Positional Form) --
kono
parents:
diff changeset
284 -- ---------------------------------------
kono
parents:
diff changeset
285
kono
parents:
diff changeset
286 -- The first R line records the status of restrictions generated by pragma
kono
parents:
diff changeset
287 -- Restrictions encountered, as well as information on what the compiler
kono
parents:
diff changeset
288 -- has been able to determine with respect to restrictions violations.
kono
parents:
diff changeset
289 -- The format is:
kono
parents:
diff changeset
290
kono
parents:
diff changeset
291 -- R <<restriction-characters>> <<restriction-param-id-entries>>
kono
parents:
diff changeset
292
kono
parents:
diff changeset
293 -- The first parameter is a string of characters that records
kono
parents:
diff changeset
294 -- information regarding restrictions that do not take parameter not
kono
parents:
diff changeset
295 -- take parameter values. It is a string of characters, one character
kono
parents:
diff changeset
296 -- for each value (in order) in All_Boolean_Restrictions. There are
kono
parents:
diff changeset
297 -- three possible settings for each restriction:
kono
parents:
diff changeset
298
kono
parents:
diff changeset
299 -- r Restricted. Unit was compiled under control of a pragma
kono
parents:
diff changeset
300 -- Restrictions for the corresponding restriction. In this case
kono
parents:
diff changeset
301 -- the unit certainly does not violate the Restriction, since
kono
parents:
diff changeset
302 -- this would have been detected by the compiler.
kono
parents:
diff changeset
303
kono
parents:
diff changeset
304 -- n Not used. The unit was not compiled under control of a pragma
kono
parents:
diff changeset
305 -- Restrictions for the corresponding restriction, and does not
kono
parents:
diff changeset
306 -- make any use of the referenced feature.
kono
parents:
diff changeset
307
kono
parents:
diff changeset
308 -- v Violated. The unit was not compiled under control of a pragma
kono
parents:
diff changeset
309 -- Restrictions for the corresponding restriction, and it does
kono
parents:
diff changeset
310 -- indeed use the referenced feature.
kono
parents:
diff changeset
311
kono
parents:
diff changeset
312 -- This information is used in the binder to check consistency, i.e. to
kono
parents:
diff changeset
313 -- detect cases where one unit has "r" and another unit has "v", which
kono
parents:
diff changeset
314 -- is not permitted, since these restrictions are partition-wide.
kono
parents:
diff changeset
315
kono
parents:
diff changeset
316 -- The second parameter, which immediately follows the first (with no
kono
parents:
diff changeset
317 -- separating space) gives restriction information for identifiers for
kono
parents:
diff changeset
318 -- which a parameter is given.
kono
parents:
diff changeset
319
kono
parents:
diff changeset
320 -- The parameter is a string of entries, one for each value in
kono
parents:
diff changeset
321 -- Restrict.All_Parameter_Restrictions. Each entry has two components
kono
parents:
diff changeset
322 -- in sequence, the first indicating whether or not there is a
kono
parents:
diff changeset
323 -- restriction, and the second indicating whether or not the compiler
kono
parents:
diff changeset
324 -- detected violations. In the boolean case it is not necessary to
kono
parents:
diff changeset
325 -- separate these, since if a restriction is set, and violated, that is
kono
parents:
diff changeset
326 -- an error. But in the parameter case, this is not true. For example,
kono
parents:
diff changeset
327 -- we can have a unit with a pragma Restrictions (Max_Tasks => 4),
kono
parents:
diff changeset
328 -- where the compiler can detect that there are exactly three tasks
kono
parents:
diff changeset
329 -- declared. Both of these pieces of information must be passed to the
kono
parents:
diff changeset
330 -- binder. The parameter of 4 is important in case the total number of
kono
parents:
diff changeset
331 -- tasks in the partition is greater than 4. The parameter of 3 is
kono
parents:
diff changeset
332 -- important in case some other unit has a restrictions pragma with
kono
parents:
diff changeset
333 -- Max_Tasks=>2.
kono
parents:
diff changeset
334
kono
parents:
diff changeset
335 -- The component for the presence of restriction has one of two
kono
parents:
diff changeset
336 -- possible forms:
kono
parents:
diff changeset
337
kono
parents:
diff changeset
338 -- n No pragma for this restriction is present in the set of units
kono
parents:
diff changeset
339 -- for this ali file.
kono
parents:
diff changeset
340
kono
parents:
diff changeset
341 -- rN At least one pragma for this restriction is present in the
kono
parents:
diff changeset
342 -- set of units for this ali file. The value N is the minimum
kono
parents:
diff changeset
343 -- parameter value encountered in any such pragma. N is in the
kono
parents:
diff changeset
344 -- range of Integer (a value larger than N'Last causes the
kono
parents:
diff changeset
345 -- pragma to be ignored).
kono
parents:
diff changeset
346
kono
parents:
diff changeset
347 -- The component for the violation detection has one of three
kono
parents:
diff changeset
348 -- possible forms:
kono
parents:
diff changeset
349
kono
parents:
diff changeset
350 -- n No violations were detected by the compiler
kono
parents:
diff changeset
351
kono
parents:
diff changeset
352 -- vN A violation was detected. N is either the maximum or total
kono
parents:
diff changeset
353 -- count of violations (depending on the checking type) in all
kono
parents:
diff changeset
354 -- the units represented by the ali file). Note that this
kono
parents:
diff changeset
355 -- setting is only allowed for restrictions that are in
kono
parents:
diff changeset
356 -- Checked_[Max|Sum]_Parameter_Restrictions. The value here is
kono
parents:
diff changeset
357 -- known to be exact by the compiler and is in the range of
kono
parents:
diff changeset
358 -- Natural.
kono
parents:
diff changeset
359
kono
parents:
diff changeset
360 -- vN+ A violation was detected. The compiler cannot determine
kono
parents:
diff changeset
361 -- the exact count of violations, but it is at least N.
kono
parents:
diff changeset
362
kono
parents:
diff changeset
363 -- There are no spaces within the parameter string, so the entry
kono
parents:
diff changeset
364 -- described above in the header of this section for Max_Tasks would
kono
parents:
diff changeset
365 -- appear as the string r4v3.
kono
parents:
diff changeset
366
kono
parents:
diff changeset
367 -- Note: The restrictions line is required to be present. Even in
kono
parents:
diff changeset
368 -- Ignore_Errors mode, Scan_ALI expects to find an R line and will
kono
parents:
diff changeset
369 -- signal a fatal error if it is missing. This means that future
kono
parents:
diff changeset
370 -- changes to the ALI file format must retain the R line.
kono
parents:
diff changeset
371
kono
parents:
diff changeset
372 -- ----------------------------------
kono
parents:
diff changeset
373 -- -- R Restrictions (Named Form) --
kono
parents:
diff changeset
374 -- ----------------------------------
kono
parents:
diff changeset
375
kono
parents:
diff changeset
376 -- The first R line for named form announces that named notation will be
kono
parents:
diff changeset
377 -- used, and also assures that there is at least one R line present, which
kono
parents:
diff changeset
378 -- makes parsing of ali files simpler. A blank line preceds the RN line.
kono
parents:
diff changeset
379
kono
parents:
diff changeset
380 -- RN
kono
parents:
diff changeset
381
kono
parents:
diff changeset
382 -- In named notation, the restrictions are given as a series of lines,
kono
parents:
diff changeset
383 -- one per restrictions that is specified or violated (no information is
kono
parents:
diff changeset
384 -- present for restrictions that are not specified or violated). In the
kono
parents:
diff changeset
385 -- following name is the name of the restriction in all upper case.
kono
parents:
diff changeset
386
kono
parents:
diff changeset
387 -- For boolean restrictions, we have only two possibilities. A restrictions
kono
parents:
diff changeset
388 -- pragma is present, or a violation is detected:
kono
parents:
diff changeset
389
kono
parents:
diff changeset
390 -- RR name
kono
parents:
diff changeset
391
kono
parents:
diff changeset
392 -- A restriction pragma is present for the named boolean restriction.
kono
parents:
diff changeset
393 -- No violations were detected by the compiler (or the unit in question
kono
parents:
diff changeset
394 -- would have been found to be illegal).
kono
parents:
diff changeset
395
kono
parents:
diff changeset
396 -- RV name
kono
parents:
diff changeset
397
kono
parents:
diff changeset
398 -- No restriction pragma is present for the named boolean restriction.
kono
parents:
diff changeset
399 -- However, the compiler did detect one or more violations of this
kono
parents:
diff changeset
400 -- restriction, which may require a binder consistency check. Note that
kono
parents:
diff changeset
401 -- one case of a violation is the use of a Restriction_Set attribute for
kono
parents:
diff changeset
402 -- the restriction that yielded False.
kono
parents:
diff changeset
403
kono
parents:
diff changeset
404 -- For the case of restrictions that take a parameter, we need both the
kono
parents:
diff changeset
405 -- information from pragma if present, and the actual information about
kono
parents:
diff changeset
406 -- what possible violations occur. For example, we can have a unit with
kono
parents:
diff changeset
407 -- a pragma Restrictions (Max_Tasks => 4), where the compiler can detect
kono
parents:
diff changeset
408 -- that there are exactly three tasks declared. Both of these pieces
kono
parents:
diff changeset
409 -- of information must be passed to the binder. The parameter of 4 is
kono
parents:
diff changeset
410 -- important in case the total number of tasks in the partition is greater
kono
parents:
diff changeset
411 -- than 4. The parameter of 3 is important in case some other unit has a
kono
parents:
diff changeset
412 -- restrictions pragma with Max_Tasks=>2.
kono
parents:
diff changeset
413
kono
parents:
diff changeset
414 -- RR name=N
kono
parents:
diff changeset
415
kono
parents:
diff changeset
416 -- A restriction pragma is present for the named restriction which is
kono
parents:
diff changeset
417 -- one of the restrictions taking a parameter. The value N (a decimal
kono
parents:
diff changeset
418 -- integer) is the value given in the restriction pragma.
kono
parents:
diff changeset
419
kono
parents:
diff changeset
420 -- RV name=N
kono
parents:
diff changeset
421
kono
parents:
diff changeset
422 -- A restriction pragma may or may not be present for the restriction
kono
parents:
diff changeset
423 -- given by name (one of the restrictions taking a parameter). But in
kono
parents:
diff changeset
424 -- either case, the compiler detected possible violations. N (a decimal
kono
parents:
diff changeset
425 -- integer) is the maximum or total count of violations (depending
kono
parents:
diff changeset
426 -- on the checking type) in all the units represented by the ali file).
kono
parents:
diff changeset
427 -- The value here is known to be exact by the compiler and is in the
kono
parents:
diff changeset
428 -- range of Natural. Note that if an RR line is present for the same
kono
parents:
diff changeset
429 -- restriction, then the value in the RV line cannot exceed the value
kono
parents:
diff changeset
430 -- in the RR line (since otherwise the compiler would have detected a
kono
parents:
diff changeset
431 -- violation of the restriction).
kono
parents:
diff changeset
432
kono
parents:
diff changeset
433 -- RV name=N+
kono
parents:
diff changeset
434
kono
parents:
diff changeset
435 -- Similar to the above, but the compiler cannot determine the exact
kono
parents:
diff changeset
436 -- count of violations, but it is at least N.
kono
parents:
diff changeset
437
kono
parents:
diff changeset
438 -- -------------------------------------------------
kono
parents:
diff changeset
439 -- -- R Restrictions (No_Dependence Information) --
kono
parents:
diff changeset
440 -- -------------------------------------------------
kono
parents:
diff changeset
441
kono
parents:
diff changeset
442 -- Subsequent R lines are present only if pragma Restriction No_Dependence
kono
parents:
diff changeset
443 -- is used. There is one such line for each such pragma appearing in the
kono
parents:
diff changeset
444 -- extended main unit. The format is:
kono
parents:
diff changeset
445
kono
parents:
diff changeset
446 -- R unit_name
kono
parents:
diff changeset
447
kono
parents:
diff changeset
448 -- Here the unit name is in all lower case. The components of the unit
kono
parents:
diff changeset
449 -- name are separated by periods. The names themselves are in encoded
kono
parents:
diff changeset
450 -- form, as documented in Namet.
kono
parents:
diff changeset
451
kono
parents:
diff changeset
452 -- -------------------------
kono
parents:
diff changeset
453 -- -- I Interrupt States --
kono
parents:
diff changeset
454 -- -------------------------
kono
parents:
diff changeset
455
kono
parents:
diff changeset
456 -- I interrupt-number interrupt-state line-number
kono
parents:
diff changeset
457
kono
parents:
diff changeset
458 -- This line records information from an Interrupt_State pragma. There
kono
parents:
diff changeset
459 -- is one line for each separate pragma, and if no such pragmas are
kono
parents:
diff changeset
460 -- used, then no I lines are present.
kono
parents:
diff changeset
461
kono
parents:
diff changeset
462 -- The interrupt-number is an unsigned positive integer giving the
kono
parents:
diff changeset
463 -- value of the interrupt as defined in Ada.Interrupts.Names.
kono
parents:
diff changeset
464
kono
parents:
diff changeset
465 -- The interrupt-state is one of r/s/u for Runtime/System/User
kono
parents:
diff changeset
466
kono
parents:
diff changeset
467 -- The line number is an unsigned decimal integer giving the line
kono
parents:
diff changeset
468 -- number of the corresponding Interrupt_State pragma. This is used
kono
parents:
diff changeset
469 -- in consistency messages.
kono
parents:
diff changeset
470
kono
parents:
diff changeset
471 -- --------------------------------------
kono
parents:
diff changeset
472 -- -- S Priority Specific Dispatching --
kono
parents:
diff changeset
473 -- --------------------------------------
kono
parents:
diff changeset
474
kono
parents:
diff changeset
475 -- S policy_identifier first_priority last_priority line-number
kono
parents:
diff changeset
476
kono
parents:
diff changeset
477 -- This line records information from a Priority_Specific_Dispatching
kono
parents:
diff changeset
478 -- pragma. There is one line for each separate pragma, and if no such
kono
parents:
diff changeset
479 -- pragmas are used, then no S lines are present.
kono
parents:
diff changeset
480
kono
parents:
diff changeset
481 -- The policy_identifier is the first character (upper case) of the
kono
parents:
diff changeset
482 -- corresponding policy name (e.g. 'F' for FIFO_Within_Priorities).
kono
parents:
diff changeset
483
kono
parents:
diff changeset
484 -- The first_priority and last_priority fields define the range of
kono
parents:
diff changeset
485 -- priorities to which the specified dispatching policy apply.
kono
parents:
diff changeset
486
kono
parents:
diff changeset
487 -- The line number is an unsigned decimal integer giving the line
kono
parents:
diff changeset
488 -- number of the corresponding Priority_Specific_Dispatching pragma.
kono
parents:
diff changeset
489 -- This is used in consistency messages.
kono
parents:
diff changeset
490
kono
parents:
diff changeset
491 ----------------------------
kono
parents:
diff changeset
492 -- Compilation Unit Lines --
kono
parents:
diff changeset
493 ----------------------------
kono
parents:
diff changeset
494
kono
parents:
diff changeset
495 -- Following these header lines, a set of information lines appears for
kono
parents:
diff changeset
496 -- each compilation unit that appears in the corresponding object file. In
kono
parents:
diff changeset
497 -- particular, when a package body or subprogram body is compiled, there
kono
parents:
diff changeset
498 -- will be two sets of information, one for the spec and one for the body,
kono
parents:
diff changeset
499 -- with the entry for the body appearing first. This is the only case in
kono
parents:
diff changeset
500 -- which a single ALI file contains more than one unit (in particular note
kono
parents:
diff changeset
501 -- that subunits do *not* count as compilation units for this purpose, and
kono
parents:
diff changeset
502 -- generate no library information, since they are inlined).
kono
parents:
diff changeset
503
kono
parents:
diff changeset
504 -- --------------------
kono
parents:
diff changeset
505 -- -- U Unit Header --
kono
parents:
diff changeset
506 -- --------------------
kono
parents:
diff changeset
507
kono
parents:
diff changeset
508 -- The lines for each compilation unit have the following form
kono
parents:
diff changeset
509
kono
parents:
diff changeset
510 -- U unit-name source-name version <<attributes>>
kono
parents:
diff changeset
511
kono
parents:
diff changeset
512 -- This line identifies the unit to which this section of the library
kono
parents:
diff changeset
513 -- information file applies. The first three parameters are the unit
kono
parents:
diff changeset
514 -- name in internal format, as described in package Uname, and the name
kono
parents:
diff changeset
515 -- of the source file containing the unit.
kono
parents:
diff changeset
516
kono
parents:
diff changeset
517 -- Version is the version given as eight hexadecimal characters with
kono
parents:
diff changeset
518 -- upper case letters. This value is the exclusive or of the source
kono
parents:
diff changeset
519 -- checksums of the unit and all its semantically dependent units.
kono
parents:
diff changeset
520
kono
parents:
diff changeset
521 -- The <<attributes>> are a series of two letter codes indicating
kono
parents:
diff changeset
522 -- information about the unit:
kono
parents:
diff changeset
523
kono
parents:
diff changeset
524 -- BD Unit does not have pragma Elaborate_Body, but the elaboration
kono
parents:
diff changeset
525 -- circuit has determined that it would be a good idea if this
kono
parents:
diff changeset
526 -- pragma were present, since the body of the package contains
kono
parents:
diff changeset
527 -- elaboration code that modifies one or more variables in the
kono
parents:
diff changeset
528 -- visible part of the package. The binder will try, but does
kono
parents:
diff changeset
529 -- not promise, to keep the elaboration of the body close to
kono
parents:
diff changeset
530 -- the elaboration of the spec.
kono
parents:
diff changeset
531
kono
parents:
diff changeset
532 -- DE Dynamic Elaboration. This unit was compiled with the dynamic
kono
parents:
diff changeset
533 -- elaboration model, as set by either the -gnatE switch or
kono
parents:
diff changeset
534 -- pragma Elaboration_Checks (Dynamic).
kono
parents:
diff changeset
535 --
kono
parents:
diff changeset
536 -- EB Unit has pragma Elaborate_Body, or is a generic instance that
kono
parents:
diff changeset
537 -- has a body. Set for instances because RM 12.3(20) requires
kono
parents:
diff changeset
538 -- that the body be immediately elaborated after the spec (we
kono
parents:
diff changeset
539 -- would normally do that anyway, because elaborate spec and
kono
parents:
diff changeset
540 -- body together whenever possible, and for an instance it is
kono
parents:
diff changeset
541 -- always possible; however setting EB ensures that this is done
kono
parents:
diff changeset
542 -- even when using the -p gnatbind switch).
kono
parents:
diff changeset
543
kono
parents:
diff changeset
544 -- EE Elaboration entity is present which must be set true when
kono
parents:
diff changeset
545 -- the unit is elaborated. The name of the elaboration entity is
kono
parents:
diff changeset
546 -- formed from the unit name in the usual way. If EE is present,
kono
parents:
diff changeset
547 -- then this boolean must be set True as part of the elaboration
kono
parents:
diff changeset
548 -- processing routine generated by the binder. Note that EE can
kono
parents:
diff changeset
549 -- be set even if NE is set. This happens when the boolean is
kono
parents:
diff changeset
550 -- needed solely for checking for the case of access before
kono
parents:
diff changeset
551 -- elaboration.
kono
parents:
diff changeset
552
kono
parents:
diff changeset
553 -- GE Unit is a generic declaration, or corresponding body
kono
parents:
diff changeset
554 --
kono
parents:
diff changeset
555 -- IL Unit source uses a style with identifiers in all lower-case
kono
parents:
diff changeset
556 -- IU (IL) or all upper case (IU). If the standard mixed-case usage
kono
parents:
diff changeset
557 -- is detected, or the compiler cannot determine the style, then
kono
parents:
diff changeset
558 -- no I parameter will appear.
kono
parents:
diff changeset
559
kono
parents:
diff changeset
560 -- IS Initialize_Scalars pragma applies to this unit, or else there
kono
parents:
diff changeset
561 -- is at least one use of the Invalid_Value attribute.
kono
parents:
diff changeset
562
kono
parents:
diff changeset
563 -- KM Unit source uses a style with keywords in mixed case (KM)
kono
parents:
diff changeset
564 -- KU or all upper case (KU). If the standard lower-case usage is
kono
parents:
diff changeset
565 -- is detected, or the compiler cannot determine the style, then
kono
parents:
diff changeset
566 -- no K parameter will appear.
kono
parents:
diff changeset
567
kono
parents:
diff changeset
568 -- NE Unit has no elaboration routine. All subprogram bodies and
kono
parents:
diff changeset
569 -- specs are in this category. Package bodies and specs may or
kono
parents:
diff changeset
570 -- may not have NE set, depending on whether or not elaboration
kono
parents:
diff changeset
571 -- code is required. Set if N_Compilation_Unit node has flag
kono
parents:
diff changeset
572 -- Has_No_Elaboration_Code set.
kono
parents:
diff changeset
573
kono
parents:
diff changeset
574 -- OL The units in this file are compiled with a local pragma
kono
parents:
diff changeset
575 -- Optimize_Alignment, so no consistency requirement applies
kono
parents:
diff changeset
576 -- to these units. All internal units have this status since
kono
parents:
diff changeset
577 -- they have an automatic default of Optimize_Alignment (Off).
kono
parents:
diff changeset
578 --
kono
parents:
diff changeset
579 -- OO Optimize_Alignment (Off) is the default setting for all
kono
parents:
diff changeset
580 -- units in this file. All files in the partition that specify
kono
parents:
diff changeset
581 -- a default must specify the same default.
kono
parents:
diff changeset
582
kono
parents:
diff changeset
583 -- OS Optimize_Alignment (Space) is the default setting for all
kono
parents:
diff changeset
584 -- units in this file. All files in the partition that specify
kono
parents:
diff changeset
585 -- a default must specify the same default.
kono
parents:
diff changeset
586
kono
parents:
diff changeset
587 -- OT Optimize_Alignment (Time) is the default setting for all
kono
parents:
diff changeset
588 -- units in this file. All files in the partition that specify
kono
parents:
diff changeset
589 -- a default must specify the same default.
kono
parents:
diff changeset
590
kono
parents:
diff changeset
591 -- PF The unit has a library-level (package) finalizer
kono
parents:
diff changeset
592
kono
parents:
diff changeset
593 -- PK Unit is package, rather than a subprogram
kono
parents:
diff changeset
594
kono
parents:
diff changeset
595 -- PU Unit has pragma Pure
kono
parents:
diff changeset
596
kono
parents:
diff changeset
597 -- PR Unit has pragma Preelaborate
kono
parents:
diff changeset
598
kono
parents:
diff changeset
599 -- RA Unit declares a Remote Access to Class-Wide (RACW) type
kono
parents:
diff changeset
600
kono
parents:
diff changeset
601 -- RC Unit has pragma Remote_Call_Interface
kono
parents:
diff changeset
602
kono
parents:
diff changeset
603 -- RT Unit has pragma Remote_Types
kono
parents:
diff changeset
604
kono
parents:
diff changeset
605 -- SE Compilation of unit encountered one or more serious errors.
kono
parents:
diff changeset
606 -- Normally the generation of an ALI file is suppressed if there
kono
parents:
diff changeset
607 -- is a serious error, but this can be overridden with -gnatQ.
kono
parents:
diff changeset
608
kono
parents:
diff changeset
609 -- SP Unit has pragma Shared_Passive
kono
parents:
diff changeset
610
kono
parents:
diff changeset
611 -- SU Unit is a subprogram, rather than a package
kono
parents:
diff changeset
612
kono
parents:
diff changeset
613 -- The attributes may appear in any order, separated by spaces
kono
parents:
diff changeset
614
kono
parents:
diff changeset
615 -- -----------------------------
kono
parents:
diff changeset
616 -- -- W, Y and Z Withed Units --
kono
parents:
diff changeset
617 -- -----------------------------
kono
parents:
diff changeset
618
kono
parents:
diff changeset
619 -- Following each U line, is a series of lines of the form
kono
parents:
diff changeset
620
kono
parents:
diff changeset
621 -- W unit-name [source-name lib-name] [E] [EA] [ED] [AD]
kono
parents:
diff changeset
622 -- or
kono
parents:
diff changeset
623 -- Y unit-name [source-name lib-name] [E] [EA] [ED] [AD]
kono
parents:
diff changeset
624 -- or
kono
parents:
diff changeset
625 -- Z unit-name [source-name lib-name] [E] [EA] [ED] [AD]
kono
parents:
diff changeset
626
kono
parents:
diff changeset
627 -- One W line is present for each unit that is mentioned in an explicit
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
628 -- nonlimited with clause by the current unit. One Y line is present
111
kono
parents:
diff changeset
629 -- for each unit that is mentioned in an explicit limited with clause
kono
parents:
diff changeset
630 -- by the current unit. One Z line is present for each unit that is
kono
parents:
diff changeset
631 -- only implicitly withed by the current unit. The first parameter is
kono
parents:
diff changeset
632 -- the unit name in internal format. The second parameter is the file
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
633 -- name of the file that must be compiled to compile this unit. It is
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
634 -- usually the file for the body, except for packages which have no
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
635 -- body. For units that need a body, if the source file for the body
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
636 -- cannot be found, the file name of the spec is used instead. The
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
637 -- third parameter is the file name of the library information file
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
638 -- that contains the results of compiling this unit. The optional
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
639 -- modifiers are used as follows:
111
kono
parents:
diff changeset
640
kono
parents:
diff changeset
641 -- E pragma Elaborate applies to this unit
kono
parents:
diff changeset
642
kono
parents:
diff changeset
643 -- EA pragma Elaborate_All applies to this unit
kono
parents:
diff changeset
644
kono
parents:
diff changeset
645 -- ED Elaborate_Desirable set for this unit, which means that there
kono
parents:
diff changeset
646 -- is no Elaborate, but the analysis suggests that Program_Error
kono
parents:
diff changeset
647 -- may be raised if the Elaborate conditions cannot be satisfied.
kono
parents:
diff changeset
648 -- The binder will attempt to treat ED as E if it can.
kono
parents:
diff changeset
649
kono
parents:
diff changeset
650 -- AD Elaborate_All_Desirable set for this unit, which means that
kono
parents:
diff changeset
651 -- there is no Elaborate_All, but the analysis suggests that
kono
parents:
diff changeset
652 -- Program_Error may be raised if the Elaborate_All conditions
kono
parents:
diff changeset
653 -- cannot be satisfied. The binder will attempt to treat AD as
kono
parents:
diff changeset
654 -- EA if it can.
kono
parents:
diff changeset
655
kono
parents:
diff changeset
656 -- The parameter source-name and lib-name are omitted for the case of a
kono
parents:
diff changeset
657 -- generic unit compiled with earlier versions of GNAT which did not
kono
parents:
diff changeset
658 -- generate object or ali files for generics. For compatibility in the
kono
parents:
diff changeset
659 -- bootstrap path we continue to omit these entries for predefined
kono
parents:
diff changeset
660 -- generic units, even though we do now generate object and ali files.
kono
parents:
diff changeset
661
kono
parents:
diff changeset
662 -- However, in SPARK mode, we always generate source-name and lib-name
kono
parents:
diff changeset
663 -- parameters. Bootstrap issues do not apply there, and we need this
kono
parents:
diff changeset
664 -- information to properly compute frame conditions of subprograms.
kono
parents:
diff changeset
665
kono
parents:
diff changeset
666 -- The parameter source-name and lib-name are also omitted for the W
kono
parents:
diff changeset
667 -- lines that result from use of a Restriction_Set attribute which gets
kono
parents:
diff changeset
668 -- a result of False from a No_Dependence check, in the case where the
kono
parents:
diff changeset
669 -- unit is not in the semantic closure. In such a case, the bare W
kono
parents:
diff changeset
670 -- line is generated, but no D (dependency) line. This will make the
kono
parents:
diff changeset
671 -- binder do the consistency check, but not include the unit in the
kono
parents:
diff changeset
672 -- partition closure (unless it is properly With'ed somewhere).
kono
parents:
diff changeset
673
kono
parents:
diff changeset
674 -- --------------------
kono
parents:
diff changeset
675 -- -- T Task Stacks --
kono
parents:
diff changeset
676 -- --------------------
kono
parents:
diff changeset
677
kono
parents:
diff changeset
678 -- Following the W lines (if any, or the U line if not), is an optional
kono
parents:
diff changeset
679 -- line that identifies the number of default-sized primary and secondary
kono
parents:
diff changeset
680 -- stacks that the binder needs to create for the tasks declared within the
kono
parents:
diff changeset
681 -- unit. For each compilation unit, a line is present in the form:
kono
parents:
diff changeset
682
kono
parents:
diff changeset
683 -- T primary-stack-quantity secondary-stack-quantity
kono
parents:
diff changeset
684
kono
parents:
diff changeset
685 -- The first parameter of T defines the number of task objects declared
kono
parents:
diff changeset
686 -- in the unit that have no Storage_Size specified. The second parameter
kono
parents:
diff changeset
687 -- defines the number of task objects declared in the unit that have no
kono
parents:
diff changeset
688 -- Secondary_Stack_Size specified. These values are non-zero only if
kono
parents:
diff changeset
689 -- the restrictions No_Implicit_Heap_Allocations or
kono
parents:
diff changeset
690 -- No_Implicit_Task_Allocations are active.
kono
parents:
diff changeset
691
kono
parents:
diff changeset
692 -- -----------------------
kono
parents:
diff changeset
693 -- -- L Linker_Options --
kono
parents:
diff changeset
694 -- -----------------------
kono
parents:
diff changeset
695
kono
parents:
diff changeset
696 -- Following the T and W lines (if any, or the U line if not), are
kono
parents:
diff changeset
697 -- an optional series of lines that indicates the usage of the pragma
kono
parents:
diff changeset
698 -- Linker_Options in the associated unit. For each appearance of a pragma
kono
parents:
diff changeset
699 -- Linker_Options (or Link_With) in the unit, a line is present with the
kono
parents:
diff changeset
700 -- form:
kono
parents:
diff changeset
701
kono
parents:
diff changeset
702 -- L "string"
kono
parents:
diff changeset
703
kono
parents:
diff changeset
704 -- where string is the string from the unit line enclosed in quotes.
kono
parents:
diff changeset
705 -- Within the quotes the following can occur:
kono
parents:
diff changeset
706
kono
parents:
diff changeset
707 -- c graphic characters in range 20-7E other than " or {
kono
parents:
diff changeset
708 -- "" indicating a single " character
kono
parents:
diff changeset
709 -- {hh} indicating a character whose code is hex hh (0-9,A-F)
kono
parents:
diff changeset
710 -- {00} [ASCII.NUL] is used as a separator character
kono
parents:
diff changeset
711 -- to separate multiple arguments of a single
kono
parents:
diff changeset
712 -- Linker_Options pragma.
kono
parents:
diff changeset
713
kono
parents:
diff changeset
714 -- For further details, see Stringt.Write_String_Table_Entry. Note that
kono
parents:
diff changeset
715 -- wide characters in the form {hhhh} cannot be produced, since pragma
kono
parents:
diff changeset
716 -- Linker_Option accepts only String, not Wide_String.
kono
parents:
diff changeset
717
kono
parents:
diff changeset
718 -- The L lines are required to appear in the same order as the
kono
parents:
diff changeset
719 -- corresponding Linker_Options (or Link_With) pragmas appear in the
kono
parents:
diff changeset
720 -- source file, so that this order is preserved by the binder in
kono
parents:
diff changeset
721 -- constructing the set of linker arguments.
kono
parents:
diff changeset
722
kono
parents:
diff changeset
723 -- Note: Linker_Options lines never appear in the ALI file generated for
kono
parents:
diff changeset
724 -- a predefined generic unit, and there is cicuitry in Sem_Prag to enforce
kono
parents:
diff changeset
725 -- this restriction, which is needed because of not generating source name
kono
parents:
diff changeset
726 -- and lib name parameters on the with lines for such files, as explained
kono
parents:
diff changeset
727 -- above in the section on with lines.
kono
parents:
diff changeset
728
kono
parents:
diff changeset
729 -- --------------
kono
parents:
diff changeset
730 -- -- N Notes --
kono
parents:
diff changeset
731 -- --------------
kono
parents:
diff changeset
732
kono
parents:
diff changeset
733 -- The final section of unit-specific lines contains notes which record
kono
parents:
diff changeset
734 -- annotations inserted in source code for processing by external tools
kono
parents:
diff changeset
735 -- using pragmas. For each occurrence of any of these pragmas, a line is
kono
parents:
diff changeset
736 -- generated with the following syntax:
kono
parents:
diff changeset
737
kono
parents:
diff changeset
738 -- N x<sloc> [<arg_id>:]<arg> ...
kono
parents:
diff changeset
739
kono
parents:
diff changeset
740 -- x is one of:
kono
parents:
diff changeset
741 -- A pragma Annotate
kono
parents:
diff changeset
742 -- C pragma Comment
kono
parents:
diff changeset
743 -- I pragma Ident
kono
parents:
diff changeset
744 -- T pragma Title
kono
parents:
diff changeset
745 -- S pragma Subtitle
kono
parents:
diff changeset
746
kono
parents:
diff changeset
747 -- <sloc> is the source location of the pragma in line:col[:filename]
kono
parents:
diff changeset
748 -- format. The file name is omitted if it is the same as the current
kono
parents:
diff changeset
749 -- unit (it therefore appears explicitly in the case of pragmas
kono
parents:
diff changeset
750 -- occurring in subunits, which do not have U sections of their own).
kono
parents:
diff changeset
751
kono
parents:
diff changeset
752 -- Successive entries record the pragma_argument_associations.
kono
parents:
diff changeset
753
kono
parents:
diff changeset
754 -- If a pragma argument identifier is present, the entry is prefixed
kono
parents:
diff changeset
755 -- with the pragma argument identifier <arg_id> followed by a colon.
kono
parents:
diff changeset
756
kono
parents:
diff changeset
757 -- <arg> represents the pragma argument, and has the following
kono
parents:
diff changeset
758 -- conventions:
kono
parents:
diff changeset
759
kono
parents:
diff changeset
760 -- - identifiers are output verbatim
kono
parents:
diff changeset
761 -- - static string expressions are output as literals encoded as
kono
parents:
diff changeset
762 -- for L lines
kono
parents:
diff changeset
763 -- - static integer expressions are output as decimal literals
kono
parents:
diff changeset
764 -- - any other expression is replaced by the placeholder "<expr>"
kono
parents:
diff changeset
765
kono
parents:
diff changeset
766 ---------------------
kono
parents:
diff changeset
767 -- Reference Lines --
kono
parents:
diff changeset
768 ---------------------
kono
parents:
diff changeset
769
kono
parents:
diff changeset
770 -- The reference lines contain information about references from any of the
kono
parents:
diff changeset
771 -- units in the compilation (including body version and version attributes,
kono
parents:
diff changeset
772 -- linker options pragmas and source dependencies).
kono
parents:
diff changeset
773
kono
parents:
diff changeset
774 -- ------------------------------------
kono
parents:
diff changeset
775 -- -- E External Version References --
kono
parents:
diff changeset
776 -- ------------------------------------
kono
parents:
diff changeset
777
kono
parents:
diff changeset
778 -- One of these lines is present for each use of 'Body_Version or 'Version
kono
parents:
diff changeset
779 -- in any of the units of the compilation. These are used by the linker to
kono
parents:
diff changeset
780 -- determine which version symbols must be output. The format is simply:
kono
parents:
diff changeset
781
kono
parents:
diff changeset
782 -- E name
kono
parents:
diff changeset
783
kono
parents:
diff changeset
784 -- where name is the external name, i.e. the unit name with either a S or a
kono
parents:
diff changeset
785 -- B for spec or body version referenced (Body_Version always references
kono
parents:
diff changeset
786 -- the body, Version references the Spec, except in the case of a reference
kono
parents:
diff changeset
787 -- to a subprogram with no separate spec). Upper half and wide character
kono
parents:
diff changeset
788 -- codes are encoded using the same method as in Namet (Uhh for upper half,
kono
parents:
diff changeset
789 -- Whhhh for wide character, where hh are hex digits).
kono
parents:
diff changeset
790
kono
parents:
diff changeset
791 -- ---------------------
kono
parents:
diff changeset
792 -- -- D Dependencies --
kono
parents:
diff changeset
793 -- ---------------------
kono
parents:
diff changeset
794
kono
parents:
diff changeset
795 -- The dependency lines indicate the source files on which the compiled
kono
parents:
diff changeset
796 -- units depend. This is used by the binder for consistency checking.
kono
parents:
diff changeset
797 -- These lines are also referenced by the cross-reference information.
kono
parents:
diff changeset
798
kono
parents:
diff changeset
799 -- D source-name time-stamp checksum (sub)unit-name line:file-name
kono
parents:
diff changeset
800
kono
parents:
diff changeset
801 -- source-name also includes preprocessing data file and preprocessing
kono
parents:
diff changeset
802 -- definition file. These preprocessing files may be given as full
kono
parents:
diff changeset
803 -- path names instead of simple file names. If a full path name
kono
parents:
diff changeset
804 -- includes a directory with spaces, the path name is quoted (quote
kono
parents:
diff changeset
805 -- characters (") added at start and end, and any internal quotes are
kono
parents:
diff changeset
806 -- doubled).
kono
parents:
diff changeset
807
kono
parents:
diff changeset
808 -- The time-stamp field contains the time stamp of the corresponding
kono
parents:
diff changeset
809 -- source file. See types.ads for details on time stamp representation.
kono
parents:
diff changeset
810
kono
parents:
diff changeset
811 -- The checksum is an 8-hex digit representation of the source file
kono
parents:
diff changeset
812 -- checksum, with letters given in lower case.
kono
parents:
diff changeset
813
kono
parents:
diff changeset
814 -- If the unit is not a subunit, the (sub)unit name is the unit name in
kono
parents:
diff changeset
815 -- internal format, as described in package Uname. If the unit is a
kono
parents:
diff changeset
816 -- subunit, the (sub)unit name is the fully qualified name of the
kono
parents:
diff changeset
817 -- subunit in all lower case letters.
kono
parents:
diff changeset
818
kono
parents:
diff changeset
819 -- The line:file-name entry is present only if a Source_Reference
kono
parents:
diff changeset
820 -- pragma appeared in the source file identified by source-name. In
kono
parents:
diff changeset
821 -- this case, it gives the information from this pragma. Note that this
kono
parents:
diff changeset
822 -- allows cross-reference information to be related back to the
kono
parents:
diff changeset
823 -- original file. Note: the reason the line number comes first is that
kono
parents:
diff changeset
824 -- a leading digit immediately identifies this as a Source_Reference
kono
parents:
diff changeset
825 -- entry, rather than a subunit-name.
kono
parents:
diff changeset
826
kono
parents:
diff changeset
827 -- A line number of zero for line: in this entry indicates that there
kono
parents:
diff changeset
828 -- is more than one source reference pragma. In this case, the line
kono
parents:
diff changeset
829 -- numbers in the cross-reference are correct, and refer to the
kono
parents:
diff changeset
830 -- original line number, but there is no information that allows a
kono
parents:
diff changeset
831 -- reader of the ALI file to determine the exact mapping of physical
kono
parents:
diff changeset
832 -- line numbers back to the original source.
kono
parents:
diff changeset
833
kono
parents:
diff changeset
834 -- Files with a zero checksum and a non-zero time stamp are in general
kono
parents:
diff changeset
835 -- files on which the compilation depends but which are not Ada files
kono
parents:
diff changeset
836 -- with further dependencies. This includes preprocessor data files
kono
parents:
diff changeset
837 -- and preprocessor definition files.
kono
parents:
diff changeset
838
kono
parents:
diff changeset
839 -- Note: blank lines are ignored when the library information is read,
kono
parents:
diff changeset
840 -- and separate sections of the file are separated by blank lines to
kono
parents:
diff changeset
841 -- ease readability. Blanks between fields are also ignored.
kono
parents:
diff changeset
842
kono
parents:
diff changeset
843 -- For entries corresponding to files that were not present (and thus
kono
parents:
diff changeset
844 -- resulted in error messages), or for files that are not part of the
kono
parents:
diff changeset
845 -- dependency set, both the time stamp and checksum are set to all zero
kono
parents:
diff changeset
846 -- characters. These dummy entries are ignored by the binder in
kono
parents:
diff changeset
847 -- dependency checking, but must be present for proper interpretation
kono
parents:
diff changeset
848 -- of the cross-reference data.
kono
parents:
diff changeset
849
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
850 -- -------------------------
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
851 -- -- G Invocation Graph --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
852 -- -------------------------
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
853
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
854 -- An invocation graph line has the following format:
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
855 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
856 -- G line-kind line-attributes
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
857 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
858 -- Attribute line-kind is a Character which denotes the nature of the
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
859 -- line. Table ALI.Invocation_Graph_Line_Codes lists all legal values.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
860 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
861 -- Attribute line-attributes depends on the value of line-kind, and is
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
862 -- contents are described further below.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
863 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
864 -- An invocation signature uniquely identifies an invocation construct in
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
865 -- the ALI file namespace, and has the following format:
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
866 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
867 -- [ name scope line column (locations | "none") ]
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
868 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
869 -- Attribute name is a String which denotes the name of the construct
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
870 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
871 -- Attribute scope is a String which denotes the qualified name of the
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
872 -- scope where the construct is declared.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
873 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
874 -- Attribute line is a Positive which denotes the line number where the
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
875 -- initial declaration of the construct appears.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
876 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
877 -- Attribute column is a Positive which denotes the column number where
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
878 -- the initial declaration of the construct appears.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
879 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
880 -- Attribute locations is a String which denotes the line and column
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
881 -- locations of all instances where the initial declaration of the
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
882 -- construct appears.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
883 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
884 -- When the line-kind denotes invocation graph attributes, line-attributes
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
885 -- are set as follows:
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
886 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
887 -- encoding-kind
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
888 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
889 -- Attribute encoding-kind is a Character which specifies the encoding
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
890 -- kind used when collecting invocation constructs and relations. Table
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
891 -- ALI.Invocation_Graph_Encoding_Codes lists all legal values.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
892 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
893 -- When the line-kind denotes an invocation construct, line-attributes are
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
894 -- set as follows:
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
895 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
896 -- construct-kind construct-spec-placement construct-body-placement
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
897 -- construct-signature
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
898 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
899 -- Attribute construct-kind is a Character which denotes the nature of
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
900 -- the construct. Table ALI.Invocation_Construct_Codes lists all legal
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
901 -- values.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
902 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
903 -- Attribute construct-spec-placement is a Character which denotes the
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
904 -- placement of the construct's spec within the unit. All legal values
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
905 -- are listed in table ALI.Spec_And_Body_Placement_Codes.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
906 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
907 -- Attribute construct-body-placement is a Character which denotes the
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
908 -- placement of the construct's body within the unit. All legal values
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
909 -- are listed in table ALI.Spec_And_Body_Placement_Codes.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
910 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
911 -- Attribute construct-signature is the invocation signature of the
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
912 -- construct.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
913 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
914 -- When the line-kind denotes an invocation relation, line-attributes are
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
915 -- set as follows:
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
916 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
917 -- relation-kind (extra-name | "none") invoker-signature
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
918 -- target-signature
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
919 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
920 -- Attribute relation-kind is a Character which denotes the nature of
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
921 -- the relation. All legal values are listed in ALI.Invocation_Codes.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
922 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
923 -- Attribute extra-name is a String which denotes the name of an extra
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
924 -- entity used for error diagnostics. The value of extra-name depends
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
925 -- on the relation-kind as follows:
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
926 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
927 -- Accept_Alternative - related entry
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
928 -- Access_Taken - related subprogram
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
929 -- Call - not present
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
930 -- Controlled_Adjustment - related controlled type
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
931 -- Controlled_Finalization - related controlled type
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
932 -- Controlled_Initialization - related controlled type
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
933 -- Default_Initial_Condition_Verification - related private type
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
934 -- Initial_Condition_Verification - not present
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
935 -- Instantiation - not present
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
936 -- Internal_Controlled_Adjustment - related controlled type
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
937 -- Internal_Controlled_Finalization - related controlled type
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
938 -- Internal_Controlled_Initialization - related controlled type
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
939 -- Invariant_Verification - related private type
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
940 -- Postcondition_Verification - related routine
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
941 -- Protected_Entry_Call - not present
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
942 -- Protected_Subprogram_Call - not present
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
943 -- Task_Activation - not present
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
944 -- Task_Entry_Call - not present
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
945 -- Type_Initialization - related type
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
946 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
947 -- Attribute invoker-signature is the invocation signature of the
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
948 -- invoker.
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
949 --
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
950 -- Attribute target-signature is the invocation signature of the target
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
951
111
kono
parents:
diff changeset
952 --------------------------
kono
parents:
diff changeset
953 -- Cross-Reference Data --
kono
parents:
diff changeset
954 --------------------------
kono
parents:
diff changeset
955
kono
parents:
diff changeset
956 -- The cross-reference data follows the dependency lines. See the spec of
kono
parents:
diff changeset
957 -- Lib.Xref in file lib-xref.ads for details on the format of this data.
kono
parents:
diff changeset
958
kono
parents:
diff changeset
959 ---------------------------------
kono
parents:
diff changeset
960 -- Source Coverage Obligations --
kono
parents:
diff changeset
961 ---------------------------------
kono
parents:
diff changeset
962
kono
parents:
diff changeset
963 -- The Source Coverage Obligation (SCO) information follows the cross-
kono
parents:
diff changeset
964 -- reference data. See the spec of Par_SCO in file par_sco.ads for full
kono
parents:
diff changeset
965 -- details of the format.
kono
parents:
diff changeset
966
kono
parents:
diff changeset
967 ---------------------------------------
kono
parents:
diff changeset
968 -- SPARK Cross-Reference Information --
kono
parents:
diff changeset
969 ---------------------------------------
kono
parents:
diff changeset
970
kono
parents:
diff changeset
971 -- The SPARK cross-reference information follows the SCO information. See
kono
parents:
diff changeset
972 -- the spec of SPARK_Xrefs in file spark_xrefs.ads for full details of the
kono
parents:
diff changeset
973 -- format.
kono
parents:
diff changeset
974
kono
parents:
diff changeset
975 -------------------------------
kono
parents:
diff changeset
976 -- ALI File Generation for C --
kono
parents:
diff changeset
977 -------------------------------
kono
parents:
diff changeset
978
kono
parents:
diff changeset
979 -- The C compiler can also generate ALI files for use by the IDE's in
kono
parents:
diff changeset
980 -- providing navigation services in C. These ALI files are a subset of
kono
parents:
diff changeset
981 -- the specification above, lacking all Ada-specific output. Primarily
kono
parents:
diff changeset
982 -- the IDE uses the cross-reference sections of such files.
kono
parents:
diff changeset
983
kono
parents:
diff changeset
984 ----------------------
kono
parents:
diff changeset
985 -- Global Variables --
kono
parents:
diff changeset
986 ----------------------
kono
parents:
diff changeset
987
kono
parents:
diff changeset
988 -- The table defined here stores one entry for each Interrupt_State pragma
kono
parents:
diff changeset
989 -- encountered either in the main source or in an ancillary with'ed source.
kono
parents:
diff changeset
990 -- Since interrupt state values have to be consistent across all units in a
kono
parents:
diff changeset
991 -- partition, we detect inconsistencies at compile time when we can.
kono
parents:
diff changeset
992
kono
parents:
diff changeset
993 type Interrupt_State_Entry is record
kono
parents:
diff changeset
994 Interrupt_Number : Pos;
kono
parents:
diff changeset
995 -- Interrupt number value
kono
parents:
diff changeset
996
kono
parents:
diff changeset
997 Interrupt_State : Character;
kono
parents:
diff changeset
998 -- Set to r/s/u for Runtime/System/User
kono
parents:
diff changeset
999
kono
parents:
diff changeset
1000 Pragma_Loc : Source_Ptr;
kono
parents:
diff changeset
1001 -- Location of pragma setting this value in place
kono
parents:
diff changeset
1002 end record;
kono
parents:
diff changeset
1003
kono
parents:
diff changeset
1004 package Interrupt_States is new Table.Table (
kono
parents:
diff changeset
1005 Table_Component_Type => Interrupt_State_Entry,
kono
parents:
diff changeset
1006 Table_Index_Type => Nat,
kono
parents:
diff changeset
1007 Table_Low_Bound => 1,
kono
parents:
diff changeset
1008 Table_Initial => 30,
kono
parents:
diff changeset
1009 Table_Increment => 200,
kono
parents:
diff changeset
1010 Table_Name => "Name_Interrupt_States");
kono
parents:
diff changeset
1011
kono
parents:
diff changeset
1012 -- The table structure defined here stores one entry for each
kono
parents:
diff changeset
1013 -- Priority_Specific_Dispatching pragma encountered either in the main
kono
parents:
diff changeset
1014 -- source or in an ancillary with'ed source. Since have to be consistent
kono
parents:
diff changeset
1015 -- across all units in a partition, we may as well detect inconsistencies
kono
parents:
diff changeset
1016 -- at compile time when we can.
kono
parents:
diff changeset
1017
kono
parents:
diff changeset
1018 type Specific_Dispatching_Entry is record
kono
parents:
diff changeset
1019 Dispatching_Policy : Character;
kono
parents:
diff changeset
1020 -- First character (upper case) of the corresponding policy name
kono
parents:
diff changeset
1021
kono
parents:
diff changeset
1022 First_Priority : Nat;
kono
parents:
diff changeset
1023 -- Lower bound of the priority range to which the specified dispatching
kono
parents:
diff changeset
1024 -- policy applies.
kono
parents:
diff changeset
1025
kono
parents:
diff changeset
1026 Last_Priority : Nat;
kono
parents:
diff changeset
1027 -- Upper bound of the priority range to which the specified dispatching
kono
parents:
diff changeset
1028 -- policy applies.
kono
parents:
diff changeset
1029
kono
parents:
diff changeset
1030 Pragma_Loc : Source_Ptr;
kono
parents:
diff changeset
1031 -- Location of pragma setting this value in place
kono
parents:
diff changeset
1032 end record;
kono
parents:
diff changeset
1033
kono
parents:
diff changeset
1034 package Specific_Dispatching is new Table.Table (
kono
parents:
diff changeset
1035 Table_Component_Type => Specific_Dispatching_Entry,
kono
parents:
diff changeset
1036 Table_Index_Type => Nat,
kono
parents:
diff changeset
1037 Table_Low_Bound => 1,
kono
parents:
diff changeset
1038 Table_Initial => 10,
kono
parents:
diff changeset
1039 Table_Increment => 100,
kono
parents:
diff changeset
1040 Table_Name => "Name_Priority_Specific_Dispatching");
kono
parents:
diff changeset
1041
kono
parents:
diff changeset
1042 -----------------
kono
parents:
diff changeset
1043 -- Subprograms --
kono
parents:
diff changeset
1044 -----------------
kono
parents:
diff changeset
1045
kono
parents:
diff changeset
1046 procedure Ensure_System_Dependency;
kono
parents:
diff changeset
1047 -- This procedure ensures that a dependency is created on system.ads. Even
kono
parents:
diff changeset
1048 -- if there is no semantic dependency, Targparm has read the file to
kono
parents:
diff changeset
1049 -- acquire target parameters, so we need a source dependency.
kono
parents:
diff changeset
1050
kono
parents:
diff changeset
1051 procedure Write_ALI (Object : Boolean);
kono
parents:
diff changeset
1052 -- This procedure writes the library information for the current main unit
kono
parents:
diff changeset
1053 -- The Object parameter is true if an object file is created, and false
kono
parents:
diff changeset
1054 -- otherwise. Note that the pseudo-object file generated in GNATProve mode
kono
parents:
diff changeset
1055 -- does count as an object file from this point of view.
kono
parents:
diff changeset
1056 --
kono
parents:
diff changeset
1057 -- Note: in the case where we are not generating code (-gnatc mode), this
kono
parents:
diff changeset
1058 -- routine only writes an ALI file if it cannot find an existing up to
kono
parents:
diff changeset
1059 -- date ALI file. If it *can* find an existing up to date ALI file, then
kono
parents:
diff changeset
1060 -- it reads this file and sets the Lib.Compilation_Arguments table from
kono
parents:
diff changeset
1061 -- the A lines in this file.
kono
parents:
diff changeset
1062
kono
parents:
diff changeset
1063 procedure Add_Preprocessing_Dependency (S : Source_File_Index);
kono
parents:
diff changeset
1064 -- Indicate that there is a dependency to be added on a preprocessing data
kono
parents:
diff changeset
1065 -- file or on a preprocessing definition file.
kono
parents:
diff changeset
1066
kono
parents:
diff changeset
1067 end Lib.Writ;