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