diff options
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/elab-debugger.adb | 3 | ||||
-rw-r--r-- | src/synth/elab-debugger.ads | 6 | ||||
-rw-r--r-- | src/synth/synth-vhdl_stmts.ads | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/synth/elab-debugger.adb b/src/synth/elab-debugger.adb index f1138904f..0f5ecb9dc 100644 --- a/src/synth/elab-debugger.adb +++ b/src/synth/elab-debugger.adb @@ -1041,6 +1041,9 @@ package body Elab.Debugger is Current_Loc := Expr; Debug (Reason_Error); end if; + if Error_Hook /= null then + Error_Hook.all; + end if; end Debug_Error; end Elab.Debugger; diff --git a/src/synth/elab-debugger.ads b/src/synth/elab-debugger.ads index cc456dfc1..bb8f91f90 100644 --- a/src/synth/elab-debugger.ads +++ b/src/synth/elab-debugger.ads @@ -45,8 +45,14 @@ package Elab.Debugger is -- To be called in case of execution error, like: -- * index out of bounds. + -- * assertion failuere procedure Debug_Error (Inst : Synth_Instance_Acc; Expr : Node); + -- Hook called in case of fatal error. + type Error_Hook_Type is access procedure; + pragma Convention (C, Error_Hook_Type); + Error_Hook : Error_Hook_Type; + function Debug_Current_Instance return Synth_Instance_Acc; type Menu_Procedure is access procedure (Line : String); diff --git a/src/synth/synth-vhdl_stmts.ads b/src/synth/synth-vhdl_stmts.ads index 3922b9242..db78c44d7 100644 --- a/src/synth/synth-vhdl_stmts.ads +++ b/src/synth/synth-vhdl_stmts.ads @@ -101,8 +101,6 @@ package Synth.Vhdl_Stmts is Unit : Node; Parent_Inst : Synth_Instance_Acc); - procedure Execute_Assertion_Statement (Inst : Synth_Instance_Acc; - Stmt : Node); procedure Execute_Report_Statement (Inst : Synth_Instance_Acc; Stmt : Node); procedure Exec_Failed_Assertion (Syn_Inst : Synth_Instance_Acc; |