diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-12-18 19:16:46 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-12-21 07:36:46 +0100 |
commit | 0836f191563eae6cd5ada9dbc2b8a871a522bc5c (patch) | |
tree | 08d68285ddca7c64fad444cd00b15b4f9a1f78b3 /src/grt | |
parent | bb95ef066af608754d8ddb626d956c7a2a13563b (diff) | |
download | ghdl-0836f191563eae6cd5ada9dbc2b8a871a522bc5c.tar.gz ghdl-0836f191563eae6cd5ada9dbc2b8a871a522bc5c.tar.bz2 ghdl-0836f191563eae6cd5ada9dbc2b8a871a522bc5c.zip |
simul-debugger: improve info signals.
Diffstat (limited to 'src/grt')
-rw-r--r-- | src/grt/grt-disp_signals.adb | 29 | ||||
-rw-r--r-- | src/grt/grt-disp_signals.ads | 3 |
2 files changed, 23 insertions, 9 deletions
diff --git a/src/grt/grt-disp_signals.adb b/src/grt/grt-disp_signals.adb index f2e86572c..e4dadc578 100644 --- a/src/grt/grt-disp_signals.adb +++ b/src/grt/grt-disp_signals.adb @@ -96,6 +96,12 @@ package body Grt.Disp_Signals is Blk : Ghdl_Rtin_Block_Acc; Nctxt : Rti_Context; begin + -- Avoid fault. + if Ctxt = Null_Context then + Put ('?'); + return; + end if; + Blk := To_Ghdl_Rtin_Block_Acc (Ctxt.Block); case Blk.Common.Kind is when Ghdl_Rtik_Block @@ -159,15 +165,8 @@ package body Grt.Disp_Signals is end loop; end Disp_Transaction; - procedure Disp_Simple_Signal - (Sig : Ghdl_Signal_Ptr; Sig_Type : Ghdl_Rti_Access; Sources : Boolean) - is - function To_Address is new Ada.Unchecked_Conversion - (Source => Resolved_Signal_Acc, Target => Address); + procedure Disp_Single_Signal_Attributes (Sig : Ghdl_Signal_Ptr) is begin - Put (' '); - Put (stdout, Sig.all'Address); - Put (' '); Disp_Mode (Sig.Mode); Put (' '); if Sig.Active then @@ -196,6 +195,18 @@ package body Grt.Disp_Signals is Put (" last_active="); Put_Time (stdout, Sig.Last_Active); end if; + end Disp_Single_Signal_Attributes; + + procedure Disp_Simple_Signal + (Sig : Ghdl_Signal_Ptr; Sig_Type : Ghdl_Rti_Access; Sources : Boolean) + is + function To_Address is new Ada.Unchecked_Conversion + (Source => Resolved_Signal_Acc, Target => Address); + begin + Put (' '); + Put (stdout, Sig.all'Address); + Put (' '); + Disp_Single_Signal_Attributes (Sig); Put (" val="); declare Val : constant Value_Union := Read_Value (Sig.Value_Ptr, Sig.Mode); @@ -221,7 +232,7 @@ package body Grt.Disp_Signals is case Sig.S.Mode_Sig is when Mode_Signal_User => if Sig.S.Resolv /= null then - Put (stdout, " res func "); + Put (stdout, " resolver="); Put (stdout, To_Address(Sig.S.Resolv)); end if; if Sig.S.Nbr_Drivers = 0 then diff --git a/src/grt/grt-disp_signals.ads b/src/grt/grt-disp_signals.ads index 73bd60d06..82905d5b8 100644 --- a/src/grt/grt-disp_signals.ads +++ b/src/grt/grt-disp_signals.ads @@ -37,6 +37,9 @@ package Grt.Disp_Signals is procedure Disp_Mode_Signal (Mode : Mode_Signal_Type); + -- Disp attributes of SIG. + procedure Disp_Single_Signal_Attributes (Sig : Ghdl_Signal_Ptr); + -- Disp informations on signal SIG. -- To be used inside the debugger. procedure Disp_A_Signal (Sig : Ghdl_Signal_Ptr); |