~ubuntu-branches/ubuntu/karmic/asis/karmic

« back to all changes in this revision

Viewing changes to tools/gnatstub/gnatstub-driver.adb

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Quinot
  • Date: 2002-03-03 19:55:58 UTC
  • Revision ID: james.westby@ubuntu.com-20020303195558-g7dp4vaq1zdkf814
Tags: upstream-3.14p
ImportĀ upstreamĀ versionĀ 3.14p

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
------------------------------------------------------------------------------
 
2
--                                                                          --
 
3
--                           GNATSTUB COMPONENTS                            --
 
4
--                                                                          --
 
5
--                       G N A T S T U B  . D R I V E R                     --
 
6
--                                                                          --
 
7
--                               B o d y                                    --
 
8
--                                                                          --
 
9
--                            $Revision: 1.9 $
 
10
--                                                                          --
 
11
--           Copyright (c) 1997-2000, Free Software Foundation, Inc.        --
 
12
--                                                                          --
 
13
-- Gnatstub is free software; you can redistribute it and/or modify it      --
 
14
-- under terms of the  GNU General Public License  as published by the Free --
 
15
-- Software Foundation;  either version 2,  or  (at your option)  any later --
 
16
-- version. Gnatstub is distributed  in the hope  that it will be useful,   --
 
17
-- but WITHOUT ANY WARRANTY; without even the implied warranty of MER-      --
 
18
-- CHANTABILITY or  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General  --
 
19
-- Public License for more details. You should have received a copy of the  --
 
20
-- GNU General Public License distributed with GNAT; see file COPYING. If   --
 
21
-- not, write to the Free Software Foundation, 59 Temple Place Suite 330,   --
 
22
-- Boston, MA 02111-1307, USA.                                              --
 
23
--                                                                          --
 
24
-- Gnatstub is distributed as a part of the ASIS implementation for GNAT    --
 
25
-- (ASIS-for-GNAT).                                                         --
 
26
--                                                                          --
 
27
-- Gnatstub  was  originally  developed  by  Alexei Kuchumov  as a part of  --
 
28
-- collaboration  between  Software  Engineering  Laboratory of  the Swiss  --
 
29
-- Federal  Institute  of  Technology  in  Lausanne, Switzerland, and  the  --
 
30
-- Scientific  Research  Computer  Center  of the  Moscow State University, --
 
31
-- Russia.  This  work  was  supported  by  a grant from the Swiss National --
 
32
-- Science Foundation,  no 7SUPJ048247, funding a project  "Development of  --
 
33
-- ASIS for GNAT with industry quality".                                    --
 
34
--                                                                          --
 
35
-- Gnatstub  is  now  maintained  by  Ada  Core  Technologies  Inc          --
 
36
-- (http://www.gnat.com).                                                   --
 
37
------------------------------------------------------------------------------
 
38
 
 
39
with Ada.Exceptions;          use Ada.Exceptions;
 
40
with Ada.Text_IO;             use Ada.Text_IO;
 
41
 
 
42
with Gnatstub.Sampler;        use Gnatstub.Sampler;
 
43
with Gnatstub.Options;        use Gnatstub.Options;
 
44
 
 
45
procedure Gnatstub.Driver is
 
46
begin
 
47
   Initialize;
 
48
 
 
49
   if not Initialized then
 
50
      return;
 
51
   end if;
 
52
 
 
53
   Create_Sample;
 
54
   Clean_Up;
 
55
exception
 
56
   when Ex : others =>
 
57
      New_Line;
 
58
 
 
59
      if Exception_Identity (Ex) = Program_Error'Identity and then
 
60
         Exception_Message (Ex) = "Inconsistent versions of GNAT and ASIS"
 
61
      then
 
62
         Put_Gnatstub_Version;
 
63
         New_Line;
 
64
         Put ("is inconsistent with the GNAT version");
 
65
         New_Line;
 
66
         Put ("Check your installation of GNAT, ASIS and the GNAT toolset");
 
67
         New_Line;
 
68
      else
 
69
         Put ("Unexpected bug in ");
 
70
         Put_Gnatstub_Version;
 
71
         New_Line;
 
72
         Put (Exception_Name (Ex));
 
73
         Put (" was raised: ");
 
74
 
 
75
         if Exception_Message (Ex)'Length = 0 then
 
76
            Put_Line ("(no exception message)");
 
77
         else
 
78
            Put_Line (Exception_Message (Ex));
 
79
         end if;
 
80
 
 
81
         Put_Line ("Please report to report@gnat.com");
 
82
      end if;
 
83
 
 
84
      Clean_Up;
 
85
end Gnatstub.Driver;