OSDN Git Service

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