From e86c5c060f4abd4fc978345e8253df524338f5df Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 12 Jan 2023 18:12:41 +0100 Subject: elab-vhdl_values-debug: improve output for array unbounded --- src/synth/elab-vhdl_values-debug.adb | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/synth/elab-vhdl_values-debug.adb b/src/synth/elab-vhdl_values-debug.adb index f6d10e770..76e8caa0a 100644 --- a/src/synth/elab-vhdl_values-debug.adb +++ b/src/synth/elab-vhdl_values-debug.adb @@ -57,6 +57,25 @@ package body Elab.Vhdl_Values.Debug is Put (']'); end Debug_Typ_Phys; + procedure Debug_Typ1 (T : Type_Acc); + + procedure Debug_Typ_Arr (T : Type_Acc) + is + It : Type_Acc; + begin + Put (" ("); + + It := T; + loop + Debug_Bound (It.Abound, True); + exit when It.Alast; + Put (", "); + It := It.Arr_El; + end loop; + Put (") of "); + Debug_Typ1 (It.Arr_El); + end Debug_Typ_Arr; + procedure Debug_Typ1 (T : Type_Acc) is begin case T.Kind is @@ -76,20 +95,7 @@ package body Elab.Vhdl_Values.Debug is when Type_Array => Put ("arr "); Debug_Typ_Phys (T); - Put (" ("); - declare - It : Type_Acc; - begin - It := T; - loop - Debug_Bound (It.Abound, True); - exit when It.Alast; - Put (", "); - It := It.Arr_El; - end loop; - Put (") of "); - Debug_Typ1 (It.Arr_El); - end; + Debug_Typ_Arr (T); when Type_Record => Put ("rec "); Debug_Typ_Phys (T); @@ -134,6 +140,7 @@ package body Elab.Vhdl_Values.Debug is Put ("unbounded vector"); when Type_Array_Unbounded => Put ("array_unbounded"); + Debug_Typ_Arr (T); when Type_Unbounded_Array => Put ("unbounded arr ("); declare -- cgit v1.2.3