From 459a86cfe7ca49ce1ff0582f46214f28c442aa69 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 13 Jan 2023 21:44:53 +0100 Subject: elab-vhdl_debug: add option /t to print result type --- src/synth/elab-vhdl_debug.adb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/synth/elab-vhdl_debug.adb b/src/synth/elab-vhdl_debug.adb index a523a8e5c..339c14932 100644 --- a/src/synth/elab-vhdl_debug.adb +++ b/src/synth/elab-vhdl_debug.adb @@ -1320,8 +1320,8 @@ package body Elab.Vhdl_Debug is Expr : Iir; Res : Valtyp; P : Natural; - Opt_Value : Boolean := False; Opt_Name : Boolean := False; + Opt_Type : Boolean := False; Marker : Mark_Type; Cur_Scope : Node; begin @@ -1329,8 +1329,8 @@ package body Elab.Vhdl_Debug is P := Line'First; loop P := Skip_Blanks (Line (P .. Line'Last)); - if P + 2 < Line'Last and then Line (P .. P + 1) = "/v" then - Opt_Value := True; + if P + 2 < Line'Last and then Line (P .. P + 1) = "/t" then + Opt_Type := True; P := P + 2; elsif P + 2 < Line'Last and then Line (P .. P + 1) = "/n" then Opt_Name := True; @@ -1340,8 +1340,6 @@ package body Elab.Vhdl_Debug is end if; end loop; - pragma Unreferenced (Opt_Value); - Buffer_Index := Buffer_Index + 1; Index_Str (Index_Str'First) := '*'; File := Files_Map.Create_Source_File_From_String @@ -1405,6 +1403,9 @@ package body Elab.Vhdl_Debug is Elab.Vhdl_Values.Debug.Debug_Valtyp (Res); end if; New_Line; + if Opt_Type then + Debug_Typ (Res.Typ); + end if; end if; -- Free value -- cgit v1.2.3