summaryrefslogtreecommitdiff
path: root/ortho/debug/ortho_debug-disp.adb
diff options
context:
space:
mode:
authorTristan Gingold2014-09-14 04:44:13 +0200
committerTristan Gingold2014-09-14 04:44:13 +0200
commitfc147a40d83670c63d75cd22f95a2d017270d2c6 (patch)
tree0f152ba602a9c337c11fc0b396ed9a0a58a806d2 /ortho/debug/ortho_debug-disp.adb
parent60b381d6d8b5493db5a4b5f7aacd42025e3a321b (diff)
downloadghdl-fc147a40d83670c63d75cd22f95a2d017270d2c6.tar.gz
ghdl-fc147a40d83670c63d75cd22f95a2d017270d2c6.tar.bz2
ghdl-fc147a40d83670c63d75cd22f95a2d017270d2c6.zip
Fix crash on resolver functions using secondary stack.
Diffstat (limited to 'ortho/debug/ortho_debug-disp.adb')
-rw-r--r--ortho/debug/ortho_debug-disp.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/ortho/debug/ortho_debug-disp.adb b/ortho/debug/ortho_debug-disp.adb
index 010f0f1..2725668 100644
--- a/ortho/debug/ortho_debug-disp.adb
+++ b/ortho/debug/ortho_debug-disp.adb
@@ -59,6 +59,10 @@ package body Ortho_Debug.Disp is
procedure Put_Trim (Str : String);
procedure Set_Mark;
+
+ -- Flush to disk. Only for debugging in case of crash.
+ procedure Flush_File;
+ pragma Unreferenced (Flush_File);
private
type Disp_Context is record
-- File where the info are written to.
@@ -224,6 +228,14 @@ package body Ortho_Debug.Disp is
begin
Ctx.Mark := Ctx.Line_Len;
end Set_Mark;
+
+ procedure Flush_File is
+ Status : int;
+ pragma Unreferenced (Status);
+ begin
+ Flush;
+ Status := fflush (Ctx.File);
+ end Flush_File;
end Formated_Output;
use Formated_Output;