[multiple changes]

2010-10-12  Vincent Celier  <celier@adacore.com>

	* prj-nmsc.adb (Add_Source): Put source in hash table Source_Files_HT
	(Process_Exceptions_File_Based): Use hash table Source_Files_HT, instead
	of iterating through all sources of the project.
	* prj.adb (Free): Reset hash table Source_Files_HT
	(Reset): Reset hash table Source_Files_HT
	* prj.ads (Source_Data): New component Next_With_File_Name
	(Source_Files_Htable): New hash table
	(Project_Tree_Data): New component Source_Files_HT

2010-10-12  Tristan Gingold  <gingold@adacore.com>

	* g-trasym-vms-ia64.adb: Use the documented API.
	* gcc-interface/Makefile.in: Always set NO_REORDER_ADAFLAGS.
	* gcc-interface/Make-lang.in: Update dependencies.

From-SVN: r165377
This commit is contained in:
Arnaud Charlet 2010-10-12 15:27:47 +02:00
parent d80ee77c1e
commit f166413ae0
7 changed files with 228 additions and 130 deletions

View File

@ -1,3 +1,20 @@
2010-10-12 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb (Add_Source): Put source in hash table Source_Files_HT
(Process_Exceptions_File_Based): Use hash table Source_Files_HT, instead
of iterating through all sources of the project.
* prj.adb (Free): Reset hash table Source_Files_HT
(Reset): Reset hash table Source_Files_HT
* prj.ads (Source_Data): New component Next_With_File_Name
(Source_Files_Htable): New hash table
(Project_Tree_Data): New component Source_Files_HT
2010-10-12 Tristan Gingold <gingold@adacore.com>
* g-trasym-vms-ia64.adb: Use the documented API.
* gcc-interface/Makefile.in: Always set NO_REORDER_ADAFLAGS.
* gcc-interface/Make-lang.in: Update dependencies.
2010-10-12 Thomas Quinot <quinot@adacore.com>
* rtsfind.ads, exp_dist.adb, exp_dist.ads (Build_General_Calling_Stubs,

View File

@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2005-2009, Free Software Foundation, Inc. --
-- Copyright (C) 2005-2010, Free Software Foundation, Inc. --
-- --
-- GNAT 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- --
@ -39,9 +39,6 @@ with System.Traceback_Entries;
package body GNAT.Traceback.Symbolic is
pragma Warnings (Off); -- ??? needs comment
pragma Linker_Options ("--for-linker=sys$library:trace.exe");
use System;
use System.Aux_DEC;
use System.Traceback_Entries;
@ -67,16 +64,43 @@ package body GNAT.Traceback.Symbolic is
subtype Cond_Value_Type is Unsigned_Longword;
function Symbolize
(Current_PC : Address;
Filename_Dsc : Address;
Library_Dsc : Address;
Record_Number : Address;
Image_Dsc : Address;
Module_Dsc : Address;
Routine_Dsc : Address;
Line_Number : Address;
Relative_PC : Address) return Cond_Value_Type;
-- TBK_API_PARAM as defined in TBKDEF.
type Tbk_Api_Param is record
Length : Unsigned_Word;
T_Type : Unsigned_Byte;
Version : Unsigned_Byte;
Reserveda : Unsigned_Longword;
Faulting_Pc : Address;
Faulting_Fp : Address;
Filename_Desc : Address;
Library_Module_Desc : Address;
Record_Number : Address;
Image_Desc : Address;
Module_Desc : Address;
Routine_Desc : Address;
Listing_Lineno : Address;
Rel_Pc : Address;
Image_Base_Addr : Address;
Module_Base_Addr : Address;
Malloc_Rtn : Address;
Free_Rtn : Address;
Symbolize_Flags : Address;
Reserved0 : Unsigned_Quadword;
Reserved1 : Unsigned_Quadword;
Reserved2 : Unsigned_Quadword;
end record;
pragma Convention (C, Tbk_Api_Param);
K_Version : constant Unsigned_Byte := 1;
-- Current API version.
K_Length : constant Unsigned_Word := 152;
-- Length of the parameter.
pragma Compile_Time_Error (Tbk_Api_Param'Size = K_Length * 8,
"Bad length for tbk_api_param");
-- Sanity check.
function Symbolize (Param : Address) return Cond_Value_Type;
pragma Import (C, Symbolize, "TBK$I64_SYMBOLIZE");
function Decode_Ada_Name (Encoded_Name : String) return String;
@ -173,20 +197,16 @@ package body GNAT.Traceback.Symbolic is
------------------------
function Symbolic_Traceback (Traceback : Tracebacks_Array) return String is
Param : Tbk_Api_Param;
Status : Cond_Value_Type;
Filename_Name : Var_String;
Filename_Dsc : Descriptor64;
Library_Name : Var_String;
Library_Dsc : Descriptor64;
Record_Number : Integer_64;
Record_Number : Unsigned_Longword;
Image_Name : Var_String;
Image_Dsc : Descriptor64;
Module_Name : Var_String;
Module_Dsc : Descriptor64;
Routine_Name : Var_String;
Routine_Dsc : Descriptor64;
Line_Number : Integer_64;
Relative_PC : Integer_64;
Line_Number : Unsigned_Longword;
Res : String (1 .. 256 * Traceback'Length);
Len : Integer;
@ -201,68 +221,107 @@ package body GNAT.Traceback.Symbolic is
System.Soft_Links.Lock_Task.all;
Setup_Descriptor64_Vs (Filename_Dsc, Filename_Name'Address);
Setup_Descriptor64_Vs (Library_Dsc, Library_Name'Address);
-- Initialize descriptors
Setup_Descriptor64_Vs (Image_Dsc, Image_Name'Address);
Setup_Descriptor64_Vs (Module_Dsc, Module_Name'Address);
Setup_Descriptor64_Vs (Routine_Dsc, Routine_Name'Address);
for J in Traceback'Range loop
Status := Symbolize
(PC_For (Traceback (J)),
Filename_Dsc'Address,
Library_Dsc'Address,
Record_Number'Address,
Image_Dsc'Address,
Module_Dsc'Address,
Routine_Dsc'Address,
Line_Number'Address,
Relative_PC'Address);
-- Initialize fields in case they are not written
declare
First : Integer := Len + 1;
Last : Integer := First + 80 - 1;
Pos : Integer;
Record_Number := 0;
Line_Number := 0;
Image_Name.Curlen := 0;
Module_Name.Curlen := 0;
Routine_Name.Curlen := 0;
Routine_Name_D : String :=
Decode_Ada_Name
(Routine_Name.Buf
(1 .. Natural (Routine_Name.Curlen)));
-- Symbolize
begin
Res (First .. Last) := (others => ' ');
Param := (Length => K_Length,
T_Type => 0,
Version => K_Version,
Reserveda => 0,
Faulting_Pc => PC_For (Traceback (J)),
Faulting_Fp => 0,
Filename_Desc => Null_Address,
Library_Module_Desc => Null_Address,
Record_Number => Record_Number'Address,
Image_Desc => Image_Dsc'Address,
Module_Desc => Module_Dsc'Address,
Routine_Desc => Routine_Dsc'Address,
Listing_Lineno => Line_Number'Address,
Rel_Pc => Null_Address,
Image_Base_Addr => Null_Address,
Module_Base_Addr => Null_Address,
Malloc_Rtn => Null_Address,
Free_Rtn => Null_Address,
Symbolize_Flags => Null_Address,
Reserved0 => (0, 0),
Reserved1 => (0, 0),
Reserved2 => (0, 0));
Res (First .. First + Natural (Image_Name.Curlen) - 1) :=
Image_Name.Buf (1 .. Natural (Image_Name.Curlen));
Status := Symbolize (Param'Address);
Res (First + 10 ..
First + 10 + Natural (Module_Name.Curlen) - 1) :=
Module_Name.Buf (1 .. Natural (Module_Name.Curlen));
if (Status rem 2) = 1 then
Res (First + 30 ..
First + 30 + Routine_Name_D'Length - 1) :=
Routine_Name_D;
-- Success
-- If routine name doesn't fit 20 characters, output
-- the line number on next line at 50th position
if Line_Number = 0 then
-- As GCC doesn't emit source file correlation, use record
-- number of line number is not set
if Routine_Name_D'Length > 20 then
Pos := First + 30 + Routine_Name_D'Length;
Res (Pos) := ASCII.LF;
Last := Pos + 80;
Res (Pos + 1 .. Last) := (others => ' ');
Pos := Pos + 51;
else
Pos := First + 50;
Line_Number := Record_Number;
end if;
Res (Pos ..
Pos + Integer_64'Image (Line_Number)'Length - 1) :=
Integer_64'Image (Line_Number);
declare
First : constant Integer := Len + 1;
Last : Integer := First + 80 - 1;
Pos : Integer;
Res (Last) := ASCII.LF;
Len := Last;
end;
Routine_Name_D : constant String :=
Decode_Ada_Name (Routine_Name.Buf
(1 .. Natural (Routine_Name.Curlen)));
Lineno : constant String :=
Unsigned_Longword'Image (Line_Number);
begin
Res (First .. Last) := (others => ' ');
Res (First .. First + Natural (Image_Name.Curlen) - 1) :=
Image_Name.Buf (1 .. Natural (Image_Name.Curlen));
Res (First + 10 ..
First + 10 + Natural (Module_Name.Curlen) - 1) :=
Module_Name.Buf (1 .. Natural (Module_Name.Curlen));
Res (First + 30 ..
First + 30 + Routine_Name_D'Length - 1) :=
Routine_Name_D;
-- If routine name doesn't fit 20 characters, output
-- the line number on next line at 50th position
if Routine_Name_D'Length > 20 then
Pos := First + 30 + Routine_Name_D'Length;
Res (Pos) := ASCII.LF;
Last := Pos + 80;
Res (Pos + 1 .. Last) := (others => ' ');
Pos := Pos + 51;
else
Pos := First + 50;
end if;
Res (Pos .. Pos + Lineno'Length - 1) := Lineno;
Res (Last) := ASCII.LF;
Len := Last;
end;
else
Res (Len + 1 .. Len + 6) := "ERROR" & ASCII.LF;
Len := Len + 6;
end if;
end loop;
System.Soft_Links.Unlock_Task.all;

View File

@ -1385,11 +1385,12 @@ ada/back_end.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sinfo.adb ada/sinput.ads ada/sinput.adb ada/snames.ads \
ada/stand.ads ada/stringt.ads ada/switch.ads ada/switch-c.ads \
ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads \
ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
ada/uname.ads ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads \
ada/widechar.ads
ada/bcheck.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/ali.ads ada/ali-util.ads ada/ali-util.adb \
@ -2721,13 +2722,13 @@ ada/lib-load.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/stringt.ads ada/style.ads ada/styleg.ads ada/styleg.adb \
ada/stylesw.ads ada/system.ads ada/s-crc32.ads ada/s-crc32.adb \
ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads \
ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads ada/s-soflin.ads \
ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-utf_32.ads \
ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tbuild.ads \
ada/tbuild.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \
ada/urealp.ads ada/widechar.ads
ada/s-os_lib.ads ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads \
ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \
ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
ada/s-utf_32.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
ada/tbuild.ads ada/tbuild.adb ada/tree_io.ads ada/types.ads \
ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.ads \
ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/lib-util.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/hostparm.ads \
@ -2758,12 +2759,13 @@ ada/lib-writ.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/styleg.ads ada/styleg.adb ada/stylesw.ads ada/system.ads \
ada/s-casuti.ads ada/s-crc32.ads ada/s-crc32.adb ada/s-exctab.ads \
ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
ada/s-parame.ads ada/s-rident.ads ada/s-soflin.ads ada/s-stache.ads \
ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
ada/s-traent.ads ada/s-unstyp.ads ada/s-utf_32.ads ada/s-wchcon.ads \
ada/table.ads ada/table.adb ada/tbuild.ads ada/tbuild.adb \
ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-soflin.ads \
ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb \
ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-utf_32.ads \
ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tbuild.ads \
ada/tbuild.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \
ada/urealp.ads ada/widechar.ads
ada/lib-xref.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/atree.ads \
@ -2780,10 +2782,10 @@ ada/lib-xref.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sinfo.adb ada/sinput.ads ada/sinput.adb ada/snames.ads \
ada/stand.ads ada/stringt.ads ada/system.ads ada/s-exctab.ads \
ada/s-htable.ads ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads \
ada/s-parame.ads ada/s-rident.ads ada/s-stalib.ads ada/s-stoele.ads \
ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
ada/s-parame.ads ada/s-rident.ads ada/s-secsta.ads ada/s-stalib.ads \
ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/lib.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads ada/a-uncdea.ads \
@ -2956,12 +2958,12 @@ ada/par_sco.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/scos.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads ada/sinput.adb \
ada/snames.ads ada/stand.ads ada/stringt.ads ada/system.ads \
ada/s-exctab.ads ada/s-htable.ads ada/s-htable.adb ada/s-imenne.ads \
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
ada/s-stoele.ads ada/s-stoele.adb ada/s-strhas.ads ada/s-string.ads \
ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
ada/uname.ads ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads \
ada/widechar.ads
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads \
ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-strhas.ads \
ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \
ada/urealp.ads ada/widechar.ads
ada/prep.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/casing.ads ada/csets.ads \
@ -3877,11 +3879,12 @@ ada/sem_elim.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sinfo.adb ada/sinput.ads ada/sinput.adb ada/snames.ads \
ada/stand.ads ada/stringt.ads ada/system.ads ada/s-exctab.ads \
ada/s-htable.ads ada/s-htable.adb ada/s-imenne.ads ada/s-memory.ads \
ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads ada/s-strhas.ads \
ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
ada/uintp.adb ada/uname.ads ada/unchconv.ads ada/unchdeal.ads \
ada/urealp.ads ada/widechar.ads
ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads ada/s-stalib.ads \
ada/s-stoele.ads ada/s-stoele.adb ada/s-strhas.ads ada/s-string.ads \
ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
ada/uname.ads ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads \
ada/widechar.ads
ada/sem_eval.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/atree.ads \
@ -4210,11 +4213,11 @@ ada/sinput-l.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/style.ads ada/styleg.ads ada/styleg.adb ada/stylesw.ads \
ada/system.ads ada/s-crc32.ads ada/s-crc32.adb ada/s-exctab.ads \
ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \
ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
ada/s-utf_32.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
ada/tree_io.ads ada/types.ads ada/uintp.ads ada/unchconv.ads \
ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \
ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
ada/s-unstyp.ads ada/s-utf_32.ads ada/s-wchcon.ads ada/table.ads \
ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/sinput.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/aspects.ads ada/atree.ads \
@ -4422,12 +4425,12 @@ ada/treepr.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/sinput.ads ada/sinput.adb ada/snames.ads ada/stand.ads \
ada/stringt.ads ada/system.ads ada/s-exctab.ads ada/s-htable.ads \
ada/s-imenne.ads ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads \
ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads ada/s-stoele.ads \
ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads \
ada/s-wchcon.ads ada/table.ads ada/table.adb ada/tree_io.ads \
ada/treepr.ads ada/treepr.adb ada/treeprs.ads ada/types.ads \
ada/uintp.ads ada/uintp.adb ada/uname.ads ada/unchconv.ads \
ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/s-secsta.ads ada/s-soflin.ads ada/s-stache.ads ada/s-stalib.ads \
ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads ada/s-traent.ads \
ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads ada/table.adb \
ada/tree_io.ads ada/treepr.ads ada/treepr.adb ada/treeprs.ads \
ada/types.ads ada/uintp.ads ada/uintp.adb ada/uname.ads \
ada/unchconv.ads ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/treeprs.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/hostparm.ads \
@ -4469,11 +4472,12 @@ ada/uname.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/opt.ads ada/output.ads ada/sinfo.ads ada/sinfo.adb ada/sinput.ads \
ada/sinput.adb ada/snames.ads ada/stand.ads ada/stringt.ads \
ada/system.ads ada/s-exctab.ads ada/s-htable.ads ada/s-imenne.ads \
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-stalib.ads \
ada/s-string.ads ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads \
ada/table.ads ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads \
ada/uintp.adb ada/uname.ads ada/uname.adb ada/unchconv.ads \
ada/unchdeal.ads ada/urealp.ads ada/widechar.ads
ada/s-memory.ads ada/s-os_lib.ads ada/s-parame.ads ada/s-secsta.ads \
ada/s-stalib.ads ada/s-stoele.ads ada/s-stoele.adb ada/s-string.ads \
ada/s-traent.ads ada/s-unstyp.ads ada/s-wchcon.ads ada/table.ads \
ada/table.adb ada/tree_io.ads ada/types.ads ada/uintp.ads ada/uintp.adb \
ada/uname.ads ada/uname.adb ada/unchconv.ads ada/unchdeal.ads \
ada/urealp.ads ada/widechar.ads
ada/urealp.o : ada/ada.ads ada/a-except.ads ada/a-unccon.ads \
ada/a-uncdea.ads ada/alloc.ads ada/debug.ads ada/gnat.ads \

View File

@ -2724,15 +2724,9 @@ s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads
$< $(OUTPUT_OPTION)
# force no function reordering on a-except.o because of the exclusion bounds
# mechanism (see the source file for more detailed information). However we
# can do that only when building the runtime (not the compiler) because the
# -fno-toplevel-reorder option exists only in GCC 4.2 and above.
# mechanism (see the source file for more detailed information).
ifneq (,$(findstring xgcc,$(CC)))
NO_REORDER_ADAFLAGS=-fno-toplevel-reorder
else
NO_REORDER_ADAFLAGS=
endif
# force debugging information on a-except.o so that it is always
# possible to set conditional breakpoints on exceptions.

View File

@ -867,6 +867,10 @@ package body Prj.Nmsc is
Source_Paths_Htable.Set (Data.Tree.Source_Paths_HT, Path.Name, Id);
end if;
Id.Next_With_File_Name :=
Source_Files_Htable.Get (Data.Tree.Source_Files_HT, File_Name);
Source_Files_Htable.Set (Data.Tree.Source_Files_HT, File_Name, Id);
if Index /= 0 then
Project.Has_Multi_Unit_Sources := True;
end if;
@ -3016,7 +3020,6 @@ package body Prj.Nmsc is
Element : String_Element;
File_Name : File_Name_Type;
Source : Source_Id;
Iter : Source_Iterator;
begin
case Kind is
@ -3046,11 +3049,13 @@ package body Prj.Nmsc is
Element := Data.Tree.String_Elements.Table (Element_Id);
File_Name := Canonical_Case_File_Name (Element.Value);
Iter := For_Each_Source (Data.Tree, Project);
Source := Source_Files_Htable.Get
(Data.Tree.Source_Files_HT, File_Name);
while Source /= No_Source
and then Source.Project /= Project
loop
Source := Prj.Element (Iter);
exit when Source = No_Source or else Source.File = File_Name;
Next (Iter);
Source := Source.Next_With_File_Name;
end loop;
if Source = No_Source then

View File

@ -876,6 +876,7 @@ package body Prj is
Array_Table.Free (Tree.Arrays);
Package_Table.Free (Tree.Packages);
Source_Paths_Htable.Reset (Tree.Source_Paths_HT);
Source_Files_Htable.Reset (Tree.Source_Files_HT);
Free_List (Tree.Projects, Free_Project => True);
Free_Units (Tree.Units_HT);
@ -904,6 +905,7 @@ package body Prj is
Array_Table.Init (Tree.Arrays);
Package_Table.Init (Tree.Packages);
Source_Paths_Htable.Reset (Tree.Source_Paths_HT);
Source_Files_Htable.Reset (Tree.Source_Files_HT);
Replaced_Source_HTable.Reset (Tree.Replaced_Sources);
Tree.Replaced_Source_Number := 0;

View File

@ -770,6 +770,10 @@ package Prj is
Next_In_Lang : Source_Id := No_Source;
-- Link to another source of the same language in the same project
Next_With_File_Name : Source_Id := No_Source;
-- Link to another source with the same base file name
end record;
No_Source_Data : constant Source_Data :=
@ -803,7 +807,17 @@ package Prj is
Switches_TS => Empty_Time_Stamp,
Naming_Exception => False,
Duplicate_Unit => False,
Next_In_Lang => No_Source);
Next_In_Lang => No_Source,
Next_With_File_Name => No_Source);
package Source_Files_Htable is new Simple_HTable
(Header_Num => Header_Num,
Element => Source_Id,
No_Element => No_Source,
Key => File_Name_Type,
Hash => Hash,
Equal => "=");
-- Mapping of source file names to source ids
package Source_Paths_Htable is new Simple_HTable
(Header_Num => Header_Num,
@ -1367,7 +1381,10 @@ package Prj is
-- The number of entries in Replaced_Sources
Units_HT : Units_Htable.Instance;
-- Unit name to Unit_Index (and from there so Source_Id)
-- Unit name to Unit_Index (and from there to Source_Id)
Source_Files_HT : Source_Files_Htable.Instance;
-- Base source file names to Source_Id list.
Source_Paths_HT : Source_Paths_Htable.Instance;
-- Full path to Source_Id