Files
gnatstudio/code_analysis/bt/bt.ads
David Hauzar 08925d5b65 Keep only the part of BT library actually used by GS.
In Inspector, BT library is used by BE.Backtraces.Xml_Files to write
XML files with backtraces and Inspector values. In GNAT Studio, BT
library is used to read XML files with Inspector values.

There was one copy of the library in Inspector's repo and one in GS
repo and these two copies were supposed to be manually synchronized.
However, since there is only a little intersection between the part
of the library used in Inspector and in GS, we decided to split the
library into two parts - Inspector part and GS part and to stop
synchronizing these systematically.

This commit puts comments to the parts of the splitted library that
still needs to synchronized, but it is very unlikely that these
will need to be modified. Here is the list of sources with some
intersection between Inspector and GS part:

bt.ads
- small part of the file containing the definition of source code
  position; very unlikely need to be synchronized
bt-xml.{abs, adb}
- definitions of names of XML entities and attributes + the function
  Xml_Vals_File_Name

Then, this commit makes the following changes:

* bt-xml-reader.{adb, ads} - keep only the part necessary for
  reading XML files with Inspector values
* bt.adb - remove - not used in GS
* bt.ads - keep only types representing source positions and values
  of value numbers
* bt-xml.{adb, ads} - keep only string constants for names of XML
  entities and attributes necessary to read XML files with Inspector
  values, keep the function Xml_Vals_File_Name
* message_kinds.{adb, ads} - remove - not used by GS
2023-09-13 13:51:33 +00:00

58 lines
2.6 KiB
Ada

------------------------------------------------------------------------------
-- C O D E P E E R --
-- --
-- Copyright (C) 2008-2023, AdaCore --
-- --
-- This is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. This software is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public --
-- License for more details. You should have received a copy of the GNU --
-- General Public License distributed with this software; see file --
-- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy --
-- of the license. --
-- --
-- The CodePeer technology was originally developed by SofCheck, Inc. --
------------------------------------------------------------------------------
-- Root of hierarchy for the Backtrace database
-- IMPORTANT Note: this hierarchy is intended to be used outside CodePeer,
-- so please do not add any dependency other than standard (Ada or GNAT) ones,
-- in particular Utils.* should not be used.
-- The master of this file is located in the codepeer repository, under bt/
-- so always start by modifying the master.
-- Any change to bt/*.ad? need to be mirrored in the GNATStudio repository,
-- under code_analysis/src
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Containers.Vectors;
package BT is
subtype Line_Number is Integer range 0 .. 2 ** 21 - 1;
subtype Column_Number is Integer range 0 .. 2 ** 11 - 1;
type Source_Position is record
Line : Line_Number;
Column : Column_Number;
end record;
pragma Pack (Source_Position);
-- Position in a source file.
-- Line 0 represents an invalid/no location.
No_Source_Position : constant Source_Position := (0, 0);
type Vn_Values is record
Vn_Image : Unbounded_String;
Set_Image : Unbounded_String;
end record;
type Vn_Values_Seq_Index is new Positive;
package Vn_Values_Seqs is new Ada.Containers.Vectors
(Element_Type => Vn_Values,
Index_Type => Vn_Values_Seq_Index);
end BT;