libstdc++: Fix find_last_set(simd_mask) to ignore padding bits
[official-gcc.git] / gcc / ada / debug.adb
blobf7fcd399769a85c2beed961fb0435135d61434a6
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- D E B U G --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2024, Free Software Foundation, Inc. --
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- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
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 --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
20 -- --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
23 -- --
24 ------------------------------------------------------------------------------
26 package body Debug is
28 ---------------------------------
29 -- Summary of Debug Flag Usage --
30 ---------------------------------
32 -- Debug flags for compiler (GNAT1)
34 -- da Generate messages tracking semantic analyzer progress
35 -- db Show encoding of type names for debug output
36 -- dc List names of units as they are compiled
37 -- dd Dynamic allocation of tables messages generated
38 -- de List the entity table
39 -- df Full tree/source print (includes withed units)
40 -- dg Print source from tree (generated code only)
41 -- dh Generate listing showing loading of name table hash chains
42 -- di Generate messages for visibility linking/delinking
43 -- dj Suppress "junk null check" for access parameter values
44 -- dk Generate "GNAT BUG" message on abort, even if previous errors
45 -- dl Generate unit load trace messages
46 -- dm Prevent special frontend inlining in GNATprove mode
47 -- dn Generate messages for node/list allocation
48 -- do Print source from tree (original code only)
49 -- dp Generate messages for parser scope stack push/pops
50 -- dq No auto-alignment of small records
51 -- dr Generate parser resynchronization messages
52 -- ds Print source from tree (including original and generated stuff)
53 -- dt Print full tree
54 -- du Uncheck categorization pragmas
55 -- dv Output trace of overload resolution
56 -- dw Print trace of semantic scope stack
57 -- dx Force expansion on, even if no code being generated
58 -- dy Print tree of package Standard
59 -- dz Print source of package Standard
61 -- dA All entities included in representation information output
62 -- dB Output debug encoding of type names and variants
63 -- dC Output debugging information on check suppression
64 -- dD Delete elaboration checks in inner level routines
65 -- dE Apply elaboration checks to predefined units
66 -- dF Alternative display for messages over multiple lines
67 -- dG Generate all warnings including those normally suppressed
68 -- dH Hold (kill) call to gigi
69 -- dI Inhibit internal name numbering in gnatG listing
70 -- dK Kill all error messages
71 -- dL Ignore external calls from instances for elaboration
72 -- dM Assume all variables are modified (no current values)
73 -- dN No file name information in exception messages
74 -- dO Output immediate error messages
75 -- dP Do not check for controlled objects in preelaborable packages
76 -- dQ
77 -- dR Bypass check for correct version of s-rpc
78 -- dS Never convert numbers to machine numbers in Sem_Eval
79 -- dT Convert to machine numbers only for constant declarations
80 -- dU Enable garbage collection of unreachable entities
81 -- dV Enable viewing of all symbols in debugger
82 -- dW Disable warnings on calls for IN OUT parameters
83 -- dX Display messages on reads of potentially uninitialized scalars
84 -- dY Enable configurable run-time mode
85 -- dZ Generate listing showing the contents of the dispatch tables
87 -- d.a Force Target_Strict_Alignment mode to True
88 -- d.b Dump backend types
89 -- d.c Generate inline concatenation, do not call procedure
90 -- d.d Disable atomic synchronization
91 -- d.e Enable atomic synchronization
92 -- d.f Inhibit folding of static expressions
93 -- d.g Enable conversion of raise into goto
94 -- d.h Minimize the creation of public internal symbols for concatenation
95 -- d.i Ignore Warnings pragmas
96 -- d.j Generate listing of frontend inlined calls
97 -- d.k Kill referenced run-time library unit line numbers
98 -- d.l Use Ada 95 semantics for limited function returns
99 -- d.m For -gnatl, print full source only for main unit
100 -- d.n Print source file names
101 -- d.o Conservative elaboration order for indirect calls
102 -- d.p Use original Ada 95 semantics for Bit_Order (disable AI95-0133)
103 -- d.q Suppress optimizations on imported 'in'
104 -- d.r Disable reordering of components in record types
105 -- d.s Strict secondary stack management
106 -- d.t Disable static allocation of library level dispatch tables
107 -- d.u Enable Modify_Tree_For_C (update tree for c)
108 -- d.v Enforce SPARK elaboration rules in SPARK code
109 -- d.w Do not check for infinite loops
110 -- d.x No exception handlers
111 -- d.y Disable implicit pragma Elaborate_All on task bodies
112 -- d.z Restore previous support for frontend handling of Inline_Always
114 -- d.A Enable statistics printing in Atree
115 -- d.B Generate a "GNAT BUG" message on abort_statement
116 -- d.C Generate concatenation call, do not generate inline code
117 -- d.D Disable errors on use of overriding keyword in Ada 95 mode
118 -- d.E Turn selected errors into warnings
119 -- d.F Debug mode for GNATprove
120 -- d.G Ignore calls through generic formal parameters for elaboration
121 -- d.H Disable the support for 128-bit integer types on 64-bit platforms
122 -- d.I Do not ignore enum representation clauses in CodePeer mode
123 -- d.J Relaxed rules for pragma No_Return
124 -- d.K Do not reject components in extensions overlapping with parent
125 -- d.M Relaxed RM semantics
126 -- d.N Use rounding when converting from floating point to fixed point
127 -- d.O Dump internal SCO tables
128 -- d.P Previous (non-optimized) handling of length comparisons
129 -- d.Q Previous (incomplete) style check for binary operators
130 -- d.R Restrictions in ali files in positional form
131 -- d.S Force Optimize_Alignment (Space)
132 -- d.T Force Optimize_Alignment (Time)
133 -- d.U Ignore indirect calls for static elaboration
134 -- d.V Do not verify validity of SCIL files (CodePeer mode)
135 -- d.W Print out debugging information for Walk_Library_Items
136 -- d.X Old treatment of indexing aspects
137 -- d.Y
138 -- d.Z Do not enable expansion in configurable run-time mode
140 -- d_a Stop elaboration checks on accept or select statement
141 -- d_b Use designated type model under No_Dynamic_Accessibility_Checks
142 -- d_c CUDA compilation : compile for the host
143 -- d_d CUDA compilation : compile for the device
144 -- d_e Ignore entry calls and requeue statements for elaboration
145 -- d_f Issue info messages related to GNATprove usage
146 -- d_g Disable large static aggregates
147 -- d_h Disable the use of (perfect) hash functions for enumeration Value
148 -- d_i Ignore activations and calls to instances for elaboration
149 -- d_j Read JSON files and populate Repinfo tables (opposite of -gnatRjs)
150 -- d_k In CodePeer mode disable expansion of assertion checks
151 -- d_l Disable strict alignment of array types with aliased component
152 -- d_m
153 -- d_n
154 -- d_o
155 -- d_p Ignore assertion pragmas for elaboration
156 -- d_q
157 -- d_r Disable the use of the return slot in functions
158 -- d_s Stop elaboration checks on synchronous suspension
159 -- d_t In LLVM-based CCG, dump LLVM IR after transformations are done
160 -- d_u In LLVM-based CCG, dump flows
161 -- d_v Enable additional checks and debug printouts in Atree
162 -- d_w In LLVM-based CCG, don't send front end data to CCG
163 -- d_x Disable inline expansion of Image attribute for enumeration types
164 -- d_y
165 -- d_z
167 -- d_A Stop generation of ALI file
168 -- d_B Warn on build-in-place function calls
169 -- d_C
170 -- d_D
171 -- d_E
172 -- d_F Encode full invocation paths in ALI files
173 -- d_G
174 -- d_H
175 -- d_I
176 -- d_J
177 -- d_K (Reserved) Enable reporting a warning on known-problem issues
178 -- d_L Output trace information on elaboration checking
179 -- d_M
180 -- d_N
181 -- d_O
182 -- d_P
183 -- d_Q
184 -- d_R For LLVM, dump the representation of records
185 -- d_S
186 -- d_T Output trace information on invocation path recording
187 -- d_U Disable prepending messages with "error:".
188 -- d_V Enable verifications on the expanded tree
189 -- d_W
190 -- d_X Disable assertions to check matching of extra formals
191 -- d_Y
192 -- d_Z
194 -- d1 Error msgs have node numbers where possible
195 -- d2 Eliminate error flags in verbose form error messages
196 -- d3 Dump bad node in Comperr on an abort
197 -- d4 Inhibit automatic krunch of predefined library unit files
198 -- d5 Debug output for tree read/write
199 -- d6 Default access unconstrained to thin pointers
200 -- d7 Suppress version/source stamp/compilation time for -gnatv/-gnatl
201 -- d8 Force opposite endianness in packed stuff
202 -- d9
204 -- d.1 Enable unnesting of nested procedures
205 -- d.2 Allow statements in declarative part
206 -- d.3 Output debugging information from Exp_Unst
207 -- d.4 Do not delete generated C file in case of errors
208 -- d.5 Do not generate imported subprogram definitions in C code
209 -- d.6 Do not avoid declaring unreferenced types in C code
210 -- d.7 Disable unsound heuristics in gnat2scil (for CP as SPARK prover)
211 -- d.8 Disable unconditional inlining of expression functions
212 -- d.9
214 -- d_1
215 -- d_2
216 -- d_3
217 -- d_4
218 -- d_5
219 -- d_6
220 -- d_7
221 -- d_8
222 -- d_9
224 -- Debug flags for binder (GNATBIND)
226 -- da All links (including internal units) listed if there is a cycle
227 -- db Output information from Better_Choice
228 -- dc List units as they are chosen
229 -- dd
230 -- de Elaboration dependencies including system units
231 -- df
232 -- dg
233 -- dh
234 -- di Ignore_Errors mode for reading ali files
235 -- dj
236 -- dk
237 -- dl
238 -- dm
239 -- dn List details of manipulation of Num_Pred values
240 -- do Use older preference for elaboration order
241 -- dp Use old preference for elaboration order
242 -- dq
243 -- dr
244 -- ds
245 -- dt
246 -- du List units as they are acquired
247 -- dv Verbose debugging printouts
248 -- dw
249 -- dx Force binder to read xref information from ali files
250 -- dy
251 -- dz
253 -- dA
254 -- dB
255 -- dC
256 -- dD
257 -- dE
258 -- dF
259 -- dG
260 -- dH
261 -- dI
262 -- dJ
263 -- dK
264 -- dL
265 -- dM
266 -- dN
267 -- dO
268 -- dP
269 -- dQ
270 -- dR
271 -- dS
272 -- dT
273 -- dU
274 -- dV
275 -- dW
276 -- dX
277 -- dY
278 -- dZ
280 -- d.a
281 -- d.b
282 -- d.c
283 -- d.d
284 -- d.e
285 -- d.f
286 -- d.g
287 -- d.h
288 -- d.i
289 -- d.j
290 -- d.k
291 -- d.l
292 -- d.m
293 -- d.n
294 -- d.o
295 -- d.p
296 -- d.q
297 -- d.r
298 -- d.s
299 -- d.t
300 -- d.u
301 -- d.v
302 -- d.w
303 -- d.x
304 -- d.y
305 -- d.z
307 -- d.A
308 -- d.B
309 -- d.C
310 -- d.D
311 -- d.E
312 -- d.F
313 -- d.G
314 -- d.H
315 -- d.I
316 -- d.J
317 -- d.K
318 -- d.L
319 -- d.M
320 -- d.N
321 -- d.O
322 -- d.P
323 -- d.Q
324 -- d.R
325 -- d.S
326 -- d.T
327 -- d.U
328 -- d.V
329 -- d.W
330 -- d.X
331 -- d.Y
332 -- d.Z
334 -- d.1
335 -- d.2
336 -- d.3
337 -- d.4
338 -- d.5
339 -- d.6
340 -- d.7
341 -- d.8
342 -- d.9
344 -- d_a Ignore the effects of pragma Elaborate_All
345 -- d_b Ignore the effects of pragma Elaborate_Body
346 -- d_c CUDA compilation : compile/bind for the host
347 -- d_d CUDA compilation : compile/bind for the device
348 -- d_e Ignore the effects of pragma Elaborate
349 -- d_f
350 -- d_g
351 -- d_h
352 -- d_i
353 -- d_j
354 -- d_k
355 -- d_l
356 -- d_m
357 -- d_n
358 -- d_o
359 -- d_p
360 -- d_q
361 -- d_r
362 -- d_s
363 -- d_t Output cycle-detection trace information
364 -- d_u
365 -- d_v
366 -- d_w
367 -- d_x
368 -- d_y
369 -- d_z
371 -- d_A Output ALI invocation tables
372 -- d_B
373 -- d_C Diagnose all cycles
374 -- d_D
375 -- d_E
376 -- d_F
377 -- d_G
378 -- d_H
379 -- d_I Output invocation graph
380 -- d_J
381 -- d_K
382 -- d_L Output library graph
383 -- d_M
384 -- d_N
385 -- d_O
386 -- d_P Output cycle paths
387 -- d_Q
388 -- d_R
389 -- d_S Output elaboration-order status
390 -- d_T Output elaboration-order trace information
391 -- d_U
392 -- d_V Validate bindo cycles, graphs, and order
393 -- d_W
394 -- d_X
395 -- d_Y
396 -- d_Z
398 -- d_1
399 -- d_2
400 -- d_3
401 -- d_4
402 -- d_5
403 -- d_6
404 -- d_7
405 -- d_8
406 -- d_9
408 -- Debug flags used in package Make and its clients (e.g. GNATMAKE)
410 -- da
411 -- db
412 -- dc
413 -- dd
414 -- de
415 -- df Only output file names, not path names, in log
416 -- dg
417 -- dh Generate listing showing loading of name table hash chains
418 -- di
419 -- dj
420 -- dk
421 -- dl
422 -- dm Display the number of maximum simultaneous compilations
423 -- dn Do not delete temp files created by gnatmake
424 -- do
425 -- dp Prints the contents of the Q used by Make.Compile_Sources
426 -- dq Prints source files as they are enqueued and dequeued
427 -- dr
428 -- ds
429 -- dt Display time stamps when there is a mismatch
430 -- du List units as their ali files are acquired
431 -- dv
432 -- dw Prints the list of units withed by the unit currently explored
433 -- dx
434 -- dy
435 -- dz
437 --------------------------------------------
438 -- Documentation for Compiler Debug Flags --
439 --------------------------------------------
441 -- da Generate messages tracking semantic analyzer progress. A message
442 -- is output showing each node as it gets analyzed, expanded,
443 -- resolved, or evaluated. This option is useful for finding out
444 -- exactly where a bomb during semantic analysis is occurring.
446 -- db In Exp_Dbug, certain type names are encoded to include debugging
447 -- information. This debug switch causes lines to be output showing
448 -- the encodings used.
450 -- dc List names of units as they are compiled. One line of output will
451 -- be generated at the start of compiling each unit (package or
452 -- subprogram).
454 -- dd Dynamic allocation of tables messages generated. Each time a
455 -- table is reallocated, a line is output indicating the expansion.
457 -- de List the entity table
459 -- df Full tree/source print (includes withed units). Normally the tree
460 -- output (dt) or recreated source output (dg,do,ds) includes only
461 -- the main unit. If df is set, then the output in either case
462 -- includes all compiled units (see also dg,do,ds,dt). Note that to
463 -- be effective, this switch must be used in combination with one or
464 -- more of dt, dg, do or ds.
466 -- dg Print the source recreated from the generated tree. In the case
467 -- where the tree has been rewritten this output includes only the
468 -- generated code, not the original code (see also df,do,ds,dz).
469 -- This flag differs from -gnatG in that the output also includes
470 -- non-source generated null statements, and freeze nodes, which
471 -- are normally omitted in -gnatG mode.
473 -- dh Generates a table at the end of a compilation showing how the hash
474 -- table chains built by the Namet package are loaded. This is useful
475 -- in ensuring that the hashing algorithm (in Namet.Hash) is working
476 -- effectively with typical sets of program identifiers.
478 -- di Generate messages for visibility linking/delinking
480 -- dj Suppress "junk null check" for access parameters. This flag permits
481 -- Ada programs to pass null parameters to access parameters, and to
482 -- explicitly check such access values against the null literal.
483 -- Neither of these is valid Ada, but both were allowed in versions of
484 -- GNAT before 3.10, so this switch can ease the transition process.
486 -- dk Immediate kill on abort. Normally on an abort (i.e. a call to
487 -- Comperr.Compiler_Abort), the "GNAT BUG" message is not given if
488 -- there is a previous error. Instead, the message "compilation
489 -- abandoned due to previous error" is given. This debug switch
490 -- bypasses this test and gives the "GNAT BUG" message unconditionally
491 -- (useful for debugging). Use -gnatdO in addition to see the previous
492 -- errors.
494 -- dl Generate unit load trace messages. A line of traceback output is
495 -- generated each time a request is made to the library manager to
496 -- load a new unit.
498 -- dm Prevent special frontend inlining in GNATprove mode. In some cases,
499 -- some subprogram calls are inlined in GNATprove mode in order to
500 -- facilitate formal verification. This debug switch prevents that
501 -- inlining to happen.
503 -- dn Generate messages for node/list allocation. Each time a node or
504 -- list header is allocated, a line of output is generated. Certain
505 -- other basic tree operations also cause a line of output to be
506 -- generated. This option is useful in seeing where the parser is
507 -- blowing up.
509 -- do Print the source recreated from the generated tree. In the case
510 -- where the tree has been rewritten, this output includes only the
511 -- original code, not the generated code (see also df,dg,ds,dz).
513 -- dp Generate messages for parser scope stack push/pops. A line of
514 -- output by the parser each time the parser scope stack is either
515 -- pushed or popped. Useful in debugging situations where the
516 -- parser scope stack ends up incorrectly synchronized
518 -- dq In layout version 1.38, 2002/01/12, a circuit was implemented
519 -- to give decent default alignment to short records that had no
520 -- specific alignment set. This debug option restores the previous
521 -- behavior of giving such records poor alignments, typically 1.
522 -- This may be useful in dealing with transition.
524 -- dr Generate parser resynchronization messages. Normally the parser
525 -- resynchronizes quietly. With this debug option, two messages
526 -- are generated, one when the parser starts a resynchronization
527 -- skip, and another when it resumes parsing. Useful in debugging
528 -- inadequate error recovery situations.
530 -- ds Print the source recreated from the generated tree. In the case
531 -- where the tree has been rewritten this output includes both the
532 -- generated code and the original code with the generated code
533 -- being enlosed in curly brackets (see also df,do,ds,dz)
535 -- dt Print full tree. The generated tree is output (see also df,dy)
537 -- du Uncheck categorization pragmas. This debug switch causes the
538 -- elaboration control pragmas (Pure, Preelaborate, etc.) and the
539 -- categorization pragmas (Shared_Passive, Remote_Types, etc.) to be
540 -- ignored, so that normal checks are not made (this is particularly
541 -- useful for adding temporary debugging code to units that have
542 -- pragmas that are inconsistent with the debugging code added).
544 -- dv Output trace of overload resolution. Outputs messages for
545 -- overload attempts that involve cascaded errors, or where
546 -- an interpretation is incompatible with the context.
548 -- dw Write semantic scope stack messages. Each time a scope is created
549 -- or removed, a message is output (see the Sem_Ch8.Push_Scope and
550 -- Sem_Ch8.Pop_Scope subprograms).
552 -- dx Force expansion on, even if no code being generated. Normally the
553 -- expander is inhibited if no code is generated. This switch forces
554 -- expansion to proceed normally even if the backend is not being
555 -- called. This is particularly useful for debugging purposes when
556 -- using the front-end only version of the compiler (which normally
557 -- would never do any expansion).
559 -- dy Print tree of package Standard. Normally the tree print out does
560 -- not include package Standard, even if the -df switch is set. This
561 -- switch forces output of the internal tree built for Standard.
563 -- dz Print source of package Standard. Normally the source print out
564 -- does not include package Standard, even if the -df switch is set.
565 -- This switch forces output of the source recreated from the internal
566 -- tree built for Standard. Note that this differs from -gnatS in
567 -- that it prints from the actual tree using the normal Sprint
568 -- circuitry for printing trees.
570 -- dA Forces output of representation information, including full
571 -- information for all internal type and object entities, as well
572 -- as all user defined type and object entities including private
573 -- and incomplete types. This debug switch also automatically sets
574 -- the equivalent of -gnatRm.
576 -- dB Output debug encodings for types and variants. See Exp_Dbug for
577 -- exact form of the generated output.
579 -- dC Output trace information showing the decisions made during
580 -- check suppression activity in unit Checks.
582 -- dD Delete new elaboration checks. This flag causes GNAT to return
583 -- to the 3.13a elaboration semantics, and to suppress the fixing
584 -- of two bugs. The first is in the context of inner routines in
585 -- dynamic elaboration mode, when the subprogram we are in was
586 -- called at elaboration time by a unit that was also compiled with
587 -- dynamic elaboration checks. In this case, if A calls B calls C,
588 -- and all are in different units, we need an elaboration check at
589 -- each call. These nested checks were only put in recently (see
590 -- version 1.80 of Sem_Elab) and we provide this debug flag to
591 -- revert to the previous behavior in case of regressions. The
592 -- other behavior reverted by this flag is the treatment of the
593 -- Elaborate_Body pragma in static elaboration mode. This used to
594 -- be treated as not needing elaboration checking, but in fact in
595 -- general Elaborate_All is still required because of nested calls.
597 -- dE Apply compile time elaboration checking for with relations between
598 -- predefined units. Normally no checks are made.
600 -- dG Generate all warnings. Normally Errout suppresses warnings on
601 -- units that are not part of the main extended source, and also
602 -- suppresses warnings on instantiations in the main extended
603 -- source that duplicate warnings already posted on the template.
604 -- This switch stops both kinds of deletion and causes Errout to
605 -- post all warnings sent to it.
607 -- dH Inhibit call to gigi. This is useful for testing front end data
608 -- layout, and may be useful in other debugging situations where
609 -- you do not want gigi to intefere with the testing.
611 -- dI Inhibit internal name numbering in gnatDG listing. Any sequence of
612 -- the form <uppercase-letter><digits><lowercase-letter> appearing in
613 -- a name is replaced by <uppercase-letter>...<lowercase-letter>. This
614 -- is used in the fixed bugs run to minimize system and version
615 -- dependency in filed -gnatD or -gnatG output.
617 -- dK Kill all error messages. This debug flag suppresses the output
618 -- of all error messages. It is used in regression tests where the
619 -- error messages are target dependent and irrelevant.
621 -- dL The compiler ignores calls in instances and invoke subprograms
622 -- which are external to the instance for both the static and dynamic
623 -- elaboration models.
625 -- dM Assume all variables have been modified, and ignore current value
626 -- indications. This debug flag disconnects the tracking of constant
627 -- values (see Exp_Ch2.Expand_Current_Value).
629 -- dN Do not generate file name information in exception messages
631 -- dO Output immediate error messages. This causes error messages to
632 -- be output as soon as they are generated (disconnecting several
633 -- circuits for improvement of messages, deletion of duplicate
634 -- messages etc). Useful to diagnose compiler bombs caused by
635 -- erroneous handling of error situations
637 -- dP Do not check for controlled objects in preelaborable packages.
638 -- RM 10.2.1(9) forbids the use of library level controlled objects
639 -- in preelaborable packages, but this restriction is a huge pain,
640 -- especially in the predefined library units.
642 -- dR Bypass the check for a proper version of s-rpc being present
643 -- to use the -gnatz? switch. This allows debugging of the use
644 -- of stubs generation without needing to have GLADE (or some
645 -- other PCS installed).
647 -- dS Omit conversion of fpt numbers to exact machine numbers in
648 -- non-static evaluation contexts (see Check_Non_Static_Context).
649 -- This is intended for testing out timing problems with this
650 -- conversion circuit.
652 -- dT Similar to dS, but omits the conversions only in the case where
653 -- the parent is not a constant declaration.
655 -- dU Enable garbage collection of unreachable entities. This enables
656 -- both the reachability analysis and changing the Is_Public and
657 -- Is_Eliminated flags.
659 -- dV Enable viewing of all symbols in debugger. Causes debug information
660 -- to be generated for all symbols, including internal symbols. This
661 -- is enabled by default for -gnatD, but this switch allows this to
662 -- be enabled without generating modified source files. Note that the
663 -- use of -gnatdV ensures in the dwarf/elf case that all symbols that
664 -- are present in the elf tables are also in the dwarf tables (which
665 -- seems to be required by some tools). Another effect of dV is to
666 -- generate full qualified names, including internal names generated
667 -- for blocks and loops.
669 -- dW Disable warnings when a possibly uninitialized scalar value is
670 -- passed to an IN OUT parameter of a procedure. This usage is a
671 -- quite improper bounded error [erroneous in Ada 83] situation,
672 -- and would normally generate a warning. However, to ease the
673 -- task of transitioning incorrect legacy code, we provide this
674 -- undocumented feature for suppressing these warnings.
676 -- dY Enable configurable run-time mode, just as though the System file
677 -- had Configurable_Run_Time_Mode set to True. This is useful in
678 -- testing high integrity mode.
680 -- dZ Generate listing showing the contents of the dispatch tables. Each
681 -- line has an internally generated number used for references between
682 -- tagged types and primitives. For each primitive the output has the
683 -- following fields:
685 -- - Letter 'P' or letter 's': The former indicates that this
686 -- primitive will be located in a primary dispatch table. The
687 -- latter indicates that it will be located in a secondary
688 -- dispatch table.
690 -- - Name of the primitive. In case of predefined Ada primitives
691 -- the text "(predefined)" is added before the name, and these
692 -- acronyms are used: SR (Stream_Read), SW (Stream_Write), SI
693 -- (Stream_Input), SO (Stream_Output), DA (Deep_Adjust), DF
694 -- (Deep_Finalize). In addition Oeq identifies the equality
695 -- operator, and "_assign" the assignment.
697 -- - If the primitive covers interface types, two extra fields
698 -- referencing other primitives are generated: "Alias" references
699 -- the primitive of the tagged type that covers an interface
700 -- primitive, and "AI_Alias" references the covered interface
701 -- primitive.
703 -- - The expression "at #xx" indicates the slot of the dispatch
704 -- table occupied by such primitive in its corresponding primary
705 -- or secondary dispatch table.
707 -- - In case of abstract subprograms the text "is abstract" is
708 -- added at the end of the line.
710 -- d.a Force Target_Strict_Alignment to True, even on targets where it
711 -- would normally be false. Can be used for testing strict alignment
712 -- circuitry in the compiler.
714 -- d.b Dump back end types. During Create_Standard, the back end is
715 -- queried for all available types. This option shows them.
717 -- d.c Generate inline concatenation, instead of calling one of the
718 -- System.Concat_n.Str_Concat_n routines in cases where the latter
719 -- routines would normally be called.
721 -- d.d Disable atomic synchronization for all atomic variable references.
722 -- Pragma Enable_Atomic_Synchronization is ignored.
724 -- d.e Enable atomic synchronization for all atomic variable references.
725 -- Pragma Disable_Atomic_Synchronization is ignored, and also the
726 -- compiler switch -gnated is ignored.
728 -- d.f Suppress folding of static expressions. This of course results
729 -- in seriously non-conforming behavior, but is useful sometimes
730 -- when tracking down handling of complex expressions.
732 -- d.g Enables conversion of a raise statement into a goto when the
733 -- relevant handler is statically determinable. For now we only try
734 -- this if this debug flag is set. Later we will enable this more
735 -- generally by default.
737 -- d.h Minimize the creation of public internal symbols for concatenation
738 -- by enforcing a secondary stack-like handling of the final result.
739 -- The target of the concatenation is thus constrained in place and
740 -- initialized with the result instead of acting as its alias.
742 -- d.i Ignore all occurrences of pragma Warnings in the sources. This can
743 -- be used in particular to disable Warnings (Off) to check if any of
744 -- these statements are inappropriate.
746 -- d.k If an error message contains a reference to a location in an
747 -- internal unit, then suppress the line number in this reference.
749 -- d.j Generate listing of frontend inlined calls and inline calls passed
750 -- to the backend. This is useful to locate skipped calls that must be
751 -- inlined by the frontend.
753 -- d.l Use Ada 95 semantics for limited function returns. This may be
754 -- used to work around the incompatibility introduced by AI-318-2.
755 -- It is useful only in Ada 2005 and later.
757 -- d.m When -gnatl is used, the normal output includes full listings of
758 -- all files in the extended main source (body/spec/subunits). If this
759 -- debug switch is used, then the full listing is given only for the
760 -- main source (this corresponds to a previous behavior of -gnatl and
761 -- is used for running the ACATS tests).
763 -- d.n Print source file names as they are loaded. This is useful if the
764 -- compiler has a bug -- these are the files that need to be included
765 -- in a bug report.
767 -- d.o Conservative elaboration order for indirect calls. This causes
768 -- P'Access to be treated as a call in more cases.
770 -- d.p In Ada 95 (or 83) mode, use original Ada 95 behavior for the
771 -- interpretation of component clauses crossing byte boundaries when
772 -- using the non-default bit order (i.e. ignore AI95-0133).
774 -- d.q If an array variable or constant is not modified in Ada code, and
775 -- is passed to an 'in' parameter of a foreign-convention subprogram,
776 -- and that subprogram modifies the array, the Ada compiler normally
777 -- assumes that the array is not modified. This option suppresses such
778 -- optimizations. This option should not be used; the correct solution
779 -- is to declare the parameter 'in out'.
781 -- d.r Do not reorder components in record types.
783 -- d.s The compiler no longer attempts to optimize the calls to secondary
784 -- stack management routines SS_Mark and SS_Release. As a result, each
785 -- transient block tasked with secondary stack management will fulfill
786 -- its role unconditionally.
788 -- d.s The compiler does not generate calls to secondary stack management
789 -- routines SS_Mark and SS_Release for a transient block when there is
790 -- an enclosing scoping construct which already manages the secondary
791 -- stack.
793 -- d.t The compiler has been modified (a fairly extensive modification)
794 -- to generate static dispatch tables for library level tagged types.
795 -- This debug switch disables this modification and reverts to the
796 -- previous dynamic construction of tables. It is there as a possible
797 -- work around if we run into trouble with the new implementation.
799 -- d.u Sets Modify_Tree_For_C mode in which tree is modified to make it
800 -- easier to generate code using a C compiler.
802 -- d.v This flag enforces the elaboration rules defined in the SPARK
803 -- Reference Manual, chapter 7.7, to all SPARK code within a unit. As
804 -- a result, constructs which violate the rules in chapter 7.7 are no
805 -- longer accepted, even if the implementation is able to statically
806 -- ensure that accepting these constructs does not introduce the
807 -- possibility of failing an elaboration check.
809 -- d.w This flag turns off the scanning of loops to detect possible
810 -- infinite loops.
812 -- d.x No exception handlers in generated code. This causes exception
813 -- handlers to be eliminated from the generated code. They are still
814 -- fully compiled and analyzed, they just get eliminated from the
815 -- code generation step.
817 -- d.y Disable implicit pragma Elaborate_All on task bodies. When a task
818 -- body calls a procedure in the same package, and that procedure
819 -- calls a procedure in another package, the static elaboration
820 -- machinery adds an implicit Elaborate_All on the other package. This
821 -- switch disables the addition of the implicit pragma in such cases.
823 -- d.z Restore previous front-end support for Inline_Always. In default
824 -- mode, for targets that use the GCC back end, Inline_Always is
825 -- handled by the back end. Use of this switch restores the previous
826 -- handling of Inline_Always by the front end on such targets. For the
827 -- targets that do not use the GCC back end, this switch is ignored.
829 -- d.A Enable statistics printing in Atree. First set Statistics_Enabled
830 -- in gen_il-gen.adb to True, then rebuild, then run the compiler
831 -- with -gnatd.A. You might want to apply "sort -nr" to parts of the
832 -- output.
834 -- d.B Generate a "GNAT BUG" message when we see an abort_statement, even
835 -- though there is no bug. Useful for testing Comperr.Compiler_Abort:
836 -- write some code containing an abort_statement, and compile it with
837 -- -gnatd.B. There is nothing special about abort_statements; it just
838 -- provides a way to control where the bug box is generated. See the
839 -- "when N_Abort_Statement" in package body Expander.
841 -- d.C Generate call to System.Concat_n.Str_Concat_n routines in cases
842 -- where we would normally generate inline concatenation code.
844 -- d.D For compatibility with some Ada 95 compilers implementing only
845 -- one feature of Ada 2005 (overriding keyword), disable errors on use
846 -- of overriding keyword in Ada 95 mode.
848 -- d.E Turn selected errors into warnings. This debug switch causes a
849 -- specific set of error messages into warnings. Setting this switch
850 -- causes Opt.Error_To_Warning to be set to True. The intention is
851 -- that this be used for messages representing upwards incompatible
852 -- changes to Ada 2012 that cause previously correct programs to be
853 -- treated as illegal now. The following cases are affected:
855 -- Errors relating to overlapping subprogram parameters for cases
856 -- other than IN OUT parameters to functions.
858 -- Errors relating to the new rules about not defining equality
859 -- too late so that composition of equality can be assured.
861 -- Errors relating to overriding indicators on protected subprogram
862 -- bodies (not an Ada 2012 incompatibility, but might cause errors
863 -- for existing programs assuming they were legal because GNAT
864 -- formerly allowed them).
866 -- d.F Sets GNATprove_Mode to True. This allows debugging the frontend in
867 -- the special mode used by GNATprove.
869 -- d.G Previously the compiler ignored calls via generic formal parameters
870 -- when doing the analysis for the static elaboration model. This is
871 -- now fixed, but we provide this debug flag to revert to the previous
872 -- situation of ignoring such calls to aid in transition.
874 -- d.H Disable the support for 128-bit integer types on 64-bit platforms.
875 -- This makes it easier to mimic the behavior of the current compiler
876 -- on 32-bit platforms or of older compilers on 64-bit platforms.
878 -- d.I Do not ignore enum representation clauses in CodePeer mode.
879 -- The default of ignoring representation clauses for enumeration
880 -- types in CodePeer is good for the majority of Ada code, but in some
881 -- cases being able to change this default might be useful to remove
882 -- some false positives.
884 -- d.J Relaxed rules for pragma No_Return. A pragma No_Return is illegal
885 -- if it applies to a body. This switch disables the legality check
886 -- for that. If the procedure does in fact return normally, execution
887 -- is erroneous, and therefore unpredictable.
889 -- d.K Do not reject components in extensions overlapping with the parent
890 -- component. Such components can be specified by means of a component
891 -- clause but they cannot be fully supported by the GCC type system.
892 -- This switch nevertheless allows them for the sake of compatibility.
894 -- d.M Relaxed RM semantics. This flag sets Opt.Relaxed_RM_Semantics
895 -- See Opt.Relaxed_RM_Semantics for more details.
897 -- d.N Use rounding instead of truncation when dynamically converting from
898 -- a floating-point type to an ordinary fixed-point type, for the sake
899 -- of compatibility with earlier versions of the compiler.
901 -- d.O Dump internal SCO tables. Before outputting the SCO information to
902 -- the ALI file, the internal SCO tables (SCO_Table/SCO_Unit_Table)
903 -- are dumped for debugging purposes.
905 -- d.P Previous non-optimized handling of length comparisons. Setting this
906 -- flag inhibits the effect of Optimize_Length_Comparison in Exp_Ch4.
907 -- This is there in case we find a situation where the optimization
908 -- malfunctions, to provide a work around.
910 -- d.Q Previous incomplete style checks for binary operators. Style checks
911 -- for token separation rules were incomplete and have been made
912 -- compliant with the documentation. For example, no warning was
913 -- issued for expressions such as 16-One or "A"&"B". Setting this flag
914 -- inhibits these new checks.
916 -- d.R As documented in lib-writ.ads, restrictions in the ali file can
917 -- have two forms, positional and named. The named notation is the
918 -- current preferred form, but the use of this debug switch will force
919 -- the use of the obsolescent positional form.
921 -- d.S Force Optimize_Alignment (Space) mode as the default
923 -- d.T Force Optimize_Alignment (Time) mode as the default
925 -- d.U Ignore indirect calls for static elaboration. The static
926 -- elaboration model is conservative, especially regarding indirect
927 -- calls. If you say Proc'Access, it will assume you might call
928 -- Proc. This can cause elaboration cycles at bind time. This flag
929 -- reverts to the behavior of earlier compilers, which ignored
930 -- indirect calls.
932 -- d.V Do not verify the validity of SCIL files (CodePeer mode). When
933 -- generating SCIL files for CodePeer, by default we verify that the
934 -- SCIL is well formed before saving it on disk. This switch can be
935 -- used to disable this checking, either to improve speed or to shut
936 -- down a false positive detected during the verification.
938 -- d.W Print out debugging information for Walk_Library_Items, including
939 -- the order in which units are walked. This is primarily for use in
940 -- debugging CodePeer mode.
942 -- d.X A previous version of GNAT allowed indexing aspects to be redefined
943 -- on derived container types, while the default iterator was
944 -- inherited from the parent type. This nonstandard extension is
945 -- preserved temporarily for use by the modeling project under debug
946 -- flag d.X.
948 -- d.Z Normally we always enable expansion in configurable run-time mode
949 -- to make sure we get error messages about unsupported features even
950 -- when compiling in -gnatc mode. But expansion is turned off in this
951 -- case if debug flag -gnatd.Z is used. This is to deal with the case
952 -- where we discover difficulties in this new processing.
954 -- d_a The compiler stops the examination of a task body once it reaches
955 -- an accept or select statement for the static elaboration model. The
956 -- behavior is similar to that of No_Entry_Calls_In_Elaboration_Code,
957 -- but does not penalize actual entry calls in elaboration code.
959 -- d_b When the restriction No_Dynamic_Accessibility_Checks is enabled,
960 -- use the simple "designated type" accessibility model, instead of
961 -- using the implicit level of the anonymous access type declaration.
963 -- d_e The compiler ignores simple entry calls, asynchronous transfer of
964 -- control, conditional entry calls, timed entry calls, and requeue
965 -- statements in both the static and dynamic elaboration models.
967 -- d_f Issue info messages related to GNATprove usage to help users
968 -- understand analysis results. By default these are not issued as
969 -- beginners find them confusing. Set automatically by GNATprove when
970 -- switch --info is used.
972 -- d_g Disable large static aggregates. The maximum size for a static
973 -- aggregate will be fairly modest, which is useful if the compiler
974 -- is using too much memory and time at compile time.
976 -- d_h The compiler does not make use of (perfect) hash functions in the
977 -- implementation of the Value attribute for enumeration types.
979 -- d_i The compiler ignores calls and task activations when they target a
980 -- subprogram or task type defined in an external instance for both
981 -- the static and dynamic elaboration models.
983 -- d_j The compiler reads JSON files that would be generated by the same
984 -- compilation session if -gnatRjs was passed, in order to populate
985 -- the internal tables of the Repinfo unit from them.
987 -- d_k In CodePeer mode assertion expressions are expanded by default
988 -- (regardless of the -gnata compiler switch); when this switch is
989 -- enabled, expansion of assertion expressions is controlled by
990 -- pragma Assertion_Policy.
992 -- d_l The compiler does not enforce the strict alignment of array types
993 -- that are declared with an aliased component.
995 -- d_p The compiler ignores calls to subprograms which verify the run-time
996 -- semantics of invariants and postconditions in both the static and
997 -- dynamic elaboration models.
999 -- d_r The compiler does not make use of the return slot in the expansion
1000 -- of functions returning a by-reference type. If this use is required
1001 -- for these functions to return on the primary stack, then they are
1002 -- changed to return on the secondary stack instead.
1004 -- d_s The compiler stops the examination of a task body once it reaches
1005 -- a call to routine Ada.Synchronous_Task_Control.Suspend_Until_True
1006 -- or Ada.Synchronous_Barriers.Wait_For_Release.
1008 -- d_t In the LLVM-based CCG, do an additional dump of the LLVM IR
1009 -- after the pass that does transformations to the IR into a
1010 -- filename ending with .trans.ll.
1012 -- d_u In the LLVM-based CCG, dump flows, both when originally created
1013 -- and after transformations.
1015 -- d_v Enable additional checks and debug printouts in Atree
1017 -- d_w In LLVM-based CCG, don't send front end data to CCG
1019 -- d_x The compiler does not expand in line the Image attribute for user-
1020 -- defined enumeration types and the standard boolean type.
1022 -- d_A Do not generate ALI files by setting Opt.Disable_ALI_File.
1024 -- d_B Warn on build-in-place function calls. This allows users to
1025 -- inspect their code in case it triggers compiler bugs related
1026 -- to build-in-place calls. See known-problem entries for details.
1028 -- d_F The compiler encodes the full path from an invocation construct to
1029 -- an external target, offering additional information to GNATBIND for
1030 -- purposes of error diagnostics.
1032 -- d_K (Reserved) Enable reporting a warning on known-problem issues of
1033 -- previous releases. No action performed in the wavefront.
1035 -- d_L Output trace information on elaboration checking. This debug switch
1036 -- causes output to be generated showing each call or instantiation as
1037 -- it is checked, and the progress of the recursive trace through
1038 -- elaboration calls at compile time.
1040 -- d_R In the LLVM backend, output the internal representation of
1041 -- each record
1043 -- d_T The compiler outputs trace information to standard output whenever
1044 -- an invocation path is recorded.
1046 -- d_U Disable prepending 'error:' to error messages. This used to be the
1047 -- default and can be seen as the opposite of -gnatU.
1049 -- d_V Enable verification of the expanded code before calling the backend
1050 -- and generate error messages on each inconsistency found.
1052 -- d_X Disable assertions to check matching of extra formals; switch added
1053 -- temporarily to disable these checks until this work is complete if
1054 -- they cause unexpected assertion failures.
1056 -- d1 Error messages have node numbers where possible. Normally error
1057 -- messages have only source locations. This option is useful when
1058 -- debugging errors caused by expanded code, where the source location
1059 -- does not give enough information.
1061 -- d2 Suppress output of the error position flags for verbose form error
1062 -- messages. The messages are still interspersed in the listing, but
1063 -- without any error flags or extra blank lines. Also causes an extra
1064 -- <<< to be output at the right margin. This is intended to be the
1065 -- easiest format for checking conformance of ACATS B tests. This
1066 -- flag also suppresses the additional messages explaining why a
1067 -- non-static expression is non-static (see Sem_Eval.Why_Not_Static).
1068 -- This avoids having to worry about these messages in ACATS testing.
1069 -- Finally, this flag is also used for strict legality check, in
1070 -- particular it will generate an error instead a warning when
1071 -- encountering an unknown pragma.
1073 -- d3 Causes Comperr to dump the contents of the node for which an abort
1074 -- was detected (normally only the Node_Id of the node is output).
1076 -- d4 Inhibits automatic krunching of predefined library unit file names.
1077 -- Normally, as described in the spec of package Krunch, such files
1078 -- are automatically krunched to 8 characters, with special treatment
1079 -- of the prefixes Ada, System, and Interfaces. Setting this debug
1080 -- switch disables this special treatment.
1082 -- d5 Causes the tree read/write circuit to output detailed information
1083 -- tracking the data that is read and written element by element.
1085 -- d6 Normally access-to-unconstrained-array types are represented
1086 -- using fat (double) pointers. Using this debug flag causes them
1087 -- to default to thin. This can be used to test the performance
1088 -- implications of using thin pointers, and also to test that the
1089 -- compiler functions correctly with this choice.
1091 -- d7 Normally a -gnatl or -gnatv listing includes the time stamp of the
1092 -- source file and the time of the compilation. This debug flag can
1093 -- be used to suppress this output, and also suppresses the message
1094 -- with the version of the compiler. This is useful for regression
1095 -- tests which need to have consistent output.
1097 -- d8 This forces the packed stuff to generate code assuming the
1098 -- opposite endianness from the actual correct value. Useful in
1099 -- testing out code generation from the packed routines.
1101 -- d.1 Sets Opt.Unnest_Subprogram_Mode to enable unnesting of subprograms.
1102 -- This special pass does not actually unnest things, but it ensures
1103 -- that a nested procedure does not contain any uplevel references.
1104 -- See spec of Exp_Unst for full details.
1106 -- d.2 Allow statements within declarative parts. This is not usually
1107 -- allowed, but in some debugging contexts (e.g. testing the circuit
1108 -- for unnesting of procedures), it is useful to allow this.
1110 -- d.3 Output debugging information from Exp_Unst, including the name of
1111 -- any unreachable subprograms that get deleted.
1113 -- d.4 By default in case of an error during C generation, the .c or .h
1114 -- file is deleted. This flag keeps the C file.
1116 -- d.5 By default a subprogram imported generates a subprogram profile.
1117 -- This debug flag disables this generation when generating C code,
1118 -- assuming a proper #include will be used instead.
1120 -- d.6 By default the C back-end avoids declaring types that are not
1121 -- referenced by the generated C code. This debug flag restores the
1122 -- output of all the types.
1124 -- d.7 Indicates (to gnat2scil) that CodePeer is being invoked as a
1125 -- prover by the SPARK tools and that therefore gnat2scil should
1126 -- avoid SCIL generation strategies which can introduce soundness
1127 -- issues (e.g., assuming that a low bound of an array parameter
1128 -- of an unconstrained subtype belongs to the index subtype).
1130 -- d.8 By default calls to expression functions are always inlined.
1131 -- This debug flag turns off this behavior, making them subject
1132 -- to the usual inlining heuristics of the code generator.
1134 ------------------------------------------
1135 -- Documentation for Binder Debug Flags --
1136 ------------------------------------------
1138 -- da Normally if there is an elaboration circularity, then in describing
1139 -- the cycle, links involving internal units are omitted, since they
1140 -- are irrelevant and confusing. This debug flag causes all links to
1141 -- be listed, and is useful when diagnosing circularities introduced
1142 -- by incorrect changes to the run-time library itself.
1144 -- db Output debug information from Better_Choice in Binde, which uses
1145 -- various heuristics to determine elaboration order in cases where
1146 -- multiple orders are valid.
1148 -- dc List units as they are chosen. As units are selected for addition to
1149 -- the elaboration order, a line of output is generated showing which
1150 -- unit has been selected.
1152 -- de Similar to the effect of -e (output complete list of elaboration
1153 -- dependencies) except that internal units are included in the
1154 -- listing.
1156 -- di Normally GNATBIND calls Read_Ali with Ignore_Errors set to False,
1157 -- since the binder really needs correct version ALI files to do its
1158 -- job. This debug flag causes Ignore_Errors mode to be set for the
1159 -- binder (and is particularly useful for testing ignore errors mode).
1161 -- dn List details of manipulation of Num_Pred values during execution of
1162 -- the algorithm used to determine a correct order of elaboration. This
1163 -- is useful in diagnosing any problems in its behavior.
1165 -- do Use older elaboration order preference. The new preference rules
1166 -- prefer specs with no bodies to specs with bodies, and between two
1167 -- specs with bodies, prefers the one whose body is closer to being
1168 -- able to be elaborated. This is a clear improvement, but we provide
1169 -- this debug flag in case of regressions. Note: -do is even older
1170 -- than -dp.
1172 -- dp Use old elaboration order preference. The new preference rules
1173 -- elaborate all units within a strongly connected component together,
1174 -- with no other units in between. In particular, if a spec/body pair
1175 -- can be elaborated together, it will be. In the new order, the binder
1176 -- behaves as if every pragma Elaborate_All that would be legal is
1177 -- present, even if it does not appear in the source code.
1179 -- du List unit name and file name for each unit as it is read in
1181 -- dv Verbose debugging printouts
1183 -- dx Force the binder to read (and then ignore) the xref information
1184 -- in ali files (used to check that read circuit is working OK).
1186 -- d_a GNATBIND ignores the effects of pragma Elaborate_All in the case of
1187 -- elaboration order and treats the associated dependency as a regular
1188 -- with edge.
1190 -- d_b GNATBIND ignores the effects of pragma Elaborate_Body in the case
1191 -- of elaboration order and treats the spec and body as decoupled.
1193 -- d_e GNATBIND ignores the effects of pragma Elaborate in the case of
1194 -- elaboration order and no longer creates an implicit dependency on
1195 -- the body of the argument.
1197 -- d_t GNATBIND output trace information of cycle-detection activities to
1198 -- standard output.
1200 -- d_A GNATBIND output the contents of all ALI invocation-related tables
1201 -- in textual format to standard output.
1203 -- d_C GNATBIND diagnoses all unique cycles within the bind, rather than
1204 -- just the most important one.
1206 -- d_I GNATBIND outputs the contents of the invocation graph in textual
1207 -- format to standard output.
1209 -- d_L GNATBIND outputs the contents of the library graph in textual
1210 -- format to standard output.
1212 -- d_P GNATBIND outputs the cycle paths to standard output
1214 -- d_S GNATBIND outputs trace information concerning the status of its
1215 -- various phases to standard output.
1217 -- d_T GNATBIND outputs trace information of elaboration order detection
1218 -- activities to standard output.
1220 -- d_V GNATBIND validates the invocation graph, library graph along with
1221 -- its cycles, and the elaboration order.
1223 --------------------------------------------
1224 -- Documentation for gnatmake Debug Flags --
1225 --------------------------------------------
1227 -- df Only output file names, not path names, in log
1229 -- dh Generate listing showing loading of name table hash chains,
1230 -- same as for the compiler.
1232 -- dm Issue a message indicating the maximum number of simultaneous
1233 -- compilations.
1235 -- dn Do not delete temporary files created by gnatmake at the end
1236 -- of execution, such as temporary config pragma files, mapping
1237 -- files or project path files. This debug switch is equivalent to
1238 -- the standard switch --keep-temp-files. We retain the debug switch
1239 -- for back compatibility with past usage.
1241 -- dp Prints the Q used by routine Make.Compile_Sources every time
1242 -- we go around the main compile loop of Make.Compile_Sources
1244 -- dq Prints source files as they are enqueued and dequeued in the Q
1245 -- used by routine Make.Compile_Sources. Useful to figure out the
1246 -- order in which sources are recompiled.
1248 -- dt When a time stamp mismatch has been found for an ALI file,
1249 -- display the source file name, the time stamp expected and
1250 -- the time stamp found.
1252 -- du List unit name and file name for each unit as it is read in
1254 -- dw Prints the list of units withed by the unit currently explored
1255 -- during the main loop of Make.Compile_Sources.
1257 ---------------------------------------------
1258 -- Documentation for gprbuild Debug Flags --
1259 ---------------------------------------------
1261 -- dm Display the maximum number of simultaneous compilations.
1263 -- dn Do not delete temporary files created by gprbuild at the end
1264 -- of execution, such as temporary config pragma files, mapping
1265 -- files or project path files. This debug switch is equivalent to
1266 -- the standard switch --keep-temp-files. We retain the debug switch
1267 -- for back compatibility with past usage.
1269 -- dt When a time stamp mismatch has been found for an ALI file,
1270 -- display the source file name, the time stamp expected and
1271 -- the time stamp found.
1273 --------------------
1274 -- Set_Debug_Flag --
1275 --------------------
1277 procedure Set_Debug_Flag (C : Character; Val : Boolean := True) is
1278 subtype Dig is Character range '1' .. '9';
1279 subtype LLet is Character range 'a' .. 'z';
1280 subtype ULet is Character range 'A' .. 'Z';
1282 begin
1283 if C in Dig then
1284 case Dig (C) is
1285 when '1' =>
1286 Debug_Flag_1 := Val;
1287 when '2' =>
1288 Debug_Flag_2 := Val;
1289 when '3' =>
1290 Debug_Flag_3 := Val;
1291 when '4' =>
1292 Debug_Flag_4 := Val;
1293 when '5' =>
1294 Debug_Flag_5 := Val;
1295 when '6' =>
1296 Debug_Flag_6 := Val;
1297 when '7' =>
1298 Debug_Flag_7 := Val;
1299 when '8' =>
1300 Debug_Flag_8 := Val;
1301 when '9' =>
1302 Debug_Flag_9 := Val;
1303 end case;
1305 elsif C in ULet then
1306 case ULet (C) is
1307 when 'A' =>
1308 Debug_Flag_AA := Val;
1309 when 'B' =>
1310 Debug_Flag_BB := Val;
1311 when 'C' =>
1312 Debug_Flag_CC := Val;
1313 when 'D' =>
1314 Debug_Flag_DD := Val;
1315 when 'E' =>
1316 Debug_Flag_EE := Val;
1317 when 'F' =>
1318 Debug_Flag_FF := Val;
1319 when 'G' =>
1320 Debug_Flag_GG := Val;
1321 when 'H' =>
1322 Debug_Flag_HH := Val;
1323 when 'I' =>
1324 Debug_Flag_II := Val;
1325 when 'J' =>
1326 Debug_Flag_JJ := Val;
1327 when 'K' =>
1328 Debug_Flag_KK := Val;
1329 when 'L' =>
1330 Debug_Flag_LL := Val;
1331 when 'M' =>
1332 Debug_Flag_MM := Val;
1333 when 'N' =>
1334 Debug_Flag_NN := Val;
1335 when 'O' =>
1336 Debug_Flag_OO := Val;
1337 when 'P' =>
1338 Debug_Flag_PP := Val;
1339 when 'Q' =>
1340 Debug_Flag_QQ := Val;
1341 when 'R' =>
1342 Debug_Flag_RR := Val;
1343 when 'S' =>
1344 Debug_Flag_SS := Val;
1345 when 'T' =>
1346 Debug_Flag_TT := Val;
1347 when 'U' =>
1348 Debug_Flag_UU := Val;
1349 when 'V' =>
1350 Debug_Flag_VV := Val;
1351 when 'W' =>
1352 Debug_Flag_WW := Val;
1353 when 'X' =>
1354 Debug_Flag_XX := Val;
1355 when 'Y' =>
1356 Debug_Flag_YY := Val;
1357 when 'Z' =>
1358 Debug_Flag_ZZ := Val;
1359 end case;
1361 else
1362 case LLet (C) is
1363 when 'a' =>
1364 Debug_Flag_A := Val;
1365 when 'b' =>
1366 Debug_Flag_B := Val;
1367 when 'c' =>
1368 Debug_Flag_C := Val;
1369 when 'd' =>
1370 Debug_Flag_D := Val;
1371 when 'e' =>
1372 Debug_Flag_E := Val;
1373 when 'f' =>
1374 Debug_Flag_F := Val;
1375 when 'g' =>
1376 Debug_Flag_G := Val;
1377 when 'h' =>
1378 Debug_Flag_H := Val;
1379 when 'i' =>
1380 Debug_Flag_I := Val;
1381 when 'j' =>
1382 Debug_Flag_J := Val;
1383 when 'k' =>
1384 Debug_Flag_K := Val;
1385 when 'l' =>
1386 Debug_Flag_L := Val;
1387 when 'm' =>
1388 Debug_Flag_M := Val;
1389 when 'n' =>
1390 Debug_Flag_N := Val;
1391 when 'o' =>
1392 Debug_Flag_O := Val;
1393 when 'p' =>
1394 Debug_Flag_P := Val;
1395 when 'q' =>
1396 Debug_Flag_Q := Val;
1397 when 'r' =>
1398 Debug_Flag_R := Val;
1399 when 's' =>
1400 Debug_Flag_S := Val;
1401 when 't' =>
1402 Debug_Flag_T := Val;
1403 when 'u' =>
1404 Debug_Flag_U := Val;
1405 when 'v' =>
1406 Debug_Flag_V := Val;
1407 when 'w' =>
1408 Debug_Flag_W := Val;
1409 when 'x' =>
1410 Debug_Flag_X := Val;
1411 when 'y' =>
1412 Debug_Flag_Y := Val;
1413 when 'z' =>
1414 Debug_Flag_Z := Val;
1415 end case;
1416 end if;
1417 end Set_Debug_Flag;
1419 ---------------------------
1420 -- Set_Dotted_Debug_Flag --
1421 ---------------------------
1423 procedure Set_Dotted_Debug_Flag (C : Character; Val : Boolean := True) is
1424 subtype Dig is Character range '1' .. '9';
1425 subtype LLet is Character range 'a' .. 'z';
1426 subtype ULet is Character range 'A' .. 'Z';
1428 begin
1429 if C in Dig then
1430 case Dig (C) is
1431 when '1' =>
1432 Debug_Flag_Dot_1 := Val;
1433 when '2' =>
1434 Debug_Flag_Dot_2 := Val;
1435 when '3' =>
1436 Debug_Flag_Dot_3 := Val;
1437 when '4' =>
1438 Debug_Flag_Dot_4 := Val;
1439 when '5' =>
1440 Debug_Flag_Dot_5 := Val;
1441 when '6' =>
1442 Debug_Flag_Dot_6 := Val;
1443 when '7' =>
1444 Debug_Flag_Dot_7 := Val;
1445 when '8' =>
1446 Debug_Flag_Dot_8 := Val;
1447 when '9' =>
1448 Debug_Flag_Dot_9 := Val;
1449 end case;
1451 elsif C in ULet then
1452 case ULet (C) is
1453 when 'A' =>
1454 Debug_Flag_Dot_AA := Val;
1455 when 'B' =>
1456 Debug_Flag_Dot_BB := Val;
1457 when 'C' =>
1458 Debug_Flag_Dot_CC := Val;
1459 when 'D' =>
1460 Debug_Flag_Dot_DD := Val;
1461 when 'E' =>
1462 Debug_Flag_Dot_EE := Val;
1463 when 'F' =>
1464 Debug_Flag_Dot_FF := Val;
1465 when 'G' =>
1466 Debug_Flag_Dot_GG := Val;
1467 when 'H' =>
1468 Debug_Flag_Dot_HH := Val;
1469 when 'I' =>
1470 Debug_Flag_Dot_II := Val;
1471 when 'J' =>
1472 Debug_Flag_Dot_JJ := Val;
1473 when 'K' =>
1474 Debug_Flag_Dot_KK := Val;
1475 when 'L' =>
1476 Debug_Flag_Dot_LL := Val;
1477 when 'M' =>
1478 Debug_Flag_Dot_MM := Val;
1479 when 'N' =>
1480 Debug_Flag_Dot_NN := Val;
1481 when 'O' =>
1482 Debug_Flag_Dot_OO := Val;
1483 when 'P' =>
1484 Debug_Flag_Dot_PP := Val;
1485 when 'Q' =>
1486 Debug_Flag_Dot_QQ := Val;
1487 when 'R' =>
1488 Debug_Flag_Dot_RR := Val;
1489 when 'S' =>
1490 Debug_Flag_Dot_SS := Val;
1491 when 'T' =>
1492 Debug_Flag_Dot_TT := Val;
1493 when 'U' =>
1494 Debug_Flag_Dot_UU := Val;
1495 when 'V' =>
1496 Debug_Flag_Dot_VV := Val;
1497 when 'W' =>
1498 Debug_Flag_Dot_WW := Val;
1499 when 'X' =>
1500 Debug_Flag_Dot_XX := Val;
1501 when 'Y' =>
1502 Debug_Flag_Dot_YY := Val;
1503 when 'Z' =>
1504 Debug_Flag_Dot_ZZ := Val;
1505 end case;
1507 else
1508 case LLet (C) is
1509 when 'a' =>
1510 Debug_Flag_Dot_A := Val;
1511 when 'b' =>
1512 Debug_Flag_Dot_B := Val;
1513 when 'c' =>
1514 Debug_Flag_Dot_C := Val;
1515 when 'd' =>
1516 Debug_Flag_Dot_D := Val;
1517 when 'e' =>
1518 Debug_Flag_Dot_E := Val;
1519 when 'f' =>
1520 Debug_Flag_Dot_F := Val;
1521 when 'g' =>
1522 Debug_Flag_Dot_G := Val;
1523 when 'h' =>
1524 Debug_Flag_Dot_H := Val;
1525 when 'i' =>
1526 Debug_Flag_Dot_I := Val;
1527 when 'j' =>
1528 Debug_Flag_Dot_J := Val;
1529 when 'k' =>
1530 Debug_Flag_Dot_K := Val;
1531 when 'l' =>
1532 Debug_Flag_Dot_L := Val;
1533 when 'm' =>
1534 Debug_Flag_Dot_M := Val;
1535 when 'n' =>
1536 Debug_Flag_Dot_N := Val;
1537 when 'o' =>
1538 Debug_Flag_Dot_O := Val;
1539 when 'p' =>
1540 Debug_Flag_Dot_P := Val;
1541 when 'q' =>
1542 Debug_Flag_Dot_Q := Val;
1543 when 'r' =>
1544 Debug_Flag_Dot_R := Val;
1545 when 's' =>
1546 Debug_Flag_Dot_S := Val;
1547 when 't' =>
1548 Debug_Flag_Dot_T := Val;
1549 when 'u' =>
1550 Debug_Flag_Dot_U := Val;
1551 when 'v' =>
1552 Debug_Flag_Dot_V := Val;
1553 when 'w' =>
1554 Debug_Flag_Dot_W := Val;
1555 when 'x' =>
1556 Debug_Flag_Dot_X := Val;
1557 when 'y' =>
1558 Debug_Flag_Dot_Y := Val;
1559 when 'z' =>
1560 Debug_Flag_Dot_Z := Val;
1561 end case;
1562 end if;
1563 end Set_Dotted_Debug_Flag;
1565 --------------------------------
1566 -- Set_Underscored_Debug_Flag --
1567 --------------------------------
1569 procedure Set_Underscored_Debug_Flag
1570 (C : Character;
1571 Val : Boolean := True)
1573 subtype Dig is Character range '1' .. '9';
1574 subtype LLet is Character range 'a' .. 'z';
1575 subtype ULet is Character range 'A' .. 'Z';
1577 begin
1578 if C in Dig then
1579 case Dig (C) is
1580 when '1' =>
1581 Debug_Flag_Underscore_1 := Val;
1582 when '2' =>
1583 Debug_Flag_Underscore_2 := Val;
1584 when '3' =>
1585 Debug_Flag_Underscore_3 := Val;
1586 when '4' =>
1587 Debug_Flag_Underscore_4 := Val;
1588 when '5' =>
1589 Debug_Flag_Underscore_5 := Val;
1590 when '6' =>
1591 Debug_Flag_Underscore_6 := Val;
1592 when '7' =>
1593 Debug_Flag_Underscore_7 := Val;
1594 when '8' =>
1595 Debug_Flag_Underscore_8 := Val;
1596 when '9' =>
1597 Debug_Flag_Underscore_9 := Val;
1598 end case;
1600 elsif C in ULet then
1601 case ULet (C) is
1602 when 'A' =>
1603 Debug_Flag_Underscore_AA := Val;
1604 when 'B' =>
1605 Debug_Flag_Underscore_BB := Val;
1606 when 'C' =>
1607 Debug_Flag_Underscore_CC := Val;
1608 when 'D' =>
1609 Debug_Flag_Underscore_DD := Val;
1610 when 'E' =>
1611 Debug_Flag_Underscore_EE := Val;
1612 when 'F' =>
1613 Debug_Flag_Underscore_FF := Val;
1614 when 'G' =>
1615 Debug_Flag_Underscore_GG := Val;
1616 when 'H' =>
1617 Debug_Flag_Underscore_HH := Val;
1618 when 'I' =>
1619 Debug_Flag_Underscore_II := Val;
1620 when 'J' =>
1621 Debug_Flag_Underscore_JJ := Val;
1622 when 'K' =>
1623 Debug_Flag_Underscore_KK := Val;
1624 when 'L' =>
1625 Debug_Flag_Underscore_LL := Val;
1626 when 'M' =>
1627 Debug_Flag_Underscore_MM := Val;
1628 when 'N' =>
1629 Debug_Flag_Underscore_NN := Val;
1630 when 'O' =>
1631 Debug_Flag_Underscore_OO := Val;
1632 when 'P' =>
1633 Debug_Flag_Underscore_PP := Val;
1634 when 'Q' =>
1635 Debug_Flag_Underscore_QQ := Val;
1636 when 'R' =>
1637 Debug_Flag_Underscore_RR := Val;
1638 when 'S' =>
1639 Debug_Flag_Underscore_SS := Val;
1640 when 'T' =>
1641 Debug_Flag_Underscore_TT := Val;
1642 when 'U' =>
1643 Debug_Flag_Underscore_UU := Val;
1644 when 'V' =>
1645 Debug_Flag_Underscore_VV := Val;
1646 when 'W' =>
1647 Debug_Flag_Underscore_WW := Val;
1648 when 'X' =>
1649 Debug_Flag_Underscore_XX := Val;
1650 when 'Y' =>
1651 Debug_Flag_Underscore_YY := Val;
1652 when 'Z' =>
1653 Debug_Flag_Underscore_ZZ := Val;
1654 end case;
1656 else
1657 case LLet (C) is
1658 when 'a' =>
1659 Debug_Flag_Underscore_A := Val;
1660 when 'b' =>
1661 Debug_Flag_Underscore_B := Val;
1662 when 'c' =>
1663 Debug_Flag_Underscore_C := Val;
1664 when 'd' =>
1665 Debug_Flag_Underscore_D := Val;
1666 when 'e' =>
1667 Debug_Flag_Underscore_E := Val;
1668 when 'f' =>
1669 Debug_Flag_Underscore_F := Val;
1670 when 'g' =>
1671 Debug_Flag_Underscore_G := Val;
1672 when 'h' =>
1673 Debug_Flag_Underscore_H := Val;
1674 when 'i' =>
1675 Debug_Flag_Underscore_I := Val;
1676 when 'j' =>
1677 Debug_Flag_Underscore_J := Val;
1678 when 'k' =>
1679 Debug_Flag_Underscore_K := Val;
1680 when 'l' =>
1681 Debug_Flag_Underscore_L := Val;
1682 when 'm' =>
1683 Debug_Flag_Underscore_M := Val;
1684 when 'n' =>
1685 Debug_Flag_Underscore_N := Val;
1686 when 'o' =>
1687 Debug_Flag_Underscore_O := Val;
1688 when 'p' =>
1689 Debug_Flag_Underscore_P := Val;
1690 when 'q' =>
1691 Debug_Flag_Underscore_Q := Val;
1692 when 'r' =>
1693 Debug_Flag_Underscore_R := Val;
1694 when 's' =>
1695 Debug_Flag_Underscore_S := Val;
1696 when 't' =>
1697 Debug_Flag_Underscore_T := Val;
1698 when 'u' =>
1699 Debug_Flag_Underscore_U := Val;
1700 when 'v' =>
1701 Debug_Flag_Underscore_V := Val;
1702 when 'w' =>
1703 Debug_Flag_Underscore_W := Val;
1704 when 'x' =>
1705 Debug_Flag_Underscore_X := Val;
1706 when 'y' =>
1707 Debug_Flag_Underscore_Y := Val;
1708 when 'z' =>
1709 Debug_Flag_Underscore_Z := Val;
1710 end case;
1711 end if;
1712 end Set_Underscored_Debug_Flag;
1714 end Debug;