aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-02-07 08:24:29 +0100
committerTristan Gingold <tgingold@free.fr>2016-02-09 20:25:02 +0100
commit155ec09bdd13e11055d39e5a329dd6e3df38a514 (patch)
tree994efbc07c50f49793df24e18d16559181d26e05
parentd7b89f654b99c6deb7c40c7057b5aa4f8af0bca5 (diff)
downloadghdl-155ec09bdd13e11055d39e5a329dd6e3df38a514.tar.gz
ghdl-155ec09bdd13e11055d39e5a329dd6e3df38a514.tar.bz2
ghdl-155ec09bdd13e11055d39e5a329dd6e3df38a514.zip
simul: avoid stupid crashes in debugger.
-rw-r--r--src/vhdl/simulate/debugger.adb12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/vhdl/simulate/debugger.adb b/src/vhdl/simulate/debugger.adb
index 9155d8556..54e1b42a1 100644
--- a/src/vhdl/simulate/debugger.adb
+++ b/src/vhdl/simulate/debugger.adb
@@ -513,6 +513,9 @@ package body Debugger is
Disp_Signal (Sig, Get_Type (Decl));
New_Line;
end;
+ when Iir_Kinds_Signal_Attribute =>
+ -- FIXME: todo ?
+ null;
when Iir_Kind_Type_Declaration
| Iir_Kind_Anonymous_Type_Declaration
| Iir_Kind_Subtype_Declaration =>
@@ -782,7 +785,7 @@ package body Debugger is
begin
while Stmt /= Null_Iir loop
case Get_Kind (Stmt) is
- when Iir_Kind_Process_Statement =>
+ when Iir_Kinds_Process_Statement =>
if Walk_Decl_Chain (Get_Declaration_Chain (Stmt))
= Walk_Abort
then
@@ -1216,6 +1219,10 @@ package body Debugger is
Params : Iir;
begin
Check_Current_Process;
+ if Dbg_Cur_Frame = null then
+ Put_Line ("not in a subprogram");
+ return;
+ end if;
Decl := Dbg_Cur_Frame.Label;
if Decl = Null_Iir
or else Get_Kind (Decl) not in Iir_Kinds_Subprogram_Declaration
@@ -1267,7 +1274,8 @@ package body Debugger is
Put ("architecture ");
Put (Name_Table.Image (Get_Identifier (El)));
Put (" of ");
- Put_Line (Name_Table.Image (Get_Identifier (Get_Entity (El))));
+ Put_Line (Name_Table.Image (Get_Identifier
+ (Get_Entity_Name (El))));
when Iir_Kind_Configuration_Declaration =>
Put ("configuration ");
Put_Line (Name_Table.Image (Get_Identifier (El)));