diff options
author | Tristan Gingold <gingold@adacore.com> | 2015-11-18 21:45:45 +0100 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2015-11-19 05:47:59 +0100 |
commit | 92b0b82ea32982b94eb8bf19a0b498d92053fffe (patch) | |
tree | 70b04f103d145dc01d31870e50b5e6a654dc20e0 /src/grt/grt-lib.adb | |
parent | ff4bc5fb13a997a1d00596578b6d7deb5c0b0da6 (diff) | |
download | ghdl-92b0b82ea32982b94eb8bf19a0b498d92053fffe.tar.gz ghdl-92b0b82ea32982b94eb8bf19a0b498d92053fffe.tar.bz2 ghdl-92b0b82ea32982b94eb8bf19a0b498d92053fffe.zip |
Add symbolizer (for mcode).
Display a backtrace in case of failed check or assert failure.
Diffstat (limited to 'src/grt/grt-lib.adb')
-rw-r--r-- | src/grt/grt-lib.adb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/grt/grt-lib.adb b/src/grt/grt-lib.adb index d2b095c67..95a4a0948 100644 --- a/src/grt/grt-lib.adb +++ b/src/grt/grt-lib.adb @@ -46,6 +46,7 @@ package body Grt.Lib is Loc : Ghdl_Location_Ptr) is Level : constant Integer := Severity mod 256; + Bt : Backtrace_Addrs; begin Report_H; Report_C (Loc.Filename); @@ -77,8 +78,10 @@ package body Grt.Lib is Report_E (Default_Str); end if; if Level >= Grt.Options.Severity_Level then + Save_Backtrace (Bt, 2); Error_C (Msg); - Error_E (" failed"); + Error_C (" failed"); + Error_E_Call_Stack (Bt); end if; end Do_Report; @@ -161,12 +164,14 @@ package body Grt.Lib is procedure Ghdl_Bound_Check_Failed_L1 (Filename : Ghdl_C_String; Line: Ghdl_I32) is + Bt : Backtrace_Addrs; begin + Save_Backtrace (Bt, 1); Error_C ("bound check failure at "); Error_C (Filename); Error_C (":"); Error_C (Integer (Line)); - Error_E (""); + Error_E_Call_Stack (Bt); end Ghdl_Bound_Check_Failed_L1; function Ghdl_Integer_Exp (V : Ghdl_I32; E : Ghdl_I32) |