Merge from mainline
[official-gcc.git] / gcc / ada / debug.adb
blob8fe80da32cbd403edd760d1af65c99af6adef49c
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- D E B U G --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
21 -- --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
28 -- --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
31 -- --
32 ------------------------------------------------------------------------------
34 package body Debug is
36 ---------------------------------
37 -- Summary of Debug Flag Usage --
38 ---------------------------------
40 -- Debug flags for compiler (GNAT1)
42 -- da Generate messages tracking semantic analyzer progress
43 -- db Show encoding of type names for debug output
44 -- dc List names of units as they are compiled
45 -- dd Dynamic allocation of tables messages generated
46 -- de List the entity table
47 -- df Full tree/source print (includes withed units)
48 -- dg Print source from tree (generated code only)
49 -- dh Generate listing showing loading of name table hash chains
50 -- di Generate messages for visibility linking/delinking
51 -- dj Suppress "junk null check" for access parameter values
52 -- dk Generate GNATBUG message on abort, even if previous errors
53 -- dl Generate unit load trace messages
54 -- dm Allow VMS features even if not OpenVMS version
55 -- dn Generate messages for node/list allocation
56 -- do Print source from tree (original code only)
57 -- dp Generate messages for parser scope stack push/pops
58 -- dq No auto-alignment of small records
59 -- dr Generate parser resynchronization messages
60 -- ds Print source from tree (including original and generated stuff)
61 -- dt Print full tree
62 -- du Uncheck categorization pragmas
63 -- dv Output trace of overload resolution
64 -- dw Print trace of semantic scope stack
65 -- dx Force expansion on, even if no code being generated
66 -- dy Print tree of package Standard
67 -- dz Print source of package Standard
69 -- dA All entities included in representation information output
70 -- dB Output debug encoding of type names and variants
71 -- dC Output debugging information on check suppression
72 -- dD Delete elaboration checks in inner level routines
73 -- dE Apply elaboration checks to predefined units
74 -- dF Front end data layout enabled.
75 -- dG Generate all warnings including those normally suppressed
76 -- dH Hold (kill) call to gigi
77 -- dI Inhibit internal name numbering in gnatG listing
78 -- dJ Output debugging trace info for JGNAT (Java VM version of GNAT)
79 -- dK Kill all error messages
80 -- dL Output trace information on elaboration checking
81 -- dM Asssume all variables are modified (no current values)
82 -- dN No file name information in exception messages
83 -- dO Output immediate error messages
84 -- dP Do not check for controlled objects in preelaborable packages
85 -- dQ
86 -- dR Bypass check for correct version of s-rpc
87 -- dS Never convert numbers to machine numbers in Sem_Eval
88 -- dT Convert to machine numbers only for constant declarations
89 -- dU Enable garbage collection of unreachable entities
90 -- dV Enable viewing of all symbols in debugger
91 -- dW Disable warnings on calls for IN OUT parameters
92 -- dX
93 -- dY Enable configurable run-time mode
94 -- dZ Generate listing showing the contents of the dispatch tables
96 -- d.a
97 -- d.b
98 -- d.c
99 -- d.d
100 -- d.e
101 -- d.f Inhibit folding of static expressions
102 -- d.g
103 -- d.h
104 -- d.i
105 -- d.j
106 -- d.k
107 -- d.l
108 -- d.m
109 -- d.n
110 -- d.o
111 -- d.p
112 -- d.q
113 -- d.r
114 -- d.s
115 -- d.t
116 -- d.u
117 -- d.v
118 -- d.w
119 -- d.x No exception handlers
120 -- d.y
121 -- d.z
123 -- d1 Error msgs have node numbers where possible
124 -- d2 Eliminate error flags in verbose form error messages
125 -- d3 Dump bad node in Comperr on an abort
126 -- d4 Inhibit automatic krunch of predefined library unit files
127 -- d5 Debug output for tree read/write
128 -- d6 Default access unconstrained to thin pointers
129 -- d7 Do not output version & file time stamp in -gnatv or -gnatl mode
130 -- d8 Force opposite endianness in packed stuff
131 -- d9
133 -- Debug flags for binder (GNATBIND)
135 -- da All links (including internal units) listed if there is a cycle
136 -- db
137 -- dc List units as they are chosen
138 -- dd
139 -- de Elaboration dependencies including system units
140 -- df
141 -- dg
142 -- dh
143 -- di Ignore_Errors mode for reading ali files
144 -- dj
145 -- dk
146 -- dl
147 -- dm
148 -- dn List details of manipulation of Num_Pred values
149 -- do
150 -- dp
151 -- dq
152 -- dr
153 -- ds
154 -- dt
155 -- du List units as they are acquired
156 -- dv
157 -- dw
158 -- dx Force binder to read xref information from ali files
159 -- dy
160 -- dz
162 -- Debug flags used in package Make and its clients (e.g. GNATMAKE)
164 -- da
165 -- db
166 -- dc
167 -- dd
168 -- de
169 -- df
170 -- dg
171 -- dh
172 -- di
173 -- dj
174 -- dk
175 -- dl
176 -- dm
177 -- dn Do not delete temp files created by gnatmake
178 -- do
179 -- dp Prints the contents of the Q used by Make.Compile_Sources
180 -- dq Prints source files as they are enqueued and dequeued
181 -- dr
182 -- ds
183 -- dt Display time stamps when there is a mismatch
184 -- du List units as their ali files are acquired
185 -- dv
186 -- dw Prints the list of units withed by the unit currently explored
187 -- dx
188 -- dy
189 -- dz
191 --------------------------------------------
192 -- Documentation for Compiler Debug Flags --
193 --------------------------------------------
195 -- da Generate messages tracking semantic analyzer progress. A message
196 -- is output showing each node as it gets analyzed, expanded,
197 -- resolved, or evaluated. This option is useful for finding out
198 -- exactly where a bomb during semantic analysis is occurring.
200 -- db In Exp_Dbug, certain type names are encoded to include debugging
201 -- information. This debug switch causes lines to be output showing
202 -- the encodings used.
204 -- dc List names of units as they are compiled. One line of output will
205 -- be generated at the start of compiling each unit (package or
206 -- subprogram).
208 -- dd Dynamic allocation of tables messages generated. Each time a
209 -- table is reallocated, a line is output indicating the expansion.
211 -- de List the entity table
213 -- df Full tree/source print (includes withed units). Normally the tree
214 -- output (dt) or recreated source output (dg,do,ds) includes only
215 -- the main unit. If df is set, then the output in either case
216 -- includes all compiled units (see also dg,do,ds,dt). Note that to
217 -- be effective, this swich must be used in combination with one or
218 -- more of dt, dg, do or ds.
220 -- dg Print the source recreated from the generated tree. In the case
221 -- where the tree has been rewritten this output includes only the
222 -- generated code, not the original code (see also df,do,ds,dz).
223 -- This flag differs from -gnatG in that the output also includes
224 -- non-source generated null statements, and freeze nodes, which
225 -- are normally omitted in -gnatG mode.
227 -- dh Generates a table at the end of a compilation showing how the hash
228 -- table chains built by the Namet package are loaded. This is useful
229 -- in ensuring that the hashing algorithm (in Namet.Hash) is working
230 -- effectively with typical sets of program identifiers.
232 -- di Generate messages for visibility linking/delinking
234 -- dj Suppress "junk null check" for access parameters. This flag permits
235 -- Ada programs to pass null parameters to access parameters, and to
236 -- explicitly check such access values against the null literal.
237 -- Neither of these is valid Ada, but both were allowed in versions of
238 -- GNAT before 3.10, so this switch can ease the transition process.
240 -- dk Immediate kill on abort. Normally on an abort (i.e. a call to
241 -- Comperr.Compiler_Abort), the GNATBUG message is not given if
242 -- there is a previous error. This debug switch bypasses this test
243 -- and gives the message unconditionally (useful for debugging).
245 -- dl Generate unit load trace messages. A line of traceback output is
246 -- generated each time a request is made to the library manager to
247 -- load a new unit.
249 -- dm Some features are permitted only in OpenVMS ports of GNAT (e.g.
250 -- the specification of passing by descriptor). Normally any use
251 -- of these features will be flagged as an error, but this debug
252 -- flag allows acceptance of these features in non OpenVMS ports.
253 -- Of course they may not have any useful effect, and in particular
254 -- attempting to generate code with this flag set may blow up.
255 -- The flag also forces the use of 64-bits for Long_Integer.
257 -- dn Generate messages for node/list allocation. Each time a node or
258 -- list header is allocated, a line of output is generated. Certain
259 -- other basic tree operations also cause a line of output to be
260 -- generated. This option is useful in seeing where the parser is
261 -- blowing up.;
263 -- do Print the source recreated from the generated tree. In the case
264 -- where the tree has been rewritten, this output includes only the
265 -- original code, not the generated code (see also df,dg,ds,dz).
267 -- dp Generate messages for parser scope stack push/pops. A line of
268 -- output by the parser each time the parser scope stack is either
269 -- pushed or popped. Useful in debugging situations where the
270 -- parser scope stack ends up incorrectly synchronized
272 -- dq In layout version 1.38, 2002/01/12, a circuit was implemented
273 -- to give decent default alignment to short records that had no
274 -- specific alignment set. This debug option restores the previous
275 -- behavior of giving such records poor alignments, typically 1.
276 -- This may be useful in dealing with transition.
278 -- dr Generate parser resynchronization messages. Normally the parser
279 -- resynchronizes quietly. With this debug option, two messages
280 -- are generated, one when the parser starts a resynchronization
281 -- skip, and another when it resumes parsing. Useful in debugging
282 -- inadequate error recovery situations.
284 -- ds Print the source recreated from the generated tree. In the case
285 -- where the tree has been rewritten this output includes both the
286 -- generated code and the original code with the generated code
287 -- being enlosed in curly brackets (see also df,do,ds,dz)
289 -- dt Print full tree. The generated tree is output (see also df,dy)
291 -- du Uncheck categorization pragmas. This debug switch causes the
292 -- categorization pragmas (Pure, Preelaborate etc) to be ignored
293 -- so that normal checks are not made (this is particularly useful
294 -- for adding temporary debugging code to units that have pragmas
295 -- that are inconsistent with the debugging code added.
297 -- dv Output trace of overload resolution. Outputs messages for
298 -- overload attempts that involve cascaded errors, or where
299 -- an interepretation is incompatible with the context.
301 -- dw Write semantic scope stack messages. Each time a scope is created
302 -- or removed, a message is output (see the Sem_Ch8.New_Scope and
303 -- Sem_Ch8.Pop_Scope subprograms).
305 -- dx Force expansion on, even if no code being generated. Normally the
306 -- expander is inhibited if no code is generated. This switch forces
307 -- expansion to proceed normally even if the backend is not being
308 -- called. This is particularly useful for debugging purposes when
309 -- using the front-end only version of the compiler (which normally
310 -- would never do any expansion).
312 -- dy Print tree of package Standard. Normally the tree print out does
313 -- not include package Standard, even if the -df switch is set. This
314 -- switch forces output of the internal tree built for Standard.
316 -- dz Print source of package Standard. Normally the source print out
317 -- does not include package Standard, even if the -df switch is set.
318 -- This switch forces output of the source recreated from the internal
319 -- tree built for Standard. Note that this differs from -gnatS in
320 -- that it prints from the actual tree using the normal Sprint
321 -- circuitry for printing trees.
323 -- dA Forces output of representation information, including full
324 -- information for all internal type and object entities, as well
325 -- as all user defined type and object entities including private
326 -- and incomplete types. This debug switch also automatically sets
327 -- the equivalent of -gnatR3m.
329 -- dB Output debug encodings for types and variants. See Exp_Dbug for
330 -- exact form of the generated output.
332 -- dC Output trace information showing the decisions made during
333 -- check suppression activity in unit Checks.
335 -- dD Delete new elaboration checks. This flag causes GNAT to return
336 -- to the 3.13a elaboration semantics, and to suppress the fixing
337 -- of two bugs. The first is in the context of inner routines in
338 -- dynamic elaboration mode, when the subprogram we are in was
339 -- called at elaboration time by a unit that was also compiled with
340 -- dynamic elaboration checks. In this case, if A calls B calls C,
341 -- and all are in different units, we need an elaboration check at
342 -- each call. These nested checks were only put in recently (see
343 -- version 1.80 of Sem_Elab) and we provide this debug flag to
344 -- revert to the previous behavior in case of regressions. The
345 -- other behavior reverted by this flag is the treatment of the
346 -- Elaborate_Body pragma in static elaboration mode. This used to
347 -- be treated as not needing elaboration checking, but in fact in
348 -- general Elaborate_All is still required because of nested calls.
350 -- dE Apply compile time elaboration checking for with relations between
351 -- predefined units. Normally no checks are made (it seems that at
352 -- least on the SGI, such checks run into trouble).
354 -- dF Front end data layout enabled. Normally front end data layout
355 -- is only enabled if the target parameter Backend_Layout is False.
356 -- This debugging switch enables it unconditionally.
358 -- dG Generate all warnings. Normally Errout suppresses warnings on
359 -- units that are not part of the main extended source, and also
360 -- suppresses warnings on instantiations in the main extended
361 -- source that duplicate warnings already posted on the template.
362 -- This switch stops both kinds of deletion and causes Errout to
363 -- post all warnings sent to it.
365 -- dH Inhibit call to gigi. This is useful for testing front end data
366 -- layout, and may be useful in other debugging situations where
367 -- you do not want gigi to intefere with the testing.
369 -- dI Inhibit internal name numbering in gnatDG listing. For internal
370 -- names of the form <uppercase-letters><digits><suffix>, the output
371 -- will be modified to <uppercase-letters>...<suffix>. This is used
372 -- in the fixed bugs run to minimize system and version dependency
373 -- in filed -gnatDG output.
375 -- dJ Generate debugging trace output for the JGNAT back end. This
376 -- consists of symbolic Java Byte Code sequences for all generated
377 -- classes plus additional information to indicate local variables
378 -- and methods.
380 -- dK Kill all error messages. This debug flag suppresses the output
381 -- of all error messages. It is used in regression tests where the
382 -- error messages are target dependent and irrelevant.
384 -- dL Output trace information on elaboration checking. This debug
385 -- switch causes output to be generated showing each call or
386 -- instantiation as it is checked, and the progress of the recursive
387 -- trace through calls at elaboration time.
389 -- dM Assume all variables have been modified, and ignore current value
390 -- indications. This debug flag disconnects the tracking of constant
391 -- values (see Exp_Ch2.Expand_Current_Value).
393 -- dN Do not generate file name information in exception messages
395 -- dO Output immediate error messages. This causes error messages to
396 -- be output as soon as they are generated (disconnecting several
397 -- circuits for improvement of messages, deletion of duplicate
398 -- messages etc). Useful to diagnose compiler bombs caused by
399 -- erroneous handling of error situations
401 -- dP Do not check for controlled objects in preelaborable packages.
402 -- RM 10.2.1(9) forbids the use of library level controlled objects
403 -- in preelaborable packages, but this restriction is a huge pain,
404 -- especially in the predefined library units.
406 -- dR Bypass the check for a proper version of s-rpc being present
407 -- to use the -gnatz? switch. This allows debugging of the use
408 -- of stubs generation without needing to have GLADE (or some
409 -- other PCS installed).
411 -- dS Omit conversion of fpt numbers to exact machine numbers in
412 -- non-static evaluation contexts (see Check_Non_Static_Context).
413 -- This is intended for testing out timing problems with this
414 -- conversion circuit.
416 -- dT Similar to dS, but omits the conversions only in the case where
417 -- the parent is not a constant declaration.
419 -- dU Enable garbage collection of unreachable entities. This enables
420 -- both the reachability analysis and changing the Is_Public and
421 -- Is_Eliminated flags.
423 -- dV Enable viewing of all symbols in debugger. Causes debug information
424 -- to be generated for all symbols, including internal symbols. This
425 -- is enabled by default for -gnatD, but this switch allows this to
426 -- be enabled without generating modified source files. Note that the
427 -- use of -gnatdV ensures in the dwarf/elf case that all symbols that
428 -- are present in the elf tables are also in the dwarf tables (which
429 -- seems to be required by some tools). Another effect of dV is to
430 -- generate full qualified names, including internal names generated
431 -- for blocks and loops.
433 -- dW Disable warnings when a possibly uninitialized scalar value is
434 -- passed to an IN OUT parameter of a procedure. This usage is a
435 -- quite improper bounded error [erroneous in Ada 83] situation,
436 -- and would normally generate a warning. However, to ease the
437 -- task of transitioning incorrect legacy code, we provide this
438 -- undocumented feature for suppressing these warnings.
440 -- dY Enable configurable run-time mode, just as though the System file
441 -- had Configurable_Run_Time_Mode set to True. This is useful in
442 -- testing high integrity mode.
444 -- d.f Suppress folding of static expressions. This of course results
445 -- in seriously non-conforming behavior, but is useful sometimes
446 -- when tracking down handling of complex expressions.
448 -- d.x No exception handlers in generated code. This causes exception
449 -- handlers to be eliminated from the generated code. They are still
450 -- fully compiled and analyzed, they just get eliminated from the
451 -- code generation step.
453 -- d1 Error messages have node numbers where possible. Normally error
454 -- messages have only source locations. This option is useful when
455 -- debugging errors caused by expanded code, where the source location
456 -- does not give enough information.
458 -- d2 Suppress output of the error position flags for verbose form error
459 -- messages. The messages are still interspersed in the listing, but
460 -- without any error flags or extra blank lines. Also causes an extra
461 -- <<< to be output at the right margin. This is intended to be the
462 -- easiest format for checking conformance of ACATS B tests. This
463 -- flag also suppresses the additional messages explaining why a
464 -- non-static expression is non-static (see Sem_Eval.Why_Not_Static).
465 -- This avoids having to worry about these messages in ACATS testing.
467 -- d3 Causes Comperr to dump the contents of the node for which an abort
468 -- was detected (normally only the Node_Id of the node is output).
470 -- d4 Inhibits automatic krunching of predefined library unit file names.
471 -- Normally, as described in the spec of package Krunch, such files
472 -- are automatically krunched to 8 characters, with special treatment
473 -- of the prefixes Ada, System, and Interfaces. Setting this debug
474 -- switch disables this special treatment.
476 -- d5 Causes the tree read/write circuit to output detailed information
477 -- tracking the data that is read and written element by element.
479 -- d6 Normally access-to-unconstrained-array types are represented
480 -- using fat (double) pointers. Using this debug flag causes them
481 -- to default to thin. This can be used to test the performance
482 -- implications of using thin pointers, and also to test that the
483 -- compiler functions correctly with this choice.
485 -- d7 Normally a -gnatl or -gnatv listing includes the time stamp
486 -- of the source file. This debug flag suppresses this output,
487 -- and also suppresses the message with the version number.
488 -- This is useful in certain regression tests.
490 -- d8 This forces the packed stuff to generate code assuming the
491 -- opposite endianness from the actual correct value. Useful in
492 -- testing out code generation from the packed routines.
494 ------------------------------------------
495 -- Documentation for Binder Debug Flags --
496 ------------------------------------------
498 -- da Normally if there is an elaboration circularity, then in describing
499 -- the cycle, links involving internal units are omitted, since they
500 -- are irrelevant and confusing. This debug flag causes all links to
501 -- be listed, and is useful when diagnosing circularities introduced
502 -- by incorrect changes to the run-time library itself.
504 -- dc List units as they are chosen. As units are selected for addition to
505 -- the elaboration order, a line of output is generated showing which
506 -- unit has been selected.
508 -- de Similar to the effect of -e (output complete list of elaboration
509 -- dependencies) except that internal units are included in the
510 -- listing.
512 -- di Normally gnatbind calls Read_Ali with Ignore_Errors set to
513 -- False, since the binder really needs correct version ALI
514 -- files to do its job. This debug flag causes Ignore_Errors
515 -- mode to be set for the binder (and is particularly useful
516 -- for testing ignore errors mode).
518 -- dn List details of manipulation of Num_Pred values during execution of
519 -- the algorithm used to determine a correct order of elaboration. This
520 -- is useful in diagnosing any problems in its behavior.
522 -- du List unit name and file name for each unit as it is read in
524 -- dx Force the binder to read (and then ignore) the xref information
525 -- in ali files (used to check that read circuit is working OK).
527 ------------------------------------------------------------
528 -- Documentation for the Debug Flags used in package Make --
529 ------------------------------------------------------------
531 -- Please note that such flags apply to all of Make clients,
532 -- such as gnatmake.
534 -- dn Do not delete temporary files creates by Make at the end
535 -- of execution, such as temporary config pragma files, mapping
536 -- files or project path files.
538 -- dp Prints the Q used by routine Make.Compile_Sources every time
539 -- we go around the main compile loop of Make.Compile_Sources
541 -- dq Prints source files as they are enqueued and dequeued in the Q
542 -- used by routine Make.Compile_Sources. Useful to figure out the
543 -- order in which sources are recompiled.
545 -- dt When a time stamp mismatch has been found for an ALI file,
546 -- display the source file name, the time stamp expected and
547 -- the time stamp found.
549 -- du List unit name and file name for each unit as it is read in
551 -- dw Prints the list of units withed by the unit currently explored
552 -- during the main loop of Make.Compile_Sources.
554 ----------------------
555 -- Get_Debug_Flag_K --
556 ----------------------
558 function Get_Debug_Flag_K return Boolean is
559 begin
560 return Debug_Flag_K;
561 end Get_Debug_Flag_K;
563 --------------------
564 -- Set_Debug_Flag --
565 --------------------
567 procedure Set_Debug_Flag (C : Character; Val : Boolean := True) is
568 subtype Dig is Character range '1' .. '9';
569 subtype LLet is Character range 'a' .. 'z';
570 subtype ULet is Character range 'A' .. 'Z';
572 begin
573 if C in Dig then
574 case Dig (C) is
575 when '1' => Debug_Flag_1 := Val;
576 when '2' => Debug_Flag_2 := Val;
577 when '3' => Debug_Flag_3 := Val;
578 when '4' => Debug_Flag_4 := Val;
579 when '5' => Debug_Flag_5 := Val;
580 when '6' => Debug_Flag_6 := Val;
581 when '7' => Debug_Flag_7 := Val;
582 when '8' => Debug_Flag_8 := Val;
583 when '9' => Debug_Flag_9 := Val;
584 end case;
586 elsif C in ULet then
587 case ULet (C) is
588 when 'A' => Debug_Flag_AA := Val;
589 when 'B' => Debug_Flag_BB := Val;
590 when 'C' => Debug_Flag_CC := Val;
591 when 'D' => Debug_Flag_DD := Val;
592 when 'E' => Debug_Flag_EE := Val;
593 when 'F' => Debug_Flag_FF := Val;
594 when 'G' => Debug_Flag_GG := Val;
595 when 'H' => Debug_Flag_HH := Val;
596 when 'I' => Debug_Flag_II := Val;
597 when 'J' => Debug_Flag_JJ := Val;
598 when 'K' => Debug_Flag_KK := Val;
599 when 'L' => Debug_Flag_LL := Val;
600 when 'M' => Debug_Flag_MM := Val;
601 when 'N' => Debug_Flag_NN := Val;
602 when 'O' => Debug_Flag_OO := Val;
603 when 'P' => Debug_Flag_PP := Val;
604 when 'Q' => Debug_Flag_QQ := Val;
605 when 'R' => Debug_Flag_RR := Val;
606 when 'S' => Debug_Flag_SS := Val;
607 when 'T' => Debug_Flag_TT := Val;
608 when 'U' => Debug_Flag_UU := Val;
609 when 'V' => Debug_Flag_VV := Val;
610 when 'W' => Debug_Flag_WW := Val;
611 when 'X' => Debug_Flag_XX := Val;
612 when 'Y' => Debug_Flag_YY := Val;
613 when 'Z' => Debug_Flag_ZZ := Val;
614 end case;
616 else
617 case LLet (C) is
618 when 'a' => Debug_Flag_A := Val;
619 when 'b' => Debug_Flag_B := Val;
620 when 'c' => Debug_Flag_C := Val;
621 when 'd' => Debug_Flag_D := Val;
622 when 'e' => Debug_Flag_E := Val;
623 when 'f' => Debug_Flag_F := Val;
624 when 'g' => Debug_Flag_G := Val;
625 when 'h' => Debug_Flag_H := Val;
626 when 'i' => Debug_Flag_I := Val;
627 when 'j' => Debug_Flag_J := Val;
628 when 'k' => Debug_Flag_K := Val;
629 when 'l' => Debug_Flag_L := Val;
630 when 'm' => Debug_Flag_M := Val;
631 when 'n' => Debug_Flag_N := Val;
632 when 'o' => Debug_Flag_O := Val;
633 when 'p' => Debug_Flag_P := Val;
634 when 'q' => Debug_Flag_Q := Val;
635 when 'r' => Debug_Flag_R := Val;
636 when 's' => Debug_Flag_S := Val;
637 when 't' => Debug_Flag_T := Val;
638 when 'u' => Debug_Flag_U := Val;
639 when 'v' => Debug_Flag_V := Val;
640 when 'w' => Debug_Flag_W := Val;
641 when 'x' => Debug_Flag_X := Val;
642 when 'y' => Debug_Flag_Y := Val;
643 when 'z' => Debug_Flag_Z := Val;
644 end case;
645 end if;
646 end Set_Debug_Flag;
648 ---------------------------
649 -- Set_Dotted_Debug_Flag --
650 ---------------------------
652 procedure Set_Dotted_Debug_Flag (C : Character; Val : Boolean := True) is
653 subtype Dig is Character range '1' .. '9';
654 subtype LLet is Character range 'a' .. 'z';
655 subtype ULet is Character range 'A' .. 'Z';
657 begin
658 if C in Dig then
659 case Dig (C) is
660 when '1' => Debug_Flag_Dot_1 := Val;
661 when '2' => Debug_Flag_Dot_2 := Val;
662 when '3' => Debug_Flag_Dot_3 := Val;
663 when '4' => Debug_Flag_Dot_4 := Val;
664 when '5' => Debug_Flag_Dot_5 := Val;
665 when '6' => Debug_Flag_Dot_6 := Val;
666 when '7' => Debug_Flag_Dot_7 := Val;
667 when '8' => Debug_Flag_Dot_8 := Val;
668 when '9' => Debug_Flag_Dot_9 := Val;
669 end case;
671 elsif C in ULet then
672 case ULet (C) is
673 when 'A' => Debug_Flag_Dot_AA := Val;
674 when 'B' => Debug_Flag_Dot_BB := Val;
675 when 'C' => Debug_Flag_Dot_CC := Val;
676 when 'D' => Debug_Flag_Dot_DD := Val;
677 when 'E' => Debug_Flag_Dot_EE := Val;
678 when 'F' => Debug_Flag_Dot_FF := Val;
679 when 'G' => Debug_Flag_Dot_GG := Val;
680 when 'H' => Debug_Flag_Dot_HH := Val;
681 when 'I' => Debug_Flag_Dot_II := Val;
682 when 'J' => Debug_Flag_Dot_JJ := Val;
683 when 'K' => Debug_Flag_Dot_KK := Val;
684 when 'L' => Debug_Flag_Dot_LL := Val;
685 when 'M' => Debug_Flag_Dot_MM := Val;
686 when 'N' => Debug_Flag_Dot_NN := Val;
687 when 'O' => Debug_Flag_Dot_OO := Val;
688 when 'P' => Debug_Flag_Dot_PP := Val;
689 when 'Q' => Debug_Flag_Dot_QQ := Val;
690 when 'R' => Debug_Flag_Dot_RR := Val;
691 when 'S' => Debug_Flag_Dot_SS := Val;
692 when 'T' => Debug_Flag_Dot_TT := Val;
693 when 'U' => Debug_Flag_Dot_UU := Val;
694 when 'V' => Debug_Flag_Dot_VV := Val;
695 when 'W' => Debug_Flag_Dot_WW := Val;
696 when 'X' => Debug_Flag_Dot_XX := Val;
697 when 'Y' => Debug_Flag_Dot_YY := Val;
698 when 'Z' => Debug_Flag_Dot_ZZ := Val;
699 end case;
701 else
702 case LLet (C) is
703 when 'a' => Debug_Flag_Dot_A := Val;
704 when 'b' => Debug_Flag_Dot_B := Val;
705 when 'c' => Debug_Flag_Dot_C := Val;
706 when 'd' => Debug_Flag_Dot_D := Val;
707 when 'e' => Debug_Flag_Dot_E := Val;
708 when 'f' => Debug_Flag_Dot_F := Val;
709 when 'g' => Debug_Flag_Dot_G := Val;
710 when 'h' => Debug_Flag_Dot_H := Val;
711 when 'i' => Debug_Flag_Dot_I := Val;
712 when 'j' => Debug_Flag_Dot_J := Val;
713 when 'k' => Debug_Flag_Dot_K := Val;
714 when 'l' => Debug_Flag_Dot_L := Val;
715 when 'm' => Debug_Flag_Dot_M := Val;
716 when 'n' => Debug_Flag_Dot_N := Val;
717 when 'o' => Debug_Flag_Dot_O := Val;
718 when 'p' => Debug_Flag_Dot_P := Val;
719 when 'q' => Debug_Flag_Dot_Q := Val;
720 when 'r' => Debug_Flag_Dot_R := Val;
721 when 's' => Debug_Flag_Dot_S := Val;
722 when 't' => Debug_Flag_Dot_T := Val;
723 when 'u' => Debug_Flag_Dot_U := Val;
724 when 'v' => Debug_Flag_Dot_V := Val;
725 when 'w' => Debug_Flag_Dot_W := Val;
726 when 'x' => Debug_Flag_Dot_X := Val;
727 when 'y' => Debug_Flag_Dot_Y := Val;
728 when 'z' => Debug_Flag_Dot_Z := Val;
729 end case;
730 end if;
731 end Set_Dotted_Debug_Flag;
733 end Debug;