aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-05-27 09:55:59 +0200
committerTristan Gingold <tgingold@free.fr>2022-05-27 09:55:59 +0200
commit7e766d575ec9fe8f96a5d633ce3de9ba91d53ce3 (patch)
treeb1fc5c8a7971dc8af7d9e1c101384e0a010795c5 /src
parentea4c5aef3579b9257c2a018d002e13e7ea3b1fbc (diff)
downloadghdl-7e766d575ec9fe8f96a5d633ce3de9ba91d53ce3.tar.gz
ghdl-7e766d575ec9fe8f96a5d633ce3de9ba91d53ce3.tar.bz2
ghdl-7e766d575ec9fe8f96a5d633ce3de9ba91d53ce3.zip
elab-debugger: add Debug_Time
Diffstat (limited to 'src')
-rw-r--r--src/synth/elab-debugger.adb12
-rw-r--r--src/synth/elab-debugger.ads5
2 files changed, 16 insertions, 1 deletions
diff --git a/src/synth/elab-debugger.adb b/src/synth/elab-debugger.adb
index e9f372dc3..0ff6a80e5 100644
--- a/src/synth/elab-debugger.adb
+++ b/src/synth/elab-debugger.adb
@@ -42,6 +42,7 @@ package body Elab.Debugger is
(
Reason_Init,
Reason_Break,
+ Reason_Time,
Reason_Error
);
@@ -836,7 +837,8 @@ package body Elab.Debugger is
end case;
-- Default state.
Exec_State := Exec_Run;
-
+ when Reason_Time =>
+ Exec_State := Exec_Run;
end case;
case Reason is
@@ -954,6 +956,14 @@ package body Elab.Debugger is
Debug (Reason_Break);
end Debug_Break;
+ procedure Debug_Time is
+ begin
+ Current_Instance := Root_Instance;
+ Current_Loc := Null_Node;
+
+ Debug (Reason_Time);
+ end Debug_Time;
+
procedure Debug_Leave (Inst : Synth_Instance_Acc) is
begin
if Exec_Instance = Inst then
diff --git a/src/synth/elab-debugger.ads b/src/synth/elab-debugger.ads
index 3376e3ba3..315337dd6 100644
--- a/src/synth/elab-debugger.ads
+++ b/src/synth/elab-debugger.ads
@@ -37,6 +37,9 @@ package Elab.Debugger is
procedure Debug_Leave (Inst : Synth_Instance_Acc);
+ -- Debug on a time breakpoint.
+ procedure Debug_Time;
+
-- To be called in case of execution error, like:
-- * index out of bounds.
procedure Debug_Error (Inst : Synth_Instance_Acc; Expr : Node);
@@ -54,6 +57,8 @@ package Elab.Debugger is
Help : Cst_String_Acc;
Proc : Menu_Procedure);
+ -- Prepare resume execution.
+ procedure Prepare_Continue;
-- Utilities for menu commands.