aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/bindo.adb
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2019-07-11 08:01:21 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-11 08:01:21 +0000
commit490ed9ba846d15baba24646b7ecf3ed6b7c19fcb (patch)
tree61fa6e8e97c43d5f61918800f2d506ef1e245aaa /gcc/ada/bindo.adb
parenta34badbdf000e931dfa1a1291cf2739e2c75e68d (diff)
downloadgcc-490ed9ba846d15baba24646b7ecf3ed6b7c19fcb.zip
gcc-490ed9ba846d15baba24646b7ecf3ed6b7c19fcb.tar.gz
gcc-490ed9ba846d15baba24646b7ecf3ed6b7c19fcb.tar.bz2
[Ada] Elaboration order v4.0 and infinite loops
This patch introduces binder switch -d_S which prompts the various phases of the elaboration order mechanism to output a short message concerning their commencement and completion. The output is useful when trying to determine whether a phase is stuck in an infinite loop. ------------ -- Source -- ------------ -- main.adb procedure Main is begin null; end Main; ---------------------------- -- Compilation and output -- ---------------------------- $ gnatmake -q main.adb -bargs -d_S -d_V elaborating units... collecting units... units collected. constructing library graph... validating library graph... library graph validated. library graph constructed. constructing invocation graph... validating invocation graph... invocation graph validated. invocation graph constructed. augmenting library graph... library graph augmented. discovering components... components discovered. validating elaboration order... elaboration order validated. units elaborated. 2019-07-11 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * bindo.adb: Update the section of switches and debugging elaboration issues. * bindo.ads: Add type Elaboration_Phase. * bindo-augmentors.adb: Add use clause for Bindo.Writers.Phase_Writers. (Augment_Library_Graph): Signal the start and end of the aubmentation phase. * bindo-builders.adb: Add with and use clause for Bindo.Writers. Add use clause for Bindo.Writers.Phase_Writers. (Build_Invocation_Graph): Signal the start and end of the invocation graph construction phase. (Build_Library_Graph): Signal the start and end of the library graph construction phase. * bindo-diagnostics.adb: Add use clause for Bindo.Writers.Phase_Writers. (Diagnose_Cycle): Signal the start and end of the cycle diagnostic phase. * bindo-elaborators.adb: Add use clause for Bindo.Writers.Phase_Writers. (Elaborate_Units): Signal the start and end of the unit elaboration phase. * bindo-graphs.adb: Add use clause for Bindo.Writers.Phase_Writers. (Find_Components): Signal the start and end of the component discovery phase. (Find_Cycles): Signal the start and end of the cycle discovery phase. * bindo-units.adb: Add with and use clause for Bindo.Writers. Add use clause for Bindo.Writers.Phase_Writers. (Collect_Elaborable_Units): Signal the start and end of the unit collection phase. * bindo-validators.adb: Add with and use clause for Bindo.Writers. Add use clause for Bindo.Writers.Phase_Writers. (Validate_Cycles, Validate_Elaboration_Order, Validate_Invocation_Graph, Validate_Library_Graph): Signal the start and end of the libray graph validation phase. * bindo-writers.ads, bindo-writers.adb: Add new nested package Phase_Writers. * debug.adb: Update the documentation of switch d_S. From-SVN: r273379
Diffstat (limited to 'gcc/ada/bindo.adb')
-rw-r--r--gcc/ada/bindo.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/bindo.adb b/gcc/ada/bindo.adb
index 678f009..d5830ca 100644
--- a/gcc/ada/bindo.adb
+++ b/gcc/ada/bindo.adb
@@ -355,6 +355,11 @@ package body Bindo is
--
-- GNATbind output the cycle paths in text format to standard output
--
+ -- -d_S Output elaboration-order status information
+ --
+ -- GNATbind outputs trace information concerning the status of its
+ -- various phases to standard output.
+ --
-- -d_T Output elaboration-order trace information
--
-- GNATbind outputs trace information on elaboration-order detection
@@ -416,6 +421,11 @@ package body Bindo is
-- plgv -- print library-graph vertex
-- pu -- print units
--
+ -- * Apparent infinite loop
+ --
+ -- The elaboration order mechanism appears to be stuck in an infinite
+ -- loop. Use switch -d_S to output the status of each elaboration phase.
+ --
-- * Invalid elaboration order
--
-- The elaboration order is invalid when: