]>
Commit | Line | Data |
---|---|---|
ee6ba406 | 1 | ------------------------------------------------------------------------------ |
2 | -- -- | |
3 | -- GNAT COMPILER COMPONENTS -- | |
4 | -- -- | |
5 | -- D E B U G -- | |
6 | -- -- | |
7 | -- B o d y -- | |
8 | -- -- | |
b85b7cb2 | 9 | -- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- |
ee6ba406 | 10 | -- -- |
11 | -- GNAT is free software; you can redistribute it and/or modify it under -- | |
12 | -- terms of the GNU General Public License as published by the Free Soft- -- | |
6bc9506f | 13 | -- ware Foundation; either version 3, or (at your option) any later ver- -- |
ee6ba406 | 14 | -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
15 | -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- | |
6bc9506f | 16 | -- or FITNESS FOR A PARTICULAR PURPOSE. -- |
ee6ba406 | 17 | -- -- |
6bc9506f | 18 | -- As a special exception under Section 7 of GPL version 3, you are granted -- |
19 | -- additional permissions described in the GCC Runtime Library Exception, -- | |
20 | -- version 3.1, as published by the Free Software Foundation. -- | |
21 | -- -- | |
22 | -- You should have received a copy of the GNU General Public License and -- | |
23 | -- a copy of the GCC Runtime Library Exception along with this program; -- | |
24 | -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- | |
25 | -- <http://www.gnu.org/licenses/>. -- | |
ee6ba406 | 26 | -- -- |
27 | -- GNAT was originally developed by the GNAT team at New York University. -- | |
e78e8c8e | 28 | -- Extensive contributions were provided by Ada Core Technologies Inc. -- |
ee6ba406 | 29 | -- -- |
30 | ------------------------------------------------------------------------------ | |
31 | ||
32 | package body Debug is | |
33 | ||
34 | --------------------------------- | |
35 | -- Summary of Debug Flag Usage -- | |
36 | --------------------------------- | |
37 | ||
9dfe12ae | 38 | -- Debug flags for compiler (GNAT1) |
ee6ba406 | 39 | |
40 | -- da Generate messages tracking semantic analyzer progress | |
41 | -- db Show encoding of type names for debug output | |
42 | -- dc List names of units as they are compiled | |
43 | -- dd Dynamic allocation of tables messages generated | |
44 | -- de List the entity table | |
45 | -- df Full tree/source print (includes withed units) | |
46 | -- dg Print source from tree (generated code only) | |
47 | -- dh Generate listing showing loading of name table hash chains | |
48 | -- di Generate messages for visibility linking/delinking | |
49 | -- dj Suppress "junk null check" for access parameter values | |
50 | -- dk Generate GNATBUG message on abort, even if previous errors | |
51 | -- dl Generate unit load trace messages | |
a8022f12 | 52 | -- dm |
ee6ba406 | 53 | -- dn Generate messages for node/list allocation |
54 | -- do Print source from tree (original code only) | |
55 | -- dp Generate messages for parser scope stack push/pops | |
f15731c4 | 56 | -- dq No auto-alignment of small records |
ee6ba406 | 57 | -- dr Generate parser resynchronization messages |
58 | -- ds Print source from tree (including original and generated stuff) | |
59 | -- dt Print full tree | |
60 | -- du Uncheck categorization pragmas | |
61 | -- dv Output trace of overload resolution | |
62 | -- dw Print trace of semantic scope stack | |
63 | -- dx Force expansion on, even if no code being generated | |
64 | -- dy Print tree of package Standard | |
65 | -- dz Print source of package Standard | |
66 | ||
67 | -- dA All entities included in representation information output | |
68 | -- dB Output debug encoding of type names and variants | |
9dfe12ae | 69 | -- dC Output debugging information on check suppression |
ee6ba406 | 70 | -- dD Delete elaboration checks in inner level routines |
71 | -- dE Apply elaboration checks to predefined units | |
8b3e2261 | 72 | -- dF Front end data layout enabled |
9dfe12ae | 73 | -- dG Generate all warnings including those normally suppressed |
ee6ba406 | 74 | -- dH Hold (kill) call to gigi |
75 | -- dI Inhibit internal name numbering in gnatG listing | |
76 | -- dJ Output debugging trace info for JGNAT (Java VM version of GNAT) | |
77 | -- dK Kill all error messages | |
78 | -- dL Output trace information on elaboration checking | |
c9e3ee19 | 79 | -- dM Assume all variables are modified (no current values) |
9dfe12ae | 80 | -- dN No file name information in exception messages |
ee6ba406 | 81 | -- dO Output immediate error messages |
82 | -- dP Do not check for controlled objects in preelaborable packages | |
2d1acfa7 | 83 | -- dQ |
ee6ba406 | 84 | -- dR Bypass check for correct version of s-rpc |
85 | -- dS Never convert numbers to machine numbers in Sem_Eval | |
86 | -- dT Convert to machine numbers only for constant declarations | |
87 | -- dU Enable garbage collection of unreachable entities | |
88 | -- dV Enable viewing of all symbols in debugger | |
9dfe12ae | 89 | -- dW Disable warnings on calls for IN OUT parameters |
ed195555 | 90 | -- dX Display messages on reads of potentially uninitialized scalars |
9dfe12ae | 91 | -- dY Enable configurable run-time mode |
aad6babd | 92 | -- dZ Generate listing showing the contents of the dispatch tables |
ee6ba406 | 93 | |
f25f4252 | 94 | -- d.a Force Target_Strict_Alignment mode to True |
2d5d03a0 | 95 | -- d.b Dump backend types |
45045496 | 96 | -- d.c Generate inline concatenation, do not call procedure |
07c191b0 | 97 | -- d.d Disable atomic synchronization |
98 | -- d.e Enable atomic synchronization | |
95c751d5 | 99 | -- d.f Inhibit folding of static expressions |
32c07c22 | 100 | -- d.g Enable conversion of raise into goto |
30ab103b | 101 | -- d.h Minimize the creation of public internal symbols for concatenation |
929bf274 | 102 | -- d.i Ignore Warnings pragmas |
9ef23ec9 | 103 | -- d.j Generate listing of frontend inlined calls |
8378fab6 | 104 | -- d.k |
41c0403d | 105 | -- d.l Use Ada 95 semantics for limited function returns |
106 | -- d.m For -gnatl, print full source only for main unit | |
38b9cc41 | 107 | -- d.n Print source file names |
56a41191 | 108 | -- d.o Generate .NET listing of CIL code |
ae888dbd | 109 | -- d.p Enable the .NET CIL verifier |
4ca8deee | 110 | -- d.q |
2253aba6 | 111 | -- d.r Enable OK_To_Reorder_Components in non-variant records |
46ed552e | 112 | -- d.s Disable expansion of slice move, use memmove |
8b3e2261 | 113 | -- d.t Disable static allocation of library level dispatch tables |
5542710d | 114 | -- d.u Enable Modify_Tree_For_C (update tree for c) |
2253aba6 | 115 | -- d.v Enable OK_To_Reorder_Components in variant records |
006b904a | 116 | -- d.w Do not check for infinite loops |
9dfe12ae | 117 | -- d.x No exception handlers |
118 | -- d.y | |
e5216fa4 | 119 | -- d.z Restore previous support for frontend handling of Inline_Always |
9dfe12ae | 120 | |
c8969ba6 | 121 | -- d.A Read/write Aspect_Specifications hash table to tree |
41c0403d | 122 | -- d.B |
45045496 | 123 | -- d.C Generate concatenation call, do not generate inline code |
9c7948d7 | 124 | -- d.D Disable errors on use of overriding keyword in Ada 95 mode |
ce9bfeb1 | 125 | -- d.E Turn selected errors into warnings |
761502a9 | 126 | -- d.F Debug mode for GNATprove |
6debbb59 | 127 | -- d.G Ignore calls through generic formal parameters for elaboration |
44624b50 | 128 | -- d.H |
175a6969 | 129 | -- d.I Do not ignore enum representation clauses in CodePeer mode |
bb0ed4ab | 130 | -- d.J Disable parallel SCIL generation mode |
44624b50 | 131 | -- d.K |
92f1631f | 132 | -- d.L Depend on back end for limited types in if and case expressions |
a9cd517c | 133 | -- d.M Relaxed RM semantics |
9b8df6be | 134 | -- d.N Add node to all entities |
11b376d2 | 135 | -- d.O Dump internal SCO tables |
4ecb1318 | 136 | -- d.P Previous (non-optimized) handling of length comparisons |
72a21fdd | 137 | -- d.Q Previous (incomplete) style check for binary operators |
aee191ca | 138 | -- d.R Restrictions in ali files in positional form |
2253aba6 | 139 | -- d.S Force Optimize_Alignment (Space) |
140 | -- d.T Force Optimize_Alignment (Time) | |
de2e6464 | 141 | -- d.U Ignore indirect calls for static elaboration |
761502a9 | 142 | -- d.V |
716383d8 | 143 | -- d.W Print out debugging information for Walk_Library_Items |
05987af3 | 144 | -- d.X Old treatment of indexing aspects |
f6f7b3f4 | 145 | -- d.Y |
ec0d4076 | 146 | -- d.Z Do not enable expansion in configurable run-time mode |
41c0403d | 147 | |
ee6ba406 | 148 | -- d1 Error msgs have node numbers where possible |
149 | -- d2 Eliminate error flags in verbose form error messages | |
150 | -- d3 Dump bad node in Comperr on an abort | |
151 | -- d4 Inhibit automatic krunch of predefined library unit files | |
152 | -- d5 Debug output for tree read/write | |
153 | -- d6 Default access unconstrained to thin pointers | |
82b93248 | 154 | -- d7 Suppress version/source stamp/compilation time for -gnatv/-gnatl |
ee6ba406 | 155 | -- d8 Force opposite endianness in packed stuff |
7a19298b | 156 | -- d9 Allow lock free implementation |
ee6ba406 | 157 | |
b85b7cb2 | 158 | -- d.1 Enable unnesting of nested procedures |
159 | -- d.2 Allow statements in declarative part | |
fff6930c | 160 | -- d.3 |
161 | -- d.4 | |
162 | -- d.5 | |
163 | -- d.6 | |
164 | -- d.7 | |
165 | -- d.8 | |
166 | -- d.9 | |
167 | ||
ee6ba406 | 168 | -- Debug flags for binder (GNATBIND) |
169 | ||
95c751d5 | 170 | -- da All links (including internal units) listed if there is a cycle |
41c0403d | 171 | -- db Output information from Better_Choice |
ee6ba406 | 172 | -- dc List units as they are chosen |
173 | -- dd | |
174 | -- de Elaboration dependencies including system units | |
175 | -- df | |
176 | -- dg | |
177 | -- dh | |
752e1833 | 178 | -- di Ignore_Errors mode for reading ali files |
ee6ba406 | 179 | -- dj |
180 | -- dk | |
181 | -- dl | |
182 | -- dm | |
183 | -- dn List details of manipulation of Num_Pred values | |
41c0403d | 184 | -- do Use old preference for elaboration order |
ee6ba406 | 185 | -- dp |
186 | -- dq | |
f15731c4 | 187 | -- dr |
ee6ba406 | 188 | -- ds |
189 | -- dt | |
190 | -- du List units as they are acquired | |
191 | -- dv | |
192 | -- dw | |
9dfe12ae | 193 | -- dx Force binder to read xref information from ali files |
ee6ba406 | 194 | -- dy |
195 | -- dz | |
196 | ||
ee6ba406 | 197 | -- Debug flags used in package Make and its clients (e.g. GNATMAKE) |
198 | ||
199 | -- da | |
200 | -- db | |
201 | -- dc | |
202 | -- dd | |
203 | -- de | |
d0a7d051 | 204 | -- df Only output file names, not path names, in log |
ee6ba406 | 205 | -- dg |
d9f170d4 | 206 | -- dh Generate listing showing loading of name table hash chains |
ee6ba406 | 207 | -- di |
208 | -- dj | |
209 | -- dk | |
210 | -- dl | |
916c9a35 | 211 | -- dm Display the number of maximum simultaneous compilations |
9dfe12ae | 212 | -- dn Do not delete temp files created by gnatmake |
ee6ba406 | 213 | -- do |
214 | -- dp Prints the contents of the Q used by Make.Compile_Sources | |
215 | -- dq Prints source files as they are enqueued and dequeued | |
216 | -- dr | |
aa16d73e | 217 | -- ds |
9dfe12ae | 218 | -- dt Display time stamps when there is a mismatch |
f15731c4 | 219 | -- du List units as their ali files are acquired |
ee6ba406 | 220 | -- dv |
221 | -- dw Prints the list of units withed by the unit currently explored | |
222 | -- dx | |
223 | -- dy | |
224 | -- dz | |
225 | ||
ee6ba406 | 226 | -------------------------------------------- |
227 | -- Documentation for Compiler Debug Flags -- | |
228 | -------------------------------------------- | |
229 | ||
230 | -- da Generate messages tracking semantic analyzer progress. A message | |
231 | -- is output showing each node as it gets analyzed, expanded, | |
232 | -- resolved, or evaluated. This option is useful for finding out | |
233 | -- exactly where a bomb during semantic analysis is occurring. | |
234 | ||
235 | -- db In Exp_Dbug, certain type names are encoded to include debugging | |
236 | -- information. This debug switch causes lines to be output showing | |
237 | -- the encodings used. | |
238 | ||
239 | -- dc List names of units as they are compiled. One line of output will | |
240 | -- be generated at the start of compiling each unit (package or | |
241 | -- subprogram). | |
242 | ||
243 | -- dd Dynamic allocation of tables messages generated. Each time a | |
244 | -- table is reallocated, a line is output indicating the expansion. | |
245 | ||
ee6ba406 | 246 | -- de List the entity table |
247 | ||
248 | -- df Full tree/source print (includes withed units). Normally the tree | |
249 | -- output (dt) or recreated source output (dg,do,ds) includes only | |
250 | -- the main unit. If df is set, then the output in either case | |
251 | -- includes all compiled units (see also dg,do,ds,dt). Note that to | |
73fe0f55 | 252 | -- be effective, this switch must be used in combination with one or |
ee6ba406 | 253 | -- more of dt, dg, do or ds. |
254 | ||
ee6ba406 | 255 | -- dg Print the source recreated from the generated tree. In the case |
256 | -- where the tree has been rewritten this output includes only the | |
257 | -- generated code, not the original code (see also df,do,ds,dz). | |
258 | -- This flag differs from -gnatG in that the output also includes | |
259 | -- non-source generated null statements, and freeze nodes, which | |
260 | -- are normally omitted in -gnatG mode. | |
261 | ||
ee6ba406 | 262 | -- dh Generates a table at the end of a compilation showing how the hash |
263 | -- table chains built by the Namet package are loaded. This is useful | |
264 | -- in ensuring that the hashing algorithm (in Namet.Hash) is working | |
265 | -- effectively with typical sets of program identifiers. | |
266 | ||
ee6ba406 | 267 | -- di Generate messages for visibility linking/delinking |
268 | ||
269 | -- dj Suppress "junk null check" for access parameters. This flag permits | |
270 | -- Ada programs to pass null parameters to access parameters, and to | |
271 | -- explicitly check such access values against the null literal. | |
272 | -- Neither of these is valid Ada, but both were allowed in versions of | |
273 | -- GNAT before 3.10, so this switch can ease the transition process. | |
274 | ||
ee6ba406 | 275 | -- dk Immediate kill on abort. Normally on an abort (i.e. a call to |
276 | -- Comperr.Compiler_Abort), the GNATBUG message is not given if | |
277 | -- there is a previous error. This debug switch bypasses this test | |
278 | -- and gives the message unconditionally (useful for debugging). | |
279 | ||
ee6ba406 | 280 | -- dl Generate unit load trace messages. A line of traceback output is |
281 | -- generated each time a request is made to the library manager to | |
282 | -- load a new unit. | |
283 | ||
ee6ba406 | 284 | -- dn Generate messages for node/list allocation. Each time a node or |
285 | -- list header is allocated, a line of output is generated. Certain | |
286 | -- other basic tree operations also cause a line of output to be | |
287 | -- generated. This option is useful in seeing where the parser is | |
d7a87dfa | 288 | -- blowing up. |
ee6ba406 | 289 | |
ee6ba406 | 290 | -- do Print the source recreated from the generated tree. In the case |
291 | -- where the tree has been rewritten, this output includes only the | |
292 | -- original code, not the generated code (see also df,dg,ds,dz). | |
293 | ||
294 | -- dp Generate messages for parser scope stack push/pops. A line of | |
295 | -- output by the parser each time the parser scope stack is either | |
296 | -- pushed or popped. Useful in debugging situations where the | |
297 | -- parser scope stack ends up incorrectly synchronized | |
298 | ||
f15731c4 | 299 | -- dq In layout version 1.38, 2002/01/12, a circuit was implemented |
300 | -- to give decent default alignment to short records that had no | |
301 | -- specific alignment set. This debug option restores the previous | |
302 | -- behavior of giving such records poor alignments, typically 1. | |
303 | -- This may be useful in dealing with transition. | |
304 | ||
ee6ba406 | 305 | -- dr Generate parser resynchronization messages. Normally the parser |
306 | -- resynchronizes quietly. With this debug option, two messages | |
307 | -- are generated, one when the parser starts a resynchronization | |
308 | -- skip, and another when it resumes parsing. Useful in debugging | |
309 | -- inadequate error recovery situations. | |
310 | ||
311 | -- ds Print the source recreated from the generated tree. In the case | |
312 | -- where the tree has been rewritten this output includes both the | |
313 | -- generated code and the original code with the generated code | |
314 | -- being enlosed in curly brackets (see also df,do,ds,dz) | |
315 | ||
316 | -- dt Print full tree. The generated tree is output (see also df,dy) | |
317 | ||
318 | -- du Uncheck categorization pragmas. This debug switch causes the | |
319 | -- categorization pragmas (Pure, Preelaborate etc) to be ignored | |
320 | -- so that normal checks are not made (this is particularly useful | |
321 | -- for adding temporary debugging code to units that have pragmas | |
322 | -- that are inconsistent with the debugging code added. | |
323 | ||
9dfe12ae | 324 | -- dv Output trace of overload resolution. Outputs messages for |
325 | -- overload attempts that involve cascaded errors, or where | |
326 | -- an interepretation is incompatible with the context. | |
327 | ||
ee6ba406 | 328 | -- dw Write semantic scope stack messages. Each time a scope is created |
59ca7bac | 329 | -- or removed, a message is output (see the Sem_Ch8.Push_Scope and |
ee6ba406 | 330 | -- Sem_Ch8.Pop_Scope subprograms). |
331 | ||
332 | -- dx Force expansion on, even if no code being generated. Normally the | |
333 | -- expander is inhibited if no code is generated. This switch forces | |
334 | -- expansion to proceed normally even if the backend is not being | |
335 | -- called. This is particularly useful for debugging purposes when | |
336 | -- using the front-end only version of the compiler (which normally | |
337 | -- would never do any expansion). | |
338 | ||
339 | -- dy Print tree of package Standard. Normally the tree print out does | |
340 | -- not include package Standard, even if the -df switch is set. This | |
341 | -- switch forces output of the internal tree built for Standard. | |
342 | ||
343 | -- dz Print source of package Standard. Normally the source print out | |
344 | -- does not include package Standard, even if the -df switch is set. | |
345 | -- This switch forces output of the source recreated from the internal | |
e7b2d6bc | 346 | -- tree built for Standard. Note that this differs from -gnatS in |
347 | -- that it prints from the actual tree using the normal Sprint | |
348 | -- circuitry for printing trees. | |
ee6ba406 | 349 | |
350 | -- dA Forces output of representation information, including full | |
351 | -- information for all internal type and object entities, as well | |
9dfe12ae | 352 | -- as all user defined type and object entities including private |
0a90e223 | 353 | -- and incomplete types. This debug switch also automatically sets |
354 | -- the equivalent of -gnatR3m. | |
ee6ba406 | 355 | |
356 | -- dB Output debug encodings for types and variants. See Exp_Dbug for | |
357 | -- exact form of the generated output. | |
358 | ||
9dfe12ae | 359 | -- dC Output trace information showing the decisions made during |
360 | -- check suppression activity in unit Checks. | |
361 | ||
362 | -- dD Delete new elaboration checks. This flag causes GNAT to return | |
363 | -- to the 3.13a elaboration semantics, and to suppress the fixing | |
364 | -- of two bugs. The first is in the context of inner routines in | |
365 | -- dynamic elaboration mode, when the subprogram we are in was | |
366 | -- called at elaboration time by a unit that was also compiled with | |
367 | -- dynamic elaboration checks. In this case, if A calls B calls C, | |
368 | -- and all are in different units, we need an elaboration check at | |
369 | -- each call. These nested checks were only put in recently (see | |
370 | -- version 1.80 of Sem_Elab) and we provide this debug flag to | |
371 | -- revert to the previous behavior in case of regressions. The | |
372 | -- other behavior reverted by this flag is the treatment of the | |
373 | -- Elaborate_Body pragma in static elaboration mode. This used to | |
374 | -- be treated as not needing elaboration checking, but in fact in | |
375 | -- general Elaborate_All is still required because of nested calls. | |
376 | ||
ee6ba406 | 377 | -- dE Apply compile time elaboration checking for with relations between |
378 | -- predefined units. Normally no checks are made (it seems that at | |
379 | -- least on the SGI, such checks run into trouble). | |
380 | ||
9dfe12ae | 381 | -- dF Front end data layout enabled. Normally front end data layout |
382 | -- is only enabled if the target parameter Backend_Layout is False. | |
383 | -- This debugging switch enables it unconditionally. | |
384 | ||
385 | -- dG Generate all warnings. Normally Errout suppresses warnings on | |
386 | -- units that are not part of the main extended source, and also | |
387 | -- suppresses warnings on instantiations in the main extended | |
388 | -- source that duplicate warnings already posted on the template. | |
389 | -- This switch stops both kinds of deletion and causes Errout to | |
390 | -- post all warnings sent to it. | |
391 | ||
392 | -- dH Inhibit call to gigi. This is useful for testing front end data | |
393 | -- layout, and may be useful in other debugging situations where | |
394 | -- you do not want gigi to intefere with the testing. | |
395 | ||
8b3e2261 | 396 | -- dI Inhibit internal name numbering in gnatDG listing. Any sequence of |
397 | -- the form <uppercase-letter><digits><lowercase-letter> appearing in | |
398 | -- a name is replaced by <uppercase-letter>...<lowercase-letter>. This | |
399 | -- is used in the fixed bugs run to minimize system and version | |
400 | -- dependency in filed -gnatD or -gnatG output. | |
ee6ba406 | 401 | |
9dfe12ae | 402 | -- dJ Generate debugging trace output for the JGNAT back end. This |
403 | -- consists of symbolic Java Byte Code sequences for all generated | |
404 | -- classes plus additional information to indicate local variables | |
405 | -- and methods. | |
406 | ||
407 | -- dK Kill all error messages. This debug flag suppresses the output | |
408 | -- of all error messages. It is used in regression tests where the | |
409 | -- error messages are target dependent and irrelevant. | |
410 | ||
ee6ba406 | 411 | -- dL Output trace information on elaboration checking. This debug |
412 | -- switch causes output to be generated showing each call or | |
413 | -- instantiation as it is checked, and the progress of the recursive | |
414 | -- trace through calls at elaboration time. | |
415 | ||
9dfe12ae | 416 | -- dM Assume all variables have been modified, and ignore current value |
417 | -- indications. This debug flag disconnects the tracking of constant | |
418 | -- values (see Exp_Ch2.Expand_Current_Value). | |
419 | ||
95c751d5 | 420 | -- dN Do not generate file name information in exception messages |
9dfe12ae | 421 | |
ee6ba406 | 422 | -- dO Output immediate error messages. This causes error messages to |
423 | -- be output as soon as they are generated (disconnecting several | |
424 | -- circuits for improvement of messages, deletion of duplicate | |
425 | -- messages etc). Useful to diagnose compiler bombs caused by | |
426 | -- erroneous handling of error situations | |
427 | ||
428 | -- dP Do not check for controlled objects in preelaborable packages. | |
429 | -- RM 10.2.1(9) forbids the use of library level controlled objects | |
430 | -- in preelaborable packages, but this restriction is a huge pain, | |
431 | -- especially in the predefined library units. | |
432 | ||
433 | -- dR Bypass the check for a proper version of s-rpc being present | |
434 | -- to use the -gnatz? switch. This allows debugging of the use | |
435 | -- of stubs generation without needing to have GLADE (or some | |
436 | -- other PCS installed). | |
437 | ||
438 | -- dS Omit conversion of fpt numbers to exact machine numbers in | |
439 | -- non-static evaluation contexts (see Check_Non_Static_Context). | |
440 | -- This is intended for testing out timing problems with this | |
441 | -- conversion circuit. | |
442 | ||
443 | -- dT Similar to dS, but omits the conversions only in the case where | |
444 | -- the parent is not a constant declaration. | |
445 | ||
446 | -- dU Enable garbage collection of unreachable entities. This enables | |
447 | -- both the reachability analysis and changing the Is_Public and | |
448 | -- Is_Eliminated flags. | |
449 | ||
450 | -- dV Enable viewing of all symbols in debugger. Causes debug information | |
451 | -- to be generated for all symbols, including internal symbols. This | |
452 | -- is enabled by default for -gnatD, but this switch allows this to | |
453 | -- be enabled without generating modified source files. Note that the | |
454 | -- use of -gnatdV ensures in the dwarf/elf case that all symbols that | |
455 | -- are present in the elf tables are also in the dwarf tables (which | |
9dfe12ae | 456 | -- seems to be required by some tools). Another effect of dV is to |
457 | -- generate full qualified names, including internal names generated | |
458 | -- for blocks and loops. | |
459 | ||
460 | -- dW Disable warnings when a possibly uninitialized scalar value is | |
461 | -- passed to an IN OUT parameter of a procedure. This usage is a | |
462 | -- quite improper bounded error [erroneous in Ada 83] situation, | |
463 | -- and would normally generate a warning. However, to ease the | |
464 | -- task of transitioning incorrect legacy code, we provide this | |
465 | -- undocumented feature for suppressing these warnings. | |
ee6ba406 | 466 | |
9dfe12ae | 467 | -- dY Enable configurable run-time mode, just as though the System file |
468 | -- had Configurable_Run_Time_Mode set to True. This is useful in | |
469 | -- testing high integrity mode. | |
470 | ||
8b3e2261 | 471 | -- dZ Generate listing showing the contents of the dispatch tables. Each |
472 | -- line has an internally generated number used for references between | |
473 | -- tagged types and primitives. For each primitive the output has the | |
474 | -- following fields: | |
2253aba6 | 475 | -- |
8b3e2261 | 476 | -- - Letter 'P' or letter 's': The former indicates that this |
477 | -- primitive will be located in a primary dispatch table. The | |
478 | -- latter indicates that it will be located in a secondary | |
479 | -- dispatch table. | |
2253aba6 | 480 | -- |
8b3e2261 | 481 | -- - Name of the primitive. In case of predefined Ada primitives |
482 | -- the text "(predefined)" is added before the name, and these | |
483 | -- acronyms are used: SR (Stream_Read), SW (Stream_Write), SI | |
484 | -- (Stream_Input), SO (Stream_Output), DA (Deep_Adjust), DF | |
485 | -- (Deep_Finalize). In addition Oeq identifies the equality | |
486 | -- operator, and "_assign" the assignment. | |
2253aba6 | 487 | -- |
8b3e2261 | 488 | -- - If the primitive covers interface types, two extra fields |
489 | -- referencing other primitives are generated: "Alias" references | |
490 | -- the primitive of the tagged type that covers an interface | |
491 | -- primitive, and "AI_Alias" references the covered interface | |
492 | -- primitive. | |
2253aba6 | 493 | -- |
8b3e2261 | 494 | -- - The expression "at #xx" indicates the slot of the dispatch |
495 | -- table occupied by such primitive in its corresponding primary | |
496 | -- or secondary dispatch table. | |
2253aba6 | 497 | -- |
8b3e2261 | 498 | -- - In case of abstract subprograms the text "is abstract" is |
499 | -- added at the end of the line. | |
500 | ||
f25f4252 | 501 | -- d.a Force Target_Strict_Alignment to True, even on targets where it |
502 | -- would normally be false. Can be used for testing strict alignment | |
503 | -- circuitry in the compiler. | |
504 | ||
2d5d03a0 | 505 | -- d.b Dump back end types. During Create_Standard, the back end is |
506 | -- queried for all available types. This option shows them. | |
507 | ||
45045496 | 508 | -- d.c Generate inline concatenation, instead of calling one of the |
509 | -- System.Concat_n.Str_Concat_n routines in cases where the latter | |
510 | -- routines would normally be called. | |
511 | ||
07c191b0 | 512 | -- d.d Disable atomic synchronization for all atomic variable references. |
513 | -- Pragma Enable_Atomic_Synchronization is ignored. | |
514 | ||
515 | -- d.e Enable atomic synchronization for all atomic variable references. | |
516 | -- Pragma Disable_Atomic_Synchronization is ignored, and also the | |
517 | -- compiler switch -gnated is ignored. | |
518 | ||
95c751d5 | 519 | -- d.f Suppress folding of static expressions. This of course results |
520 | -- in seriously non-conforming behavior, but is useful sometimes | |
521 | -- when tracking down handling of complex expressions. | |
522 | ||
32c07c22 | 523 | -- d.g Enables conversion of a raise statement into a goto when the |
524 | -- relevant handler is statically determinable. For now we only try | |
525 | -- this if this debug flag is set. Later we will enable this more | |
526 | -- generally by default. | |
527 | ||
30ab103b | 528 | -- d.h Minimize the creation of public internal symbols for concatenation |
529 | -- by enforcing a secondary stack-like handling of the final result. | |
530 | -- The target of the concatenation is thus constrained in place and | |
531 | -- initialized with the result instead of acting as its alias. | |
532 | ||
929bf274 | 533 | -- d.i Ignore all occurrences of pragma Warnings in the sources. This can |
534 | -- be used in particular to disable Warnings (Off) to check if any of | |
535 | -- these statements are inappropriate. | |
536 | ||
9ef23ec9 | 537 | -- d.j Generate listing of frontend inlined calls and inline calls passed |
538 | -- to the backend. This is useful to locate skipped calls that must be | |
539 | -- inlined by the frontend. | |
540 | ||
41c0403d | 541 | -- d.l Use Ada 95 semantics for limited function returns. This may be |
542 | -- used to work around the incompatibility introduced by AI-318-2. | |
543 | -- It is useful only in -gnat05 mode. | |
544 | ||
545 | -- d.m When -gnatl is used, the normal output includes full listings of | |
546 | -- all files in the extended main source (body/spec/subunits). If this | |
547 | -- debug switch is used, then the full listing is given only for the | |
548 | -- main source (this corresponds to a previous behavior of -gnatl and | |
549 | -- is used for running the ACATS tests). | |
550 | ||
38b9cc41 | 551 | -- d.n Print source file names as they are loaded. This is useful if the |
552 | -- compiler has a bug -- these are the files that need to be included | |
553 | -- in a bug report. | |
554 | ||
23c0ddf3 | 555 | -- d.o Generate listing showing the IL instructions generated by the .NET |
556 | -- compiler for each subprogram. | |
56a41191 | 557 | |
ae888dbd | 558 | -- d.p Enable the .NET CIL verifier. During development the verifier is |
559 | -- disabled by default and this flag is used to enable it. In the | |
560 | -- future we will reverse this functionality. | |
561 | ||
2253aba6 | 562 | -- d.r Forces the flag OK_To_Reorder_Components to be set in all record |
563 | -- base types that have no discriminants. | |
564 | ||
46ed552e | 565 | -- d.s Normally the compiler expands slice moves into loops if overlap |
566 | -- might be possible. This debug flag inhibits that expansion, and | |
567 | -- the back end is expected to use an appropriate routine to handle | |
568 | -- overlap, based on Forward_OK and Backwards_OK flags. | |
569 | ||
8b3e2261 | 570 | -- d.t The compiler has been modified (a fairly extensive modification) |
571 | -- to generate static dispatch tables for library level tagged types. | |
572 | -- This debug switch disables this modification and reverts to the | |
573 | -- previous dynamic construction of tables. It is there as a possible | |
574 | -- work around if we run into trouble with the new implementation. | |
575 | ||
5542710d | 576 | -- d.u Sets Modify_Tree_For_C mode in which tree is modified to make it |
577 | -- easier to generate code using a C compiler. | |
578 | ||
2253aba6 | 579 | -- d.v Forces the flag OK_To_Reorder_Components to be set in all record |
580 | -- base types that have at least one discriminant (v = variant). | |
581 | ||
006b904a | 582 | -- d.w This flag turns off the scanning of loops to detect possible |
41c0403d | 583 | -- infinite loops. |
584 | ||
9dfe12ae | 585 | -- d.x No exception handlers in generated code. This causes exception |
8b20af99 | 586 | -- handlers to be eliminated from the generated code. They are still |
9dfe12ae | 587 | -- fully compiled and analyzed, they just get eliminated from the |
588 | -- code generation step. | |
589 | ||
e5216fa4 | 590 | -- d.z Restore previous front-end support for Inline_Always. In default |
591 | -- mode, for targets that use the GCC back end (i.e. currently all | |
592 | -- targets except AAMP, .NET, JVM, and GNATprove), Inline_Always is | |
593 | -- handled by the back end. Use of this switch restores the previous | |
594 | -- handling of Inline_Always by the front end on such targets. For the | |
595 | -- targets that do not use the GCC back end, this switch is ignored. | |
9fac98bb | 596 | |
ce9bfeb1 | 597 | -- d.A There seems to be a problem with ASIS if we activate the circuit |
598 | -- for reading and writing the aspect specification hash table, so | |
599 | -- for now, this is controlled by the debug flag d.A. The hash table | |
600 | -- is only written and read if this flag is set. | |
601 | ||
45045496 | 602 | -- d.C Generate call to System.Concat_n.Str_Concat_n routines in cases |
603 | -- where we would normally generate inline concatenation code. | |
604 | ||
9c7948d7 | 605 | -- d.D For compatibility with some Ada 95 compilers implementing only |
606 | -- one feature of Ada 2005 (overriding keyword), disable errors on use | |
607 | -- of overriding keyword in Ada 95 mode. | |
608 | ||
ce9bfeb1 | 609 | -- d.E Turn selected errors into warnings. This debug switch causes a |
610 | -- specific set of error messages into warnings. Setting this switch | |
2fddb086 | 611 | -- causes Opt.Error_To_Warning to be set to True. The intention is |
612 | -- that this be used for messages representing upwards incompatible | |
613 | -- changes to Ada 2012 that cause previously correct programs to be | |
614 | -- treated as illegal now. The following cases are affected: | |
615 | -- | |
616 | -- Errors relating to overlapping subprogram parameters for cases | |
617 | -- other than IN OUT parameters to functions. | |
618 | -- | |
619 | -- Errors relating to the new rules about not defining equality | |
620 | -- too late so that composition of equality can be assured. | |
fc7bc4d1 | 621 | -- |
622 | -- Errors relating to overriding indicators on protected subprogram | |
623 | -- bodies (not an Ada 2012 incompatibility, but might cause errors | |
624 | -- for existing programs assuming they were legal because GNAT | |
625 | -- formerly allowed them). | |
ce9bfeb1 | 626 | |
761502a9 | 627 | -- d.F Sets GNATprove_Mode to True. This allows debugging the frontend in |
628 | -- the special mode used by GNATprove. | |
3ce44058 | 629 | |
6debbb59 | 630 | -- d.G Previously the compiler ignored calls via generic formal parameters |
631 | -- when doing the analysis for the static elaboration model. This is | |
632 | -- now fixed, but we provide this debug flag to revert to the previous | |
633 | -- situation of ignoring such calls to aid in transition. | |
634 | ||
175a6969 | 635 | -- d.I Do not ignore enum representation clauses in CodePeer mode. |
636 | -- The default of ignoring representation clauses for enumeration | |
637 | -- types in CodePeer is good for the majority of Ada code, but in some | |
638 | -- cases being able to change this default might be useful to remove | |
639 | -- some false positives. | |
640 | ||
bb0ed4ab | 641 | -- d.J Disable parallel SCIL generation. Normally SCIL file generation is |
642 | -- done in parallel to speed processing. This switch disables this | |
643 | -- behavior. | |
11b376d2 | 644 | |
c9e3ee19 | 645 | -- d.L Normally the front end generates special expansion for conditional |
646 | -- expressions of a limited type. This debug flag removes this special | |
647 | -- case expansion, leaving it up to the back end to handle conditional | |
648 | -- expressions correctly. | |
649 | ||
a9cd517c | 650 | -- d.M Relaxed RM semantics. This flag sets Opt.Relaxed_RM_Semantics |
651 | -- See Opt.Relaxed_RM_Semantics for more details. | |
652 | ||
9b8df6be | 653 | -- d.N Enlarge entities by one node (but don't attempt to use this extra |
654 | -- node for storage of any flags or fields). This can be used to do | |
655 | -- experiments on the impact of increasing entity sizes. | |
656 | ||
11b376d2 | 657 | -- d.O Dump internal SCO tables. Before outputting the SCO information to |
658 | -- the ALI file, the internal SCO tables (SCO_Table/SCO_Unit_Table) | |
659 | -- are dumped for debugging purposes. | |
a13923ff | 660 | |
4ecb1318 | 661 | -- d.P Previous non-optimized handling of length comparisons. Setting this |
662 | -- flag inhibits the effect of Optimize_Length_Comparison in Exp_Ch4. | |
663 | -- This is there in case we find a situation where the optimization | |
664 | -- malfunctions, to provide a work around. | |
665 | ||
bd006389 | 666 | -- d.Q Previous incomplete style checks for binary operators. Style checks |
667 | -- for token separation rules were incomplete and have been made | |
668 | -- compliant with the documentation. For example, no warning was | |
669 | -- issued for expressions such as 16-One or "A"&"B". Setting this flag | |
670 | -- inhibits these new checks. | |
671 | ||
aee191ca | 672 | -- d.R As documented in lib-writ.ads, restrictions in the ali file can |
673 | -- have two forms, positional and named. The named notation is the | |
674 | -- current preferred form, but the use of this debug switch will force | |
675 | -- the use of the obsolescent positional form. | |
676 | ||
2253aba6 | 677 | -- d.S Force Optimize_Alignment (Space) mode as the default |
678 | ||
679 | -- d.T Force Optimize_Alignment (Time) mode as the default | |
680 | ||
de2e6464 | 681 | -- d.U Ignore indirect calls for static elaboration. The static |
682 | -- elaboration model is conservative, especially regarding indirect | |
683 | -- calls. If you say Proc'Access, it will assume you might call | |
684 | -- Proc. This can cause elaboration cycles at bind time. This flag | |
eede3b44 | 685 | -- reverts to the behavior of earlier compilers, which ignored |
686 | -- indirect calls. | |
de2e6464 | 687 | |
716383d8 | 688 | -- d.W Print out debugging information for Walk_Library_Items, including |
5682f43c | 689 | -- the order in which units are walked. This is primarily for use in |
690 | -- debugging CodePeer mode. | |
716383d8 | 691 | |
05987af3 | 692 | -- d.X A previous version of GNAT allowed indexing aspects to be |
693 | -- redefined on derived container types, while the default iterator | |
694 | -- was inherited from the aprent type. This non-standard extension | |
695 | -- is preserved temporarily for use by the modelling project under | |
696 | -- debug flag d.X. | |
697 | ||
ec0d4076 | 698 | -- d.Z Normally we always enable expansion in configurable run-time mode |
699 | -- to make sure we get error messages about unsupported features even | |
700 | -- when compiling in -gnatc mode. But expansion is turned off in this | |
701 | -- case if debug flag -gnatd.Z is used. This is to deal with the case | |
702 | -- where we discover difficulties in this new processing. | |
703 | ||
9dfe12ae | 704 | -- d1 Error messages have node numbers where possible. Normally error |
ee6ba406 | 705 | -- messages have only source locations. This option is useful when |
706 | -- debugging errors caused by expanded code, where the source location | |
707 | -- does not give enough information. | |
708 | ||
709 | -- d2 Suppress output of the error position flags for verbose form error | |
710 | -- messages. The messages are still interspersed in the listing, but | |
711 | -- without any error flags or extra blank lines. Also causes an extra | |
712 | -- <<< to be output at the right margin. This is intended to be the | |
9dfe12ae | 713 | -- easiest format for checking conformance of ACATS B tests. This |
714 | -- flag also suppresses the additional messages explaining why a | |
715 | -- non-static expression is non-static (see Sem_Eval.Why_Not_Static). | |
716 | -- This avoids having to worry about these messages in ACATS testing. | |
ee6ba406 | 717 | |
718 | -- d3 Causes Comperr to dump the contents of the node for which an abort | |
719 | -- was detected (normally only the Node_Id of the node is output). | |
720 | ||
721 | -- d4 Inhibits automatic krunching of predefined library unit file names. | |
722 | -- Normally, as described in the spec of package Krunch, such files | |
723 | -- are automatically krunched to 8 characters, with special treatment | |
724 | -- of the prefixes Ada, System, and Interfaces. Setting this debug | |
725 | -- switch disables this special treatment. | |
726 | ||
9dfe12ae | 727 | -- d5 Causes the tree read/write circuit to output detailed information |
728 | -- tracking the data that is read and written element by element. | |
729 | ||
ee6ba406 | 730 | -- d6 Normally access-to-unconstrained-array types are represented |
731 | -- using fat (double) pointers. Using this debug flag causes them | |
732 | -- to default to thin. This can be used to test the performance | |
733 | -- implications of using thin pointers, and also to test that the | |
734 | -- compiler functions correctly with this choice. | |
735 | ||
82b93248 | 736 | -- d7 Normally a -gnatl or -gnatv listing includes the time stamp of the |
737 | -- source file and the time of the compilation. This debug flag can | |
738 | -- be used to suppress this output, and also suppresses the message | |
739 | -- with the version of the compiler. This is useful for regression | |
740 | -- tests which need to have consistent output. | |
ee6ba406 | 741 | |
742 | -- d8 This forces the packed stuff to generate code assuming the | |
743 | -- opposite endianness from the actual correct value. Useful in | |
744 | -- testing out code generation from the packed routines. | |
745 | ||
7a19298b | 746 | -- d9 This allows lock free implementation for protected objects |
747 | -- (see Exp_Ch9). | |
748 | ||
b85b7cb2 | 749 | -- d.1 Enable unnesting of nested procedures. This special pass does not |
750 | -- actually unnest things, but it ensures that a nested procedure | |
751 | -- does not contain any uplevel references. | |
752 | ||
753 | -- d.2 Allow statements within declarative parts. This is not usually | |
754 | -- allowed, but in some debugging contexts (e.g. testing the circuit | |
755 | -- for unnesting of procedures), it is useful to allow this. | |
756 | ||
ee6ba406 | 757 | ------------------------------------------ |
758 | -- Documentation for Binder Debug Flags -- | |
759 | ------------------------------------------ | |
760 | ||
95c751d5 | 761 | -- da Normally if there is an elaboration circularity, then in describing |
762 | -- the cycle, links involving internal units are omitted, since they | |
763 | -- are irrelevant and confusing. This debug flag causes all links to | |
764 | -- be listed, and is useful when diagnosing circularities introduced | |
765 | -- by incorrect changes to the run-time library itself. | |
766 | ||
d0a7d051 | 767 | -- db Output debug information from Better_Choice in Binde, which uses |
768 | -- various heuristics to determine elaboration order in cases where | |
769 | -- multiple orders are valid. | |
770 | ||
ee6ba406 | 771 | -- dc List units as they are chosen. As units are selected for addition to |
772 | -- the elaboration order, a line of output is generated showing which | |
773 | -- unit has been selected. | |
774 | ||
775 | -- de Similar to the effect of -e (output complete list of elaboration | |
776 | -- dependencies) except that internal units are included in the | |
777 | -- listing. | |
778 | ||
752e1833 | 779 | -- di Normally gnatbind calls Read_Ali with Ignore_Errors set to |
780 | -- False, since the binder really needs correct version ALI | |
781 | -- files to do its job. This debug flag causes Ignore_Errors | |
782 | -- mode to be set for the binder (and is particularly useful | |
783 | -- for testing ignore errors mode). | |
784 | ||
ee6ba406 | 785 | -- dn List details of manipulation of Num_Pred values during execution of |
786 | -- the algorithm used to determine a correct order of elaboration. This | |
787 | -- is useful in diagnosing any problems in its behavior. | |
788 | ||
41c0403d | 789 | -- do Use old elaboration order preference. The new preference rules |
790 | -- prefer specs with no bodies to specs with bodies, and between two | |
791 | -- specs with bodies, prefers the one whose body is closer to being | |
792 | -- able to be elaborated. This is a clear improvement, but we provide | |
793 | -- this debug flag in case of regressions. | |
794 | ||
ee6ba406 | 795 | -- du List unit name and file name for each unit as it is read in |
796 | ||
9dfe12ae | 797 | -- dx Force the binder to read (and then ignore) the xref information |
798 | -- in ali files (used to check that read circuit is working OK). | |
799 | ||
4a172c0c | 800 | -------------------------------------------- |
801 | -- Documentation for gnatmake Debug Flags -- | |
802 | -------------------------------------------- | |
ee6ba406 | 803 | |
dc3e0439 | 804 | -- df Only output file names, not path names, in log |
805 | ||
d9f170d4 | 806 | -- dh Generate listing showing loading of name table hash chains, |
807 | -- same as for the compiler. | |
808 | ||
ebce244f | 809 | -- dm Issue a message indicating the maximum number of simultaneous |
810 | -- compilations. | |
9b05f38e | 811 | |
4a172c0c | 812 | -- dn Do not delete temporary files created by gnatmake at the end |
9dfe12ae | 813 | -- of execution, such as temporary config pragma files, mapping |
bf915974 | 814 | -- files or project path files. This debug switch is equivalent to |
815 | -- the standard switch --keep-temp-files. We retain the debug switch | |
816 | -- for back compatibility with past usage. | |
9dfe12ae | 817 | |
ee6ba406 | 818 | -- dp Prints the Q used by routine Make.Compile_Sources every time |
819 | -- we go around the main compile loop of Make.Compile_Sources | |
820 | ||
821 | -- dq Prints source files as they are enqueued and dequeued in the Q | |
822 | -- used by routine Make.Compile_Sources. Useful to figure out the | |
823 | -- order in which sources are recompiled. | |
824 | ||
9dfe12ae | 825 | -- dt When a time stamp mismatch has been found for an ALI file, |
826 | -- display the source file name, the time stamp expected and | |
827 | -- the time stamp found. | |
828 | ||
829 | -- du List unit name and file name for each unit as it is read in | |
830 | ||
ee6ba406 | 831 | -- dw Prints the list of units withed by the unit currently explored |
832 | -- during the main loop of Make.Compile_Sources. | |
833 | ||
4a172c0c | 834 | --------------------------------------------- |
835 | -- Documentation for gprbuild Debug Flags -- | |
836 | --------------------------------------------- | |
837 | ||
3d7b8bee | 838 | -- dm Display the maximum number of simultaneous compilations. |
839 | ||
840 | -- dn Do not delete temporary files created by gprbuild at the end | |
4a172c0c | 841 | -- of execution, such as temporary config pragma files, mapping |
bf915974 | 842 | -- files or project path files. This debug switch is equivalent to |
843 | -- the standard switch --keep-temp-files. We retain the debug switch | |
844 | -- for back compatibility with past usage. | |
4a172c0c | 845 | |
846 | -- dt When a time stamp mismatch has been found for an ALI file, | |
847 | -- display the source file name, the time stamp expected and | |
848 | -- the time stamp found. | |
849 | ||
ee6ba406 | 850 | -------------------- |
851 | -- Set_Debug_Flag -- | |
852 | -------------------- | |
853 | ||
854 | procedure Set_Debug_Flag (C : Character; Val : Boolean := True) is | |
ae4f915b | 855 | subtype Dig is Character range '1' .. '9'; |
ee6ba406 | 856 | subtype LLet is Character range 'a' .. 'z'; |
857 | subtype ULet is Character range 'A' .. 'Z'; | |
858 | ||
859 | begin | |
860 | if C in Dig then | |
861 | case Dig (C) is | |
ae4f915b | 862 | when '1' => |
863 | Debug_Flag_1 := Val; | |
864 | when '2' => | |
865 | Debug_Flag_2 := Val; | |
866 | when '3' => | |
867 | Debug_Flag_3 := Val; | |
868 | when '4' => | |
869 | Debug_Flag_4 := Val; | |
870 | when '5' => | |
871 | Debug_Flag_5 := Val; | |
872 | when '6' => | |
873 | Debug_Flag_6 := Val; | |
874 | when '7' => | |
875 | Debug_Flag_7 := Val; | |
876 | when '8' => | |
877 | Debug_Flag_8 := Val; | |
878 | when '9' => | |
879 | Debug_Flag_9 := Val; | |
ee6ba406 | 880 | end case; |
881 | ||
882 | elsif C in ULet then | |
883 | case ULet (C) is | |
ae4f915b | 884 | when 'A' => |
885 | Debug_Flag_AA := Val; | |
886 | when 'B' => | |
887 | Debug_Flag_BB := Val; | |
888 | when 'C' => | |
889 | Debug_Flag_CC := Val; | |
890 | when 'D' => | |
891 | Debug_Flag_DD := Val; | |
892 | when 'E' => | |
893 | Debug_Flag_EE := Val; | |
894 | when 'F' => | |
895 | Debug_Flag_FF := Val; | |
896 | when 'G' => | |
897 | Debug_Flag_GG := Val; | |
898 | when 'H' => | |
899 | Debug_Flag_HH := Val; | |
900 | when 'I' => | |
901 | Debug_Flag_II := Val; | |
902 | when 'J' => | |
903 | Debug_Flag_JJ := Val; | |
904 | when 'K' => | |
905 | Debug_Flag_KK := Val; | |
906 | when 'L' => | |
907 | Debug_Flag_LL := Val; | |
908 | when 'M' => | |
909 | Debug_Flag_MM := Val; | |
910 | when 'N' => | |
911 | Debug_Flag_NN := Val; | |
912 | when 'O' => | |
913 | Debug_Flag_OO := Val; | |
914 | when 'P' => | |
915 | Debug_Flag_PP := Val; | |
916 | when 'Q' => | |
917 | Debug_Flag_QQ := Val; | |
918 | when 'R' => | |
919 | Debug_Flag_RR := Val; | |
920 | when 'S' => | |
921 | Debug_Flag_SS := Val; | |
922 | when 'T' => | |
923 | Debug_Flag_TT := Val; | |
924 | when 'U' => | |
925 | Debug_Flag_UU := Val; | |
926 | when 'V' => | |
927 | Debug_Flag_VV := Val; | |
928 | when 'W' => | |
929 | Debug_Flag_WW := Val; | |
930 | when 'X' => | |
931 | Debug_Flag_XX := Val; | |
932 | when 'Y' => | |
933 | Debug_Flag_YY := Val; | |
934 | when 'Z' => | |
935 | Debug_Flag_ZZ := Val; | |
ee6ba406 | 936 | end case; |
937 | ||
938 | else | |
939 | case LLet (C) is | |
ae4f915b | 940 | when 'a' => |
941 | Debug_Flag_A := Val; | |
942 | when 'b' => | |
943 | Debug_Flag_B := Val; | |
944 | when 'c' => | |
945 | Debug_Flag_C := Val; | |
946 | when 'd' => | |
947 | Debug_Flag_D := Val; | |
948 | when 'e' => | |
949 | Debug_Flag_E := Val; | |
950 | when 'f' => | |
951 | Debug_Flag_F := Val; | |
952 | when 'g' => | |
953 | Debug_Flag_G := Val; | |
954 | when 'h' => | |
955 | Debug_Flag_H := Val; | |
956 | when 'i' => | |
957 | Debug_Flag_I := Val; | |
958 | when 'j' => | |
959 | Debug_Flag_J := Val; | |
960 | when 'k' => | |
961 | Debug_Flag_K := Val; | |
962 | when 'l' => | |
963 | Debug_Flag_L := Val; | |
964 | when 'm' => | |
965 | Debug_Flag_M := Val; | |
966 | when 'n' => | |
967 | Debug_Flag_N := Val; | |
968 | when 'o' => | |
969 | Debug_Flag_O := Val; | |
970 | when 'p' => | |
971 | Debug_Flag_P := Val; | |
972 | when 'q' => | |
973 | Debug_Flag_Q := Val; | |
974 | when 'r' => | |
975 | Debug_Flag_R := Val; | |
976 | when 's' => | |
977 | Debug_Flag_S := Val; | |
978 | when 't' => | |
979 | Debug_Flag_T := Val; | |
980 | when 'u' => | |
981 | Debug_Flag_U := Val; | |
982 | when 'v' => | |
983 | Debug_Flag_V := Val; | |
984 | when 'w' => | |
985 | Debug_Flag_W := Val; | |
986 | when 'x' => | |
987 | Debug_Flag_X := Val; | |
988 | when 'y' => | |
989 | Debug_Flag_Y := Val; | |
990 | when 'z' => | |
991 | Debug_Flag_Z := Val; | |
ee6ba406 | 992 | end case; |
993 | end if; | |
994 | end Set_Debug_Flag; | |
995 | ||
9dfe12ae | 996 | --------------------------- |
997 | -- Set_Dotted_Debug_Flag -- | |
998 | --------------------------- | |
999 | ||
1000 | procedure Set_Dotted_Debug_Flag (C : Character; Val : Boolean := True) is | |
ae4f915b | 1001 | subtype Dig is Character range '1' .. '9'; |
9dfe12ae | 1002 | subtype LLet is Character range 'a' .. 'z'; |
1003 | subtype ULet is Character range 'A' .. 'Z'; | |
1004 | ||
1005 | begin | |
1006 | if C in Dig then | |
1007 | case Dig (C) is | |
ae4f915b | 1008 | when '1' => |
1009 | Debug_Flag_Dot_1 := Val; | |
1010 | when '2' => | |
1011 | Debug_Flag_Dot_2 := Val; | |
1012 | when '3' => | |
1013 | Debug_Flag_Dot_3 := Val; | |
1014 | when '4' => | |
1015 | Debug_Flag_Dot_4 := Val; | |
1016 | when '5' => | |
1017 | Debug_Flag_Dot_5 := Val; | |
1018 | when '6' => | |
1019 | Debug_Flag_Dot_6 := Val; | |
1020 | when '7' => | |
1021 | Debug_Flag_Dot_7 := Val; | |
1022 | when '8' => | |
1023 | Debug_Flag_Dot_8 := Val; | |
1024 | when '9' => | |
1025 | Debug_Flag_Dot_9 := Val; | |
9dfe12ae | 1026 | end case; |
1027 | ||
1028 | elsif C in ULet then | |
1029 | case ULet (C) is | |
ae4f915b | 1030 | when 'A' => |
1031 | Debug_Flag_Dot_AA := Val; | |
1032 | when 'B' => | |
1033 | Debug_Flag_Dot_BB := Val; | |
1034 | when 'C' => | |
1035 | Debug_Flag_Dot_CC := Val; | |
1036 | when 'D' => | |
1037 | Debug_Flag_Dot_DD := Val; | |
1038 | when 'E' => | |
1039 | Debug_Flag_Dot_EE := Val; | |
1040 | when 'F' => | |
1041 | Debug_Flag_Dot_FF := Val; | |
1042 | when 'G' => | |
1043 | Debug_Flag_Dot_GG := Val; | |
1044 | when 'H' => | |
1045 | Debug_Flag_Dot_HH := Val; | |
1046 | when 'I' => | |
1047 | Debug_Flag_Dot_II := Val; | |
1048 | when 'J' => | |
1049 | Debug_Flag_Dot_JJ := Val; | |
1050 | when 'K' => | |
1051 | Debug_Flag_Dot_KK := Val; | |
1052 | when 'L' => | |
1053 | Debug_Flag_Dot_LL := Val; | |
1054 | when 'M' => | |
1055 | Debug_Flag_Dot_MM := Val; | |
1056 | when 'N' => | |
1057 | Debug_Flag_Dot_NN := Val; | |
1058 | when 'O' => | |
1059 | Debug_Flag_Dot_OO := Val; | |
1060 | when 'P' => | |
1061 | Debug_Flag_Dot_PP := Val; | |
1062 | when 'Q' => | |
1063 | Debug_Flag_Dot_QQ := Val; | |
1064 | when 'R' => | |
1065 | Debug_Flag_Dot_RR := Val; | |
1066 | when 'S' => | |
1067 | Debug_Flag_Dot_SS := Val; | |
1068 | when 'T' => | |
1069 | Debug_Flag_Dot_TT := Val; | |
1070 | when 'U' => | |
1071 | Debug_Flag_Dot_UU := Val; | |
1072 | when 'V' => | |
1073 | Debug_Flag_Dot_VV := Val; | |
1074 | when 'W' => | |
1075 | Debug_Flag_Dot_WW := Val; | |
1076 | when 'X' => | |
1077 | Debug_Flag_Dot_XX := Val; | |
1078 | when 'Y' => | |
1079 | Debug_Flag_Dot_YY := Val; | |
1080 | when 'Z' => | |
1081 | Debug_Flag_Dot_ZZ := Val; | |
9dfe12ae | 1082 | end case; |
1083 | ||
1084 | else | |
1085 | case LLet (C) is | |
ae4f915b | 1086 | when 'a' => |
1087 | Debug_Flag_Dot_A := Val; | |
1088 | when 'b' => | |
1089 | Debug_Flag_Dot_B := Val; | |
1090 | when 'c' => | |
1091 | Debug_Flag_Dot_C := Val; | |
1092 | when 'd' => | |
1093 | Debug_Flag_Dot_D := Val; | |
1094 | when 'e' => | |
1095 | Debug_Flag_Dot_E := Val; | |
1096 | when 'f' => | |
1097 | Debug_Flag_Dot_F := Val; | |
1098 | when 'g' => | |
1099 | Debug_Flag_Dot_G := Val; | |
1100 | when 'h' => | |
1101 | Debug_Flag_Dot_H := Val; | |
1102 | when 'i' => | |
1103 | Debug_Flag_Dot_I := Val; | |
1104 | when 'j' => | |
1105 | Debug_Flag_Dot_J := Val; | |
1106 | when 'k' => | |
1107 | Debug_Flag_Dot_K := Val; | |
1108 | when 'l' => | |
1109 | Debug_Flag_Dot_L := Val; | |
1110 | when 'm' => | |
1111 | Debug_Flag_Dot_M := Val; | |
1112 | when 'n' => | |
1113 | Debug_Flag_Dot_N := Val; | |
1114 | when 'o' => | |
1115 | Debug_Flag_Dot_O := Val; | |
1116 | when 'p' => | |
1117 | Debug_Flag_Dot_P := Val; | |
1118 | when 'q' => | |
1119 | Debug_Flag_Dot_Q := Val; | |
1120 | when 'r' => | |
1121 | Debug_Flag_Dot_R := Val; | |
1122 | when 's' => | |
1123 | Debug_Flag_Dot_S := Val; | |
1124 | when 't' => | |
1125 | Debug_Flag_Dot_T := Val; | |
1126 | when 'u' => | |
1127 | Debug_Flag_Dot_U := Val; | |
1128 | when 'v' => | |
1129 | Debug_Flag_Dot_V := Val; | |
1130 | when 'w' => | |
1131 | Debug_Flag_Dot_W := Val; | |
1132 | when 'x' => | |
1133 | Debug_Flag_Dot_X := Val; | |
1134 | when 'y' => | |
1135 | Debug_Flag_Dot_Y := Val; | |
1136 | when 'z' => | |
1137 | Debug_Flag_Dot_Z := Val; | |
9dfe12ae | 1138 | end case; |
1139 | end if; | |
1140 | end Set_Dotted_Debug_Flag; | |
1141 | ||
ee6ba406 | 1142 | end Debug; |