OSDN Git Service

Delete all lines containing "$Revision:".
[pf3gnuchains/gcc-fork.git] / gcc / ada / debug_a.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                              D E B U G _ A                               --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --                                                                          --
10 --          Copyright (C) 1992-1998 Free Software Foundation, Inc.          --
11 --                                                                          --
12 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
13 -- terms of the  GNU General Public License as published  by the Free Soft- --
14 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
15 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
18 -- for  more details.  You should have  received  a copy of the GNU General --
19 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
20 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
21 -- MA 02111-1307, USA.                                                      --
22 --                                                                          --
23 -- GNAT was originally developed  by the GNAT team at  New York University. --
24 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
25 --                                                                          --
26 ------------------------------------------------------------------------------
27
28 --  This package contains data and subprograms to support the A debug switch
29 --  that is used to generate output showing what node is being analyzed,
30 --  resolved, evaluated, or expanded.
31
32 with Types; use Types;
33
34 package Debug_A is
35
36    --  Note: the following subprograms are used in a stack like manner, with
37    --  an exit call matching each entry call. This means that they can keep
38    --  track of the current node being worked on, with the entry call setting
39    --  a new value, by pushing the Node_Id value on a stack, and the exit call
40    --  popping this value off. Comperr.Current_Error_Node is set by both the
41    --  entry and exit routines to point to the current node so that an abort
42    --  message indicates the node involved as accurately as possible.
43
44    procedure Debug_A_Entry (S : String; N : Node_Id);
45    pragma Inline (Debug_A_Entry);
46    --  Generates a message prefixed by a sequence of bars showing the nesting
47    --  depth (depth increases by 1 for a Debug_A_Entry call and is decreased
48    --  by the corresponding Debug_A_Exit call). Then the string is output
49    --  (analyzing, expanding etc), followed by the node number and its kind.
50    --  This output is generated only if the debug A flag is set. If the debug
51    --  A flag is not set, then no output is generated. This call also sets the
52    --  Node_Id value in Comperr.Current_Error_Node in case a bomb occurs. This
53    --  is done unconditionally, whether or not the debug A flag is set.
54
55    procedure Debug_A_Exit (S : String; N : Node_Id; Comment : String);
56    pragma Inline (Debug_A_Exit);
57    --  Generates the corresponding termination message. The message is preceded
58    --  by a sequence of bars, followed by the string S, the node number, and
59    --  a trailing comment (e.g. " (already evaluated)"). This output is
60    --  generated only if the debug A flag is set. If the debug A flag is not
61    --  set, then no output is generated. This call also resets the value in
62    --  Comperr.Current_Error_Node to what it was before the corresponding call
63    --  to Debug_A_Entry.
64
65 end Debug_A;