1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 2001, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
20 -- MA 02111-1307, USA. --
22 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
25 ------------------------------------------------------------------------------
27 -- This child package contains the routines used to write debug source
28 -- files. These routines are not in Sinput.L, because they are used only
29 -- by the compiler, while Sinput.L is also used by gnatmake.
33 ------------------------------------------------
34 -- Subprograms for Writing Debug Source Files --
35 ------------------------------------------------
37 procedure Create_Debug_Source
38 (Source
: Source_File_Index
;
39 Loc
: out Source_Ptr
);
40 -- Given a source file, creates a new source file table entry to be used
41 -- for the debug source file output (Debug_Generated_Code switch set).
42 -- Loc is set to the initial Sloc value for the first line. This call
43 -- also creates the debug source output file (using Create_Debug_File).
45 procedure Write_Debug_Line
(Str
: String; Loc
: in out Source_Ptr
);
46 -- This procedure is called to write a line to the debug source file
47 -- previously created by Create_Debug_Source using Write_Debug_Info.
48 -- Str is the source line to be written to the file (it does not include
49 -- an end of line character). On entry Loc is the Sloc value previously
50 -- returned by Create_Debug_Source or Write_Debug_Line, and on exit,
51 -- Sloc is updated to point to the start of the next line to be written,
52 -- taking into account the length of the ternminator that was written by
55 procedure Close_Debug_Source
;
56 -- This procedure completes the source table entry for the debug file
57 -- previously created by Create_Debug_Source, and written using the
58 -- Write_Debug_Line procedure. It then calls Close_Debug_File to
59 -- complete the writing of the file itself.