aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/elab-vhdl_debug.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-08-28 10:27:25 +0200
committerTristan Gingold <tgingold@free.fr>2022-09-02 02:31:06 +0200
commit91303467eac522662572d9106e2a3cb724b24a0d (patch)
tree42225eb45dd10fa38a47f4bacebe82bfb6cb3934 /src/synth/elab-vhdl_debug.adb
parent50f1990e59efaf927658c354aa6e2c81461964da (diff)
downloadghdl-91303467eac522662572d9106e2a3cb724b24a0d.tar.gz
ghdl-91303467eac522662572d9106e2a3cb724b24a0d.tar.bz2
ghdl-91303467eac522662572d9106e2a3cb724b24a0d.zip
synth: factorize code for tracing statements execution
Diffstat (limited to 'src/synth/elab-vhdl_debug.adb')
-rw-r--r--src/synth/elab-vhdl_debug.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/synth/elab-vhdl_debug.adb b/src/synth/elab-vhdl_debug.adb
index 87b45f799..08cbda879 100644
--- a/src/synth/elab-vhdl_debug.adb
+++ b/src/synth/elab-vhdl_debug.adb
@@ -44,6 +44,18 @@ with Vhdl.Std_Package;
with Vhdl.Prints;
package body Elab.Vhdl_Debug is
+ procedure Put_Stmt_Trace (Stmt : Iir)
+ is
+ Name : Name_Id;
+ Line : Natural;
+ Col : Natural;
+ begin
+ Files_Map.Location_To_Position (Get_Location (Stmt), Name, Line, Col);
+ Simple_IO.Put_Line ("Execute statement at "
+ & Name_Table.Image (Name)
+ & Natural'Image (Line));
+ end Put_Stmt_Trace;
+
procedure Disp_Discrete_Value (Val : Int64; Btype : Node) is
begin
case Get_Kind (Btype) is