1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 2009, 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 3, 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 COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
30 -- Loop through entries in SCO_Unit_Table
32 for U in 1 .. SCO_Unit_Table.Last loop
34 SUT : SCO_Unit_Table_Entry renames SCO_Unit_Table.Table (U);
43 -- Write unit header (omitted if no SCOs are generated for this unit)
46 Write_Info_Initiate ('C');
47 Write_Info_Char (' ');
48 Write_Info_Nat (SUT.Dep_Num);
49 Write_Info_Char (' ');
51 for N in SUT.File_Name'Range loop
52 Write_Info_Char (SUT.File_Name (N));
58 -- Loop through SCO entries for this unit
61 exit when Start = Stop + 1;
62 pragma Assert (Start <= Stop);
64 Output_SCO_Line : declare
65 T : SCO_Table_Entry renames SCO_Table.Table (Start);
67 procedure Output_Range (T : SCO_Table_Entry);
68 -- Outputs T.From and T.To in line:col-line:col format
74 procedure Output_Range (T : SCO_Table_Entry) is
76 Write_Info_Nat (Nat (T.From.Line));
77 Write_Info_Char (':');
78 Write_Info_Nat (Nat (T.From.Col));
79 Write_Info_Char ('-');
80 Write_Info_Nat (Nat (T.To.Line));
81 Write_Info_Char (':');
82 Write_Info_Nat (Nat (T.To.Col));
85 -- Start of processing for Output_SCO_Line
88 Write_Info_Initiate ('C');
89 Write_Info_Char (T.C1);
96 Write_Info_Char (' ');
101 when 'I' | 'E' | 'W' | 'X' =>
106 -- Loop through table entries for this decision
110 T : SCO_Table_Entry renames SCO_Table.Table (Start);
113 Write_Info_Char (' ');
115 if T.C1 = '!' or else
120 Write_Info_Char (T.C1);
123 Write_Info_Char (T.C2);
136 Write_Info_Terminate;