diff options
-rw-r--r-- | src/ghdldrv/ghdlsimul.adb | 4 | ||||
-rw-r--r-- | src/ghdldrv/ghdlsynth.adb | 3 | ||||
-rw-r--r-- | src/synth/elab-debugger.adb | 8 | ||||
-rw-r--r-- | src/synth/elab-debugger.ads | 3 | ||||
-rw-r--r-- | src/synth/synth-flags.ads | 3 |
5 files changed, 11 insertions, 10 deletions
diff --git a/src/ghdldrv/ghdlsimul.adb b/src/ghdldrv/ghdlsimul.adb index 832ccd9a2..468c2253c 100644 --- a/src/ghdldrv/ghdlsimul.adb +++ b/src/ghdldrv/ghdlsimul.adb @@ -44,6 +44,8 @@ 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; @@ -185,7 +187,7 @@ package body Ghdlsimul is is begin if Option = "--debug" or Option = "-g" then - Synth.Flags.Flag_Debug_Enable := True; + Elab.Debugger.Flag_Debug_Enable := True; elsif Option = "-t" then Synth.Flags.Flag_Trace_Statements := True; elsif Option = "-i" then diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb index bcda44ada..264960ffc 100644 --- a/src/ghdldrv/ghdlsynth.adb +++ b/src/ghdldrv/ghdlsynth.adb @@ -47,6 +47,7 @@ with Netlists.Inference; with Elab.Vhdl_Context; use Elab.Vhdl_Context; with Elab.Vhdl_Insts; +with Elab.Debugger; with Synthesis; with Synth.Disp_Vhdl; @@ -230,7 +231,7 @@ package body Ghdlsynth is elsif Option = "-i" then Flag_Debug_Init := True; elsif Option = "-g" then - Flag_Debug_Enable := True; + Elab.Debugger.Flag_Debug_Enable := True; elsif Option = "-v" then if not Synth.Flags.Flag_Verbose then Synth.Flags.Flag_Verbose := True; diff --git a/src/synth/elab-debugger.adb b/src/synth/elab-debugger.adb index 0ff6a80e5..9d888cc95 100644 --- a/src/synth/elab-debugger.adb +++ b/src/synth/elab-debugger.adb @@ -33,8 +33,6 @@ with Elab.Vhdl_Context.Debug; use Elab.Vhdl_Context.Debug; with Elab.Vhdl_Debug; use Elab.Vhdl_Debug; package body Elab.Debugger is - Flag_Enabled : Boolean := False; - Current_Instance : Synth_Instance_Acc; Current_Loc : Node; @@ -923,7 +921,7 @@ package body Elab.Debugger is procedure Debug_Init (Top : Node) is begin - Flag_Enabled := True; + Flag_Debug_Enable := True; Current_Instance := null; Current_Loc := Top; @@ -939,7 +937,7 @@ package body Elab.Debugger is begin Current_Instance := Top; Current_Loc := Get_Source_Scope (Top); - Flag_Enabled := True; + Flag_Debug_Enable := True; -- To avoid warnings. Exec_Statement := Null_Node; @@ -985,7 +983,7 @@ package body Elab.Debugger is procedure Debug_Error (Inst : Synth_Instance_Acc; Expr : Node) is begin - if Flag_Enabled then + if Flag_Debug_Enable then Current_Instance := Inst; Current_Loc := Expr; Debug (Reason_Error); diff --git a/src/synth/elab-debugger.ads b/src/synth/elab-debugger.ads index 61b16fb97..02b37c2d0 100644 --- a/src/synth/elab-debugger.ads +++ b/src/synth/elab-debugger.ads @@ -23,6 +23,9 @@ with Vhdl.Nodes; use Vhdl.Nodes; with Elab.Vhdl_Context; use Elab.Vhdl_Context; package Elab.Debugger is + -- True to start debugger on error. + Flag_Debug_Enable : Boolean := False; + -- If true, debugging is enabled: -- * call Debug_Break() before executing the next sequential statement -- * call Debug_Leave when a frame is destroyed. diff --git a/src/synth/synth-flags.ads b/src/synth/synth-flags.ads index a4034a073..fed17efc1 100644 --- a/src/synth/synth-flags.ads +++ b/src/synth/synth-flags.ads @@ -61,9 +61,6 @@ package Synth.Flags is -- True to start debugger at elaboration. Flag_Debug_Init : Boolean := False; - -- True to start debugger on error. - Flag_Debug_Enable : Boolean := False; - -- Maximum number of iterations for (while)/loop. 0 means unlimited. Flag_Max_Loop : Natural := 1000; |