aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-05-14 19:47:39 +0200
committerTristan Gingold <tgingold@free.fr>2022-05-14 19:49:32 +0200
commit8a54756303708ce51dfe6093dde67e3463300cac (patch)
tree90ff4dba4b6493fb8c52dc054b12131ce94c3f82 /src/ghdldrv
parentaf71a811ea732ba04ab65c8813f198af13518bdd (diff)
downloadghdl-8a54756303708ce51dfe6093dde67e3463300cac.tar.gz
ghdl-8a54756303708ce51dfe6093dde67e3463300cac.tar.bz2
ghdl-8a54756303708ce51dfe6093dde67e3463300cac.zip
ghdlsimul: add and improve debugger
Diffstat (limited to 'src/ghdldrv')
-rw-r--r--src/ghdldrv/ghdlsimul.adb11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ghdldrv/ghdlsimul.adb b/src/ghdldrv/ghdlsimul.adb
index aaf355aca..62242be3c 100644
--- a/src/ghdldrv/ghdlsimul.adb
+++ b/src/ghdldrv/ghdlsimul.adb
@@ -44,11 +44,14 @@ with Grtlink;
with Elab.Vhdl_Context;
with Elab.Vhdl_Debug;
with Elab.Vhdl_Insts;
+with Elab.Debugger;
with Synth.Flags;
with Simul.Vhdl_Elab;
with Simul.Vhdl_Simul;
package body Ghdlsimul is
+ Flag_Interractive : Boolean := False;
+
procedure Compile_Init (Analyze_Only : Boolean) is
begin
Common_Compile_Init (Analyze_Only);
@@ -98,8 +101,12 @@ package body Ghdlsimul is
Simul.Vhdl_Elab.Gather_Processes (Inst);
Simul.Vhdl_Elab.Elab_Processes;
+ if Flag_Interractive then
+ Elab.Debugger.Debug_Elab (Inst);
+ end if;
+
if False then
- Elab.Vhdl_Debug.Disp_Hierarchy (Inst, True);
+ Elab.Vhdl_Debug.Disp_Hierarchy (Inst, False, True);
end if;
end Compile_Elab;
@@ -185,6 +192,8 @@ package body Ghdlsimul is
Synth.Flags.Flag_Debug_Enable := True;
elsif Option = "-t" then
Synth.Flags.Flag_Trace_Statements := True;
+ elsif Option = "-i" then
+ Flag_Interractive := True;
else
return False;
end if;