diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-31 10:24:38 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-31 10:24:38 +0000 |
commit | 156c0b7e6890bceada412b232e42381d6b0e1753 (patch) | |
tree | 3ffabc9f717ea09572757c7fd88ff74648be1c27 /gcc/ada/symbols-vms.adb | |
parent | 3070fc2ca9460b65721698e570cf60f77f28edff (diff) | |
download | gcc-156c0b7e6890bceada412b232e42381d6b0e1753.tar.gz |
2007-08-31 Vincent Celier <celier@adacore.com>
* symbols-vms.adb (Initialize): Read symbol files with continuation
lines
(Finalize): If symbol is long, split the line
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127983 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/symbols-vms.adb')
-rw-r--r-- | gcc/ada/symbols-vms.adb | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/gcc/ada/symbols-vms.adb b/gcc/ada/symbols-vms.adb index 2b955ca22fb..0a43f6fa209 100644 --- a/gcc/ada/symbols-vms.adb +++ b/gcc/ada/symbols-vms.adb @@ -42,6 +42,9 @@ package body Symbols is Symbol_File_Name : String_Access := null; -- Name of the symbol file + Long_Symbol_Length : constant := 100; + -- Magic length of symbols, over which the lines are split + Sym_Policy : Policy := Autonomous; -- The symbol policy. Set by Initialize @@ -120,9 +123,11 @@ package body Symbols is Success : out Boolean) is File : Ada.Text_IO.File_Type; - Line : String (1 .. 1_000); + Line : String (1 .. 2_000); Last : Natural; + Offset : Natural; + begin -- Record the symbol file name @@ -221,7 +226,26 @@ package body Symbols is -- Read line by line while not End_Of_File (File) loop - Get_Line (File, Line, Last); + Offset := 0; + loop + Get_Line (File, Line (Offset + 1 .. Line'Last), Last); + exit when Line (Last) /= '-'; + + if End_Of_File (File) then + if not Quiet then + Put_Line ("symbol file """ & Reference & + """ is incorrectly formatted:"); + Put_Line ("""" & Line (1 .. Last) & """"); + end if; + + Close (File); + Success := False; + return; + + else + Offset := Last - 1; + end if; + end loop; -- Ignore empty lines @@ -549,8 +573,23 @@ package body Symbols is for Index in 1 .. Symbol_Table.Last (Original_Symbols) loop if Original_Symbols.Table (Index).Present then Put (File, Symbol_Vector); + + -- Split the line if symbol name length is too large + + if Original_Symbols.Table (Index).Name'Length > + Long_Symbol_Length + then + Put_Line (File, "-"); + end if; + Put (File, Original_Symbols.Table (Index).Name.all); + if Original_Symbols.Table (Index).Name'Length > + Long_Symbol_Length + then + Put_Line (File, "-"); + end if; + if Original_Symbols.Table (Index).Kind = Data then Put_Line (File, Equal_Data); |