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