aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/elab-vhdl_debug.adb12
-rw-r--r--src/synth/elab-vhdl_debug.ads2
-rw-r--r--src/synth/synth-vhdl_stmts.adb15
3 files changed, 16 insertions, 13 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
diff --git a/src/synth/elab-vhdl_debug.ads b/src/synth/elab-vhdl_debug.ads
index 0690c9c2e..a1200d621 100644
--- a/src/synth/elab-vhdl_debug.ads
+++ b/src/synth/elab-vhdl_debug.ads
@@ -48,5 +48,7 @@ package Elab.Vhdl_Debug is
procedure Disp_Instance_Path (Inst : Synth_Instance_Acc;
Components : Boolean := False);
+ procedure Put_Stmt_Trace (Stmt : Iir);
+
procedure Append_Commands;
end Elab.Vhdl_Debug;
diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb
index 68acfc94d..8cef43807 100644
--- a/src/synth/synth-vhdl_stmts.adb
+++ b/src/synth/synth-vhdl_stmts.adb
@@ -22,10 +22,8 @@ with Grt.Types; use Grt.Types;
with Grt.Algos;
with Grt.Severity; use Grt.Severity;
with Areapools;
-with Name_Table;
with Std_Names;
with Errorout; use Errorout;
-with Files_Map;
with Simple_IO;
with Vhdl.Errors; use Vhdl.Errors;
@@ -45,6 +43,7 @@ with Elab.Memtype; use Elab.Memtype;
with Elab.Vhdl_Heap;
with Elab.Vhdl_Types; use Elab.Vhdl_Types;
with Elab.Vhdl_Expr; use Elab.Vhdl_Expr;
+with Elab.Vhdl_Debug;
with Elab.Debugger;
with Synth.Errors; use Synth.Errors;
@@ -3201,17 +3200,7 @@ package body Synth.Vhdl_Stmts is
end if;
if Flags.Flag_Trace_Statements then
- declare
- 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;
+ Elab.Vhdl_Debug.Put_Stmt_Trace (Stmt);
end if;
if Elab.Debugger.Flag_Need_Debug then
Elab.Debugger.Debug_Break (C.Inst, Stmt);