annotate gcc/ada/sinput-d.ads @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT COMPILER COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- S I N P U T . D --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
kono
parents:
diff changeset
9 -- Copyright (C) 2001-2008, Free Software Foundation, Inc. --
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
kono
parents:
diff changeset
17 -- for more details. You should have received a copy of the GNU General --
kono
parents:
diff changeset
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
kono
parents:
diff changeset
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
kono
parents:
diff changeset
20 -- --
kono
parents:
diff changeset
21 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
23 -- --
kono
parents:
diff changeset
24 ------------------------------------------------------------------------------
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 -- This child package contains the routines used to write debug source
kono
parents:
diff changeset
27 -- files. These routines are not in Sinput.L, because they are used only
kono
parents:
diff changeset
28 -- by the compiler, while Sinput.L is also used by gnatmake.
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 package Sinput.D is
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 ------------------------------------------------
kono
parents:
diff changeset
33 -- Subprograms for Writing Debug Source Files --
kono
parents:
diff changeset
34 ------------------------------------------------
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 procedure Create_Debug_Source
kono
parents:
diff changeset
37 (Source : Source_File_Index;
kono
parents:
diff changeset
38 Loc : out Source_Ptr);
kono
parents:
diff changeset
39 -- Given a source file, creates a new source file table entry to be used
kono
parents:
diff changeset
40 -- for the debug source file output (Debug_Generated_Code switch set).
kono
parents:
diff changeset
41 -- Loc is set to the initial Sloc value for the first line. This call
kono
parents:
diff changeset
42 -- also creates the debug source output file (using Create_Debug_File).
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 procedure Write_Debug_Line (Str : String; Loc : in out Source_Ptr);
kono
parents:
diff changeset
45 -- This procedure is called to write a line to the debug source file
kono
parents:
diff changeset
46 -- previously created by Create_Debug_Source using Write_Debug_Info.
kono
parents:
diff changeset
47 -- Str is the source line to be written to the file (it does not include
kono
parents:
diff changeset
48 -- an end of line character). On entry Loc is the Sloc value previously
kono
parents:
diff changeset
49 -- returned by Create_Debug_Source or Write_Debug_Line, and on exit,
kono
parents:
diff changeset
50 -- Sloc is updated to point to the start of the next line to be written,
kono
parents:
diff changeset
51 -- taking into account the length of the terminator that was written by
kono
parents:
diff changeset
52 -- Write_Debug_Info.
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 procedure Close_Debug_Source;
kono
parents:
diff changeset
55 -- This procedure completes the source table entry for the debug file
kono
parents:
diff changeset
56 -- previously created by Create_Debug_Source, and written using the
kono
parents:
diff changeset
57 -- Write_Debug_Line procedure. It then calls Close_Debug_File to
kono
parents:
diff changeset
58 -- complete the writing of the file itself.
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 end Sinput.D;