Mercurial > hg > CbC > CbC_gcc
comparison gcc/ada/debug.adb @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
4 -- -- | 4 -- -- |
5 -- D E B U G -- | 5 -- D E B U G -- |
6 -- -- | 6 -- -- |
7 -- B o d y -- | 7 -- B o d y -- |
8 -- -- | 8 -- -- |
9 -- Copyright (C) 1992-2017, Free Software Foundation, Inc. -- | 9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. -- |
10 -- -- | 10 -- -- |
11 -- GNAT is free software; you can redistribute it and/or modify it under -- | 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- -- | 12 -- terms of the GNU General Public License as published by the Free Soft- -- |
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- | 13 -- ware Foundation; either version 3, or (at your option) any later ver- -- |
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- | 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
143 -- d.W Print out debugging information for Walk_Library_Items | 143 -- d.W Print out debugging information for Walk_Library_Items |
144 -- d.X Old treatment of indexing aspects | 144 -- d.X Old treatment of indexing aspects |
145 -- d.Y | 145 -- d.Y |
146 -- d.Z Do not enable expansion in configurable run-time mode | 146 -- d.Z Do not enable expansion in configurable run-time mode |
147 | 147 |
148 -- d_a Stop elaboration checks on accept or select statement | |
149 -- d_b | |
150 -- d_c | |
151 -- d_d | |
152 -- d_e Ignore entry calls and requeue statements for elaboration | |
153 -- d_f Issue info messages related to GNATprove usage | |
154 -- d_g | |
155 -- d_h | |
156 -- d_i Ignore activations and calls to instances for elaboration | |
157 -- d_j | |
158 -- d_k | |
159 -- d_l | |
160 -- d_m | |
161 -- d_n | |
162 -- d_o | |
163 -- d_p Ignore assertion pragmas for elaboration | |
164 -- d_q | |
165 -- d_r | |
166 -- d_s Stop elaboration checks on synchronous suspension | |
167 -- d_t | |
168 -- d_u | |
169 -- d_v | |
170 -- d_w | |
171 -- d_x | |
172 -- d_y | |
173 -- d_z | |
174 | |
175 -- d_A Stop generation of ALI file | |
176 -- d_B | |
177 -- d_C | |
178 -- d_D | |
179 -- d_E | |
180 -- d_F | |
181 -- d_G | |
182 -- d_H | |
183 -- d_I | |
184 -- d_J | |
185 -- d_K | |
186 -- d_L Output trace information on elaboration checking | |
187 -- d_M | |
188 -- d_N | |
189 -- d_O | |
190 -- d_P | |
191 -- d_Q | |
192 -- d_R | |
193 -- d_S | |
194 -- d_T | |
195 -- d_U | |
196 -- d_V | |
197 -- d_W | |
198 -- d_X | |
199 -- d_Y | |
200 -- d_Z | |
201 | |
148 -- d1 Error msgs have node numbers where possible | 202 -- d1 Error msgs have node numbers where possible |
149 -- d2 Eliminate error flags in verbose form error messages | 203 -- d2 Eliminate error flags in verbose form error messages |
150 -- d3 Dump bad node in Comperr on an abort | 204 -- d3 Dump bad node in Comperr on an abort |
151 -- d4 Inhibit automatic krunch of predefined library unit files | 205 -- d4 Inhibit automatic krunch of predefined library unit files |
152 -- d5 Debug output for tree read/write | 206 -- d5 Debug output for tree read/write |
159 -- d.2 Allow statements in declarative part | 213 -- d.2 Allow statements in declarative part |
160 -- d.3 Output debugging information from Exp_Unst | 214 -- d.3 Output debugging information from Exp_Unst |
161 -- d.4 Do not delete generated C file in case of errors | 215 -- d.4 Do not delete generated C file in case of errors |
162 -- d.5 Do not generate imported subprogram definitions in C code | 216 -- d.5 Do not generate imported subprogram definitions in C code |
163 -- d.6 Do not avoid declaring unreferenced types in C code | 217 -- d.6 Do not avoid declaring unreferenced types in C code |
164 -- d.7 | 218 -- d.7 Disable unsound heuristics in gnat2scil (for CP as SPARK prover) |
165 -- d.8 | 219 -- d.8 |
166 -- d.9 Disable build-in-place for nonlimited types | 220 -- d.9 Disable build-in-place for nonlimited types |
221 | |
222 -- d_1 | |
223 -- d_2 | |
224 -- d_3 | |
225 -- d_4 | |
226 -- d_5 | |
227 -- d_6 | |
228 -- d_7 | |
229 -- d_8 | |
230 -- d_9 | |
167 | 231 |
168 -- Debug flags for binder (GNATBIND) | 232 -- Debug flags for binder (GNATBIND) |
169 | 233 |
170 -- da All links (including internal units) listed if there is a cycle | 234 -- da All links (including internal units) listed if there is a cycle |
171 -- db Output information from Better_Choice | 235 -- db Output information from Better_Choice |
413 -- dK Kill all error messages. This debug flag suppresses the output | 477 -- dK Kill all error messages. This debug flag suppresses the output |
414 -- of all error messages. It is used in regression tests where the | 478 -- of all error messages. It is used in regression tests where the |
415 -- error messages are target dependent and irrelevant. | 479 -- error messages are target dependent and irrelevant. |
416 | 480 |
417 -- dL The compiler ignores calls in instances and invoke subprograms | 481 -- dL The compiler ignores calls in instances and invoke subprograms |
418 -- which are external to the instance for the static elaboration | 482 -- which are external to the instance for both the static and dynamic |
419 -- model. This switch is orthogonal to d.G. | 483 -- elaboration models. |
420 | 484 |
421 -- dM Assume all variables have been modified, and ignore current value | 485 -- dM Assume all variables have been modified, and ignore current value |
422 -- indications. This debug flag disconnects the tracking of constant | 486 -- indications. This debug flag disconnects the tracking of constant |
423 -- values (see Exp_Ch2.Expand_Current_Value). | 487 -- values (see Exp_Ch2.Expand_Current_Value). |
424 | 488 |
668 -- the special mode used by GNATprove. | 732 -- the special mode used by GNATprove. |
669 | 733 |
670 -- d.G Previously the compiler ignored calls via generic formal parameters | 734 -- d.G Previously the compiler ignored calls via generic formal parameters |
671 -- when doing the analysis for the static elaboration model. This is | 735 -- when doing the analysis for the static elaboration model. This is |
672 -- now fixed, but we provide this debug flag to revert to the previous | 736 -- now fixed, but we provide this debug flag to revert to the previous |
673 -- situation of ignoring such calls to aid in transition. This switch | 737 -- situation of ignoring such calls to aid in transition. |
674 -- is orthogonal to dL. | |
675 | 738 |
676 -- d.H Sets ASIS_GNSA_Mode to True. This signals the front end to suppress | 739 -- d.H Sets ASIS_GNSA_Mode to True. This signals the front end to suppress |
677 -- the call to gigi in ASIS_Mode. | 740 -- the call to gigi in ASIS_Mode. |
678 | 741 |
679 -- d.I Do not ignore enum representation clauses in CodePeer mode. | 742 -- d.I Do not ignore enum representation clauses in CodePeer mode. |
756 -- d.Z Normally we always enable expansion in configurable run-time mode | 819 -- d.Z Normally we always enable expansion in configurable run-time mode |
757 -- to make sure we get error messages about unsupported features even | 820 -- to make sure we get error messages about unsupported features even |
758 -- when compiling in -gnatc mode. But expansion is turned off in this | 821 -- when compiling in -gnatc mode. But expansion is turned off in this |
759 -- case if debug flag -gnatd.Z is used. This is to deal with the case | 822 -- case if debug flag -gnatd.Z is used. This is to deal with the case |
760 -- where we discover difficulties in this new processing. | 823 -- where we discover difficulties in this new processing. |
824 | |
825 -- d_a The compiler stops the examination of a task body once it reaches | |
826 -- an accept or select statement for the static elaboration model. The | |
827 -- behavior is similar to that of No_Entry_Calls_In_Elaboration_Code, | |
828 -- but does not penalize actual entry calls in elaboration code. | |
829 | |
830 -- d_e The compiler ignores simple entry calls, asynchronous transfer of | |
831 -- control, conditional entry calls, timed entry calls, and requeue | |
832 -- statements in both the static and dynamic elaboration models. | |
833 | |
834 -- d_f Issue info messages related to GNATprove usage to help users | |
835 -- understand analysis results. By default these are not issued as | |
836 -- beginners find them confusing. Set automatically by GNATprove when | |
837 -- switch --info is used. | |
838 | |
839 -- d_i The compiler ignores calls and task activations when they target a | |
840 -- subprogram or task type defined in an external instance for both | |
841 -- the static and dynamic elaboration models. | |
842 | |
843 -- d_p The compiler ignores calls to subprograms which verify the run-time | |
844 -- semantics of invariants and postconditions in both the static and | |
845 -- dynamic elaboration models. | |
846 | |
847 -- d_s The compiler stops the examination of a task body once it reaches | |
848 -- a call to routine Ada.Synchronous_Task_Control.Suspend_Until_True | |
849 -- or Ada.Synchronous_Barriers.Wait_For_Release. | |
850 | |
851 -- d_A Do not generate ALI files by setting Opt.Disable_ALI_File. | |
852 | |
853 -- d_L Output trace information on elaboration checking. This debug switch | |
854 -- causes output to be generated showing each call or instantiation as | |
855 -- it is checked, and the progress of the recursive trace through | |
856 -- elaboration calls at compile time. | |
761 | 857 |
762 -- d1 Error messages have node numbers where possible. Normally error | 858 -- d1 Error messages have node numbers where possible. Normally error |
763 -- messages have only source locations. This option is useful when | 859 -- messages have only source locations. This option is useful when |
764 -- debugging errors caused by expanded code, where the source location | 860 -- debugging errors caused by expanded code, where the source location |
765 -- does not give enough information. | 861 -- does not give enough information. |
825 | 921 |
826 -- d.6 By default the C back-end avoids declaring types that are not | 922 -- d.6 By default the C back-end avoids declaring types that are not |
827 -- referenced by the generated C code. This debug flag restores the | 923 -- referenced by the generated C code. This debug flag restores the |
828 -- output of all the types. | 924 -- output of all the types. |
829 | 925 |
926 -- d.7 Indicates (to gnat2scil) that CodePeer is being invoked as a | |
927 -- prover by the SPARK tools and that therefore gnat2scil should | |
928 -- avoid SCIL generation strategies which can introduce soundness | |
929 -- issues (e.g., assuming that a low bound of an array parameter | |
930 -- of an unconstrained subtype belongs to the index subtype). | |
931 | |
830 -- d.9 Enable build-in-place for function calls returning some nonlimited | 932 -- d.9 Enable build-in-place for function calls returning some nonlimited |
831 -- types. | 933 -- types. |
832 | 934 |
833 ------------------------------------------ | 935 ------------------------------------------ |
834 -- Documentation for Binder Debug Flags -- | 936 -- Documentation for Binder Debug Flags -- |
936 -------------------- | 1038 -------------------- |
937 -- Set_Debug_Flag -- | 1039 -- Set_Debug_Flag -- |
938 -------------------- | 1040 -------------------- |
939 | 1041 |
940 procedure Set_Debug_Flag (C : Character; Val : Boolean := True) is | 1042 procedure Set_Debug_Flag (C : Character; Val : Boolean := True) is |
941 subtype Dig is Character range '1' .. '9'; | 1043 subtype Dig is Character range '1' .. '9'; |
942 subtype LLet is Character range 'a' .. 'z'; | 1044 subtype LLet is Character range 'a' .. 'z'; |
943 subtype ULet is Character range 'A' .. 'Z'; | 1045 subtype ULet is Character range 'A' .. 'Z'; |
944 | 1046 |
945 begin | 1047 begin |
946 if C in Dig then | 1048 if C in Dig then |
1082 --------------------------- | 1184 --------------------------- |
1083 -- Set_Dotted_Debug_Flag -- | 1185 -- Set_Dotted_Debug_Flag -- |
1084 --------------------------- | 1186 --------------------------- |
1085 | 1187 |
1086 procedure Set_Dotted_Debug_Flag (C : Character; Val : Boolean := True) is | 1188 procedure Set_Dotted_Debug_Flag (C : Character; Val : Boolean := True) is |
1087 subtype Dig is Character range '1' .. '9'; | 1189 subtype Dig is Character range '1' .. '9'; |
1088 subtype LLet is Character range 'a' .. 'z'; | 1190 subtype LLet is Character range 'a' .. 'z'; |
1089 subtype ULet is Character range 'A' .. 'Z'; | 1191 subtype ULet is Character range 'A' .. 'Z'; |
1090 | 1192 |
1091 begin | 1193 begin |
1092 if C in Dig then | 1194 if C in Dig then |
1223 Debug_Flag_Dot_Z := Val; | 1325 Debug_Flag_Dot_Z := Val; |
1224 end case; | 1326 end case; |
1225 end if; | 1327 end if; |
1226 end Set_Dotted_Debug_Flag; | 1328 end Set_Dotted_Debug_Flag; |
1227 | 1329 |
1330 -------------------------------- | |
1331 -- Set_Underscored_Debug_Flag -- | |
1332 -------------------------------- | |
1333 | |
1334 procedure Set_Underscored_Debug_Flag | |
1335 (C : Character; | |
1336 Val : Boolean := True) | |
1337 is | |
1338 subtype Dig is Character range '1' .. '9'; | |
1339 subtype LLet is Character range 'a' .. 'z'; | |
1340 subtype ULet is Character range 'A' .. 'Z'; | |
1341 | |
1342 begin | |
1343 if C in Dig then | |
1344 case Dig (C) is | |
1345 when '1' => | |
1346 Debug_Flag_Underscore_1 := Val; | |
1347 when '2' => | |
1348 Debug_Flag_Underscore_2 := Val; | |
1349 when '3' => | |
1350 Debug_Flag_Underscore_3 := Val; | |
1351 when '4' => | |
1352 Debug_Flag_Underscore_4 := Val; | |
1353 when '5' => | |
1354 Debug_Flag_Underscore_5 := Val; | |
1355 when '6' => | |
1356 Debug_Flag_Underscore_6 := Val; | |
1357 when '7' => | |
1358 Debug_Flag_Underscore_7 := Val; | |
1359 when '8' => | |
1360 Debug_Flag_Underscore_8 := Val; | |
1361 when '9' => | |
1362 Debug_Flag_Underscore_9 := Val; | |
1363 end case; | |
1364 | |
1365 elsif C in ULet then | |
1366 case ULet (C) is | |
1367 when 'A' => | |
1368 Debug_Flag_Underscore_AA := Val; | |
1369 when 'B' => | |
1370 Debug_Flag_Underscore_BB := Val; | |
1371 when 'C' => | |
1372 Debug_Flag_Underscore_CC := Val; | |
1373 when 'D' => | |
1374 Debug_Flag_Underscore_DD := Val; | |
1375 when 'E' => | |
1376 Debug_Flag_Underscore_EE := Val; | |
1377 when 'F' => | |
1378 Debug_Flag_Underscore_FF := Val; | |
1379 when 'G' => | |
1380 Debug_Flag_Underscore_GG := Val; | |
1381 when 'H' => | |
1382 Debug_Flag_Underscore_HH := Val; | |
1383 when 'I' => | |
1384 Debug_Flag_Underscore_II := Val; | |
1385 when 'J' => | |
1386 Debug_Flag_Underscore_JJ := Val; | |
1387 when 'K' => | |
1388 Debug_Flag_Underscore_KK := Val; | |
1389 when 'L' => | |
1390 Debug_Flag_Underscore_LL := Val; | |
1391 when 'M' => | |
1392 Debug_Flag_Underscore_MM := Val; | |
1393 when 'N' => | |
1394 Debug_Flag_Underscore_NN := Val; | |
1395 when 'O' => | |
1396 Debug_Flag_Underscore_OO := Val; | |
1397 when 'P' => | |
1398 Debug_Flag_Underscore_PP := Val; | |
1399 when 'Q' => | |
1400 Debug_Flag_Underscore_QQ := Val; | |
1401 when 'R' => | |
1402 Debug_Flag_Underscore_RR := Val; | |
1403 when 'S' => | |
1404 Debug_Flag_Underscore_SS := Val; | |
1405 when 'T' => | |
1406 Debug_Flag_Underscore_TT := Val; | |
1407 when 'U' => | |
1408 Debug_Flag_Underscore_UU := Val; | |
1409 when 'V' => | |
1410 Debug_Flag_Underscore_VV := Val; | |
1411 when 'W' => | |
1412 Debug_Flag_Underscore_WW := Val; | |
1413 when 'X' => | |
1414 Debug_Flag_Underscore_XX := Val; | |
1415 when 'Y' => | |
1416 Debug_Flag_Underscore_YY := Val; | |
1417 when 'Z' => | |
1418 Debug_Flag_Underscore_ZZ := Val; | |
1419 end case; | |
1420 | |
1421 else | |
1422 case LLet (C) is | |
1423 when 'a' => | |
1424 Debug_Flag_Underscore_A := Val; | |
1425 when 'b' => | |
1426 Debug_Flag_Underscore_B := Val; | |
1427 when 'c' => | |
1428 Debug_Flag_Underscore_C := Val; | |
1429 when 'd' => | |
1430 Debug_Flag_Underscore_D := Val; | |
1431 when 'e' => | |
1432 Debug_Flag_Underscore_E := Val; | |
1433 when 'f' => | |
1434 Debug_Flag_Underscore_F := Val; | |
1435 when 'g' => | |
1436 Debug_Flag_Underscore_G := Val; | |
1437 when 'h' => | |
1438 Debug_Flag_Underscore_H := Val; | |
1439 when 'i' => | |
1440 Debug_Flag_Underscore_I := Val; | |
1441 when 'j' => | |
1442 Debug_Flag_Underscore_J := Val; | |
1443 when 'k' => | |
1444 Debug_Flag_Underscore_K := Val; | |
1445 when 'l' => | |
1446 Debug_Flag_Underscore_L := Val; | |
1447 when 'm' => | |
1448 Debug_Flag_Underscore_M := Val; | |
1449 when 'n' => | |
1450 Debug_Flag_Underscore_N := Val; | |
1451 when 'o' => | |
1452 Debug_Flag_Underscore_O := Val; | |
1453 when 'p' => | |
1454 Debug_Flag_Underscore_P := Val; | |
1455 when 'q' => | |
1456 Debug_Flag_Underscore_Q := Val; | |
1457 when 'r' => | |
1458 Debug_Flag_Underscore_R := Val; | |
1459 when 's' => | |
1460 Debug_Flag_Underscore_S := Val; | |
1461 when 't' => | |
1462 Debug_Flag_Underscore_T := Val; | |
1463 when 'u' => | |
1464 Debug_Flag_Underscore_U := Val; | |
1465 when 'v' => | |
1466 Debug_Flag_Underscore_V := Val; | |
1467 when 'w' => | |
1468 Debug_Flag_Underscore_W := Val; | |
1469 when 'x' => | |
1470 Debug_Flag_Underscore_X := Val; | |
1471 when 'y' => | |
1472 Debug_Flag_Underscore_Y := Val; | |
1473 when 'z' => | |
1474 Debug_Flag_Underscore_Z := Val; | |
1475 end case; | |
1476 end if; | |
1477 end Set_Underscored_Debug_Flag; | |
1478 | |
1228 end Debug; | 1479 end Debug; |