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