1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
10 -- Copyright (C) 2001, Free Software Foundation, Inc. --
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. --
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). --
26 ------------------------------------------------------------------------------
28 -- This child package contains the routines used to write debug source
29 -- files. These routines are not in Sinput.L, because they are used only
30 -- by the compiler, while Sinput.L is also used by gnatmake.
34 ------------------------------------------------
35 -- Subprograms for Writing Debug Source Files --
36 ------------------------------------------------
38 procedure Create_Debug_Source
39 (Source
: Source_File_Index
;
40 Loc
: out Source_Ptr
);
41 -- Given a source file, creates a new source file table entry to be used
42 -- for the debug source file output (Debug_Generated_Code switch set).
43 -- Loc is set to the initial Sloc value for the first line. This call
44 -- also creates the debug source output file (using Create_Debug_File).
46 procedure Write_Debug_Line
(Str
: String; Loc
: in out Source_Ptr
);
47 -- This procedure is called to write a line to the debug source file
48 -- previously created by Create_Debug_Source using Write_Debug_Info.
49 -- Str is the source line to be written to the file (it does not include
50 -- an end of line character). On entry Loc is the Sloc value previously
51 -- returned by Create_Debug_Source or Write_Debug_Line, and on exit,
52 -- Sloc is updated to point to the start of the next line to be written,
53 -- taking into account the length of the ternminator that was written by
56 procedure Close_Debug_Source
;
57 -- This procedure completes the source table entry for the debug file
58 -- previously created by Create_Debug_Source, and written using the
59 -- Write_Debug_Line procedure. It then calls Close_Debug_File to
60 -- complete the writing of the file itself.