aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-01-12 18:12:41 +0100
committerTristan Gingold <tgingold@free.fr>2023-01-12 18:12:41 +0100
commite86c5c060f4abd4fc978345e8253df524338f5df (patch)
tree66870694feb23fd874d9c2d042e19ea3fa15688a
parent39a250b87928a2bd0f8da73a2b344ff2688515d2 (diff)
downloadghdl-e86c5c060f4abd4fc978345e8253df524338f5df.tar.gz
ghdl-e86c5c060f4abd4fc978345e8253df524338f5df.tar.bz2
ghdl-e86c5c060f4abd4fc978345e8253df524338f5df.zip
elab-vhdl_values-debug: improve output for array unbounded
-rw-r--r--src/synth/elab-vhdl_values-debug.adb35
1 files changed, 21 insertions, 14 deletions
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