aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt/grt-wave_opt_file-parse-debug.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/grt/grt-wave_opt_file-parse-debug.adb')
-rw-r--r--src/grt/grt-wave_opt_file-parse-debug.adb13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/grt/grt-wave_opt_file-parse-debug.adb b/src/grt/grt-wave_opt_file-parse-debug.adb
index 2f8c66ec6..3461c9f3c 100644
--- a/src/grt/grt-wave_opt_file-parse-debug.adb
+++ b/src/grt/grt-wave_opt_file-parse-debug.adb
@@ -29,6 +29,9 @@ with Grt.Astdio; use Grt.Astdio;
package body Grt.Wave_Opt_File.Parse.Debug is
+ -- Dump recursively an element of the tree.
+ procedure Dump_Sub_Tree (Cursor : Elem_Acc);
+
procedure Dump_Tree is
begin
New_Line;
@@ -39,22 +42,24 @@ package body Grt.Wave_Opt_File.Parse.Debug is
else
Put_Line ("Instances : ");
end if;
- Dump_Sub_Tree (Trees (Index), 1);
+ Dump_Sub_Tree (Trees (Index));
end loop;
Put_Line ("----------- END -----------------");
New_Line;
end Dump_Tree;
- procedure Dump_Sub_Tree (Cursor : Elem_Acc; Level : Positive)
+-------------------------------------------------------------------------------
+
+ procedure Dump_Sub_Tree (Cursor : Elem_Acc)
is
Sibling_Cursor : Elem_Acc;
begin
Sibling_Cursor := Cursor;
while Sibling_Cursor /= null loop
- Put ((3 .. 2 * Level => ' '));
+ Put ((3 .. 2 * Sibling_Cursor.Level => ' '));
Put ('/');
Put_Line (Sibling_Cursor.Name.all);
- Dump_Sub_Tree (Sibling_Cursor.Next_Child, Level + 1);
+ Dump_Sub_Tree (Sibling_Cursor.Next_Child);
Sibling_Cursor := Sibling_Cursor.Next_Sibling;
end loop;
end Dump_Sub_Tree;