diff options
| author | Tristan Gingold <gingold@adacore.com> | 2015-11-30 06:44:09 +0100 | 
|---|---|---|
| committer | Tristan Gingold <gingold@adacore.com> | 2015-11-30 20:10:26 +0100 | 
| commit | 1ce6fb9504a9f9451342e07af55a195e2f1dbda5 (patch) | |
| tree | ac0de58765b071c23be038914458c52c2ca2167b /src | |
| parent | 7379c1371f2a83edbdf125a20b7565be983932dc (diff) | |
| download | ghdl-1ce6fb9504a9f9451342e07af55a195e2f1dbda5.tar.gz ghdl-1ce6fb9504a9f9451342e07af55a195e2f1dbda5.tar.bz2 ghdl-1ce6fb9504a9f9451342e07af55a195e2f1dbda5.zip | |
ghdl_simul debugger: handle function call, consider entity declarations.
Diffstat (limited to 'src')
| -rw-r--r-- | src/vhdl/canon.adb | 3 | ||||
| -rw-r--r-- | src/vhdl/canon.ads | 3 | ||||
| -rw-r--r-- | src/vhdl/simulate/debugger.adb | 28 | 
3 files changed, 24 insertions, 10 deletions
| diff --git a/src/vhdl/canon.adb b/src/vhdl/canon.adb index e5cd488ed..9108ece35 100644 --- a/src/vhdl/canon.adb +++ b/src/vhdl/canon.adb @@ -40,9 +40,6 @@ package body Canon is     procedure Canon_Concurrent_Stmts (Top : Iir_Design_Unit; Parent : Iir); -   --  Canon on expressions, mainly for function calls. -   procedure Canon_Expression (Expr: Iir); -     --  Canonicalize an association list.     --  If ASSOCIATION_LIST is not null, then it is re-ordored and returned.     --  If ASSOCIATION_LIST is null then: diff --git a/src/vhdl/canon.ads b/src/vhdl/canon.ads index 574a31824..8e5679355 100644 --- a/src/vhdl/canon.ads +++ b/src/vhdl/canon.ads @@ -55,6 +55,9 @@ package Canon is     --  Canonicalize a subprogram call.     procedure Canon_Subprogram_Call (Call : Iir); +   --  Canon on expressions, mainly for function calls. +   procedure Canon_Expression (Expr: Iir); +     -- Compute the sensivity list of EXPR and add it to SENSIVITY_LIST.     -- If IS_TARGET is true, the longuest static prefix of the signal name     -- is not added to the sensitivity list, but other static prefix (such diff --git a/src/vhdl/simulate/debugger.adb b/src/vhdl/simulate/debugger.adb index b3e7a90e4..83a241b15 100644 --- a/src/vhdl/simulate/debugger.adb +++ b/src/vhdl/simulate/debugger.adb @@ -28,6 +28,7 @@ with Scanner;  with Tokens;  with Sem_Expr;  with Sem_Scopes; +with Canon;  with Std_Names;  with Libraries;  with Std_Package; @@ -1324,7 +1325,7 @@ package body Debugger is           when Iir_Kind_Entity_Declaration =>              --  Top of scopes. -            null; +            Handler.all (N);           when Iir_Kind_Function_Body             | Iir_Kind_Procedure_Body => @@ -1530,6 +1531,7 @@ package body Debugger is        New_Line;        Annotate_Expand_Table; +      Canon.Canon_Expression (Expr);        Mark (Marker, Expr_Pool); @@ -1779,7 +1781,8 @@ package body Debugger is        P := E + 1;     end Parse_Command; -   procedure Help_Proc (Line : String) is +   procedure Help_Proc (Line : String) +   is        P : Natural;        Root : Menu_Entry_Acc := Menu_Top'access;     begin @@ -1829,11 +1832,22 @@ package body Debugger is        Prompt : System.Address;     begin        --  Unless interractive, do not use the debugger. -      if Reason /= Reason_Internal_Debug then -         if not Flag_Interractive then -            return; -         end if; -      end if; +      case Reason is +         when Reason_Internal_Debug => +            null; +         when Reason_Assert +           | Reason_Error => +            if not Flag_Debugger then +               return; +            end if; +         when Reason_Start +           | Reason_Elab => +            if not Flag_Interractive then +               return; +            end if; +         when Reason_Break => +            null; +      end case;        Prompt := Prompt_Debug'Address; | 
