1--  Debugging during synthesis.
2--  Copyright (C) 2019 Tristan Gingold
3--
4--  This file is part of GHDL.
5--
6--  This program is free software; you can redistribute it and/or modify
7--  it under the terms of the GNU General Public License as published by
8--  the Free Software Foundation; either version 2 of the License, or
9--  (at your option) any later version.
10--
11--  This program is distributed in the hope that it will be useful,
12--  but WITHOUT ANY WARRANTY; without even the implied warranty of
13--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14--  GNU General Public License for more details.
15--
16--  You should have received a copy of the GNU General Public License
17--  along with this program; if not, write to the Free Software
18--  Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19--  MA 02110-1301, USA.
20
21with Vhdl.Nodes; use Vhdl.Nodes;
22
23with Synth.Context; use Synth.Context;
24
25package Synth.Debugger is
26   --  If true, debugging is enabled:
27   --  * call Debug_Break() before executing the next sequential statement
28   --  * call Debug_Leave when a frame is destroyed.
29   Flag_Need_Debug : Boolean := False;
30
31   procedure Debug_Init (Top : Node);
32   procedure Debug_Break (Inst : Synth_Instance_Acc; Stmt : Node);
33
34   procedure Debug_Leave (Inst : Synth_Instance_Acc);
35
36   --  To be called in case of execution error, like:
37   --  * index out of bounds.
38   procedure Debug_Error (Inst : Synth_Instance_Acc; Expr : Node);
39end Synth.Debugger;
40