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