aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/symbols-processing-vms-alpha.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-09-10 15:29:36 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-09-10 15:29:36 +0200
commited0af3ba4fb25ca4c661a1e8475c42931a78f59b (patch)
tree2a56528d4becddbaad3c25de468f5e798839c174 /gcc/ada/symbols-processing-vms-alpha.adb
parentf00c5f52285d2203317335960666a4f9a929444b (diff)
downloadgcc-ed0af3ba4fb25ca4c661a1e8475c42931a78f59b.zip
gcc-ed0af3ba4fb25ca4c661a1e8475c42931a78f59b.tar.gz
gcc-ed0af3ba4fb25ca4c661a1e8475c42931a78f59b.tar.bz2
[multiple changes]
2010-09-10 Robert Dewar <dewar@adacore.com> * symbols-processing-vms-alpha.adb: Minor reformatting. 2010-09-10 Jerome Lambourg <lambourg@adacore.com> * bindgen.adb (Gen_Adainit_Ada): In .NET, don't call __gnat_install_handler in case the binder is called with -n. From-SVN: r164172
Diffstat (limited to 'gcc/ada/symbols-processing-vms-alpha.adb')
-rw-r--r--gcc/ada/symbols-processing-vms-alpha.adb34
1 files changed, 16 insertions, 18 deletions
diff --git a/gcc/ada/symbols-processing-vms-alpha.adb b/gcc/ada/symbols-processing-vms-alpha.adb
index 668e473..c337394 100644
--- a/gcc/ada/symbols-processing-vms-alpha.adb
+++ b/gcc/ada/symbols-processing-vms-alpha.adb
@@ -40,8 +40,9 @@ package body Processing is
C_SYM : constant Number := 1;
-- Code for a Symbol subsection
- V_DEF_Mask : constant Number := 2**1;
- V_NORM_Mask : constant Number := 2**6;
+ V_DEF_Mask : constant Number := 2 ** 1;
+ V_NORM_Mask : constant Number := 2 ** 6;
+ -- Comments ???
B : Byte;
@@ -49,10 +50,10 @@ package body Processing is
-- The number of characters of each section
Native_Format : Boolean;
- -- True if records are decoded by the system (like on VMS).
+ -- True if records are decoded by the system (like on VMS)
Has_Pad : Boolean;
- -- If true, a pad byte must be skipped before reading the next record.
+ -- If true, a pad byte must be skipped before reading the next record
-- The following variables are used by procedure Process when reading an
-- object file.
@@ -123,7 +124,7 @@ package body Processing is
Success := True;
- -- Check the file format in case of cross-tool.
+ -- Check the file format in case of cross-tool
Get (Code);
Get (Number_Of_Characters);
@@ -131,25 +132,22 @@ package body Processing is
if Code = Dummy and then Number_Of_Characters = Natural (EMH) then
- -- Looks like a cross tools.
+ -- Looks like a cross tool
Native_Format := False;
Number_Of_Characters := Natural (Dummy) - 4;
Has_Pad := (Number_Of_Characters mod 2) = 1;
elsif Code = EMH then
-
Native_Format := True;
Number_Of_Characters := Number_Of_Characters - 6;
Has_Pad := False;
else
-
Put_Line ("file """ & Object_File & """ is not an object file");
Close (File);
Success := False;
return;
-
end if;
-- Skip the EMH section
@@ -163,9 +161,10 @@ package body Processing is
while not End_Of_File (File) loop
if not Native_Format then
- if Has_Pad then
- -- Skip pad byte
+ -- Skip pad byte if present
+
+ if Has_Pad then
Get (B);
end if;
@@ -179,7 +178,8 @@ package body Processing is
if not Native_Format then
if Natural (Dummy) /= Number_Of_Characters then
- -- Format error.
+
+ -- Format error
raise Constraint_Error;
end if;
@@ -195,13 +195,11 @@ package body Processing is
-- next section.
if Code /= GSD then
-
for J in 1 .. Number_Of_Characters loop
Read (File, B);
end loop;
else
-
-- Skip over the next 4 bytes
Get (Dummy);
@@ -218,10 +216,10 @@ package body Processing is
Number_Of_Characters := Number_Of_Characters - 8;
Nchars := Nchars - 8;
- -- If this is a symbol and the V_DEF flag is set, get the
- -- symbol.
+ -- If this is a symbol and the V_DEF flag is set, get symbol
if Code = C_SYM and then ((Flags and V_DEF_Mask) /= 0) then
+
-- First, reach the symbol length
for J in 1 .. 25 loop
@@ -238,6 +236,7 @@ package body Processing is
for J in 1 .. Nchars loop
Read (File, B);
Number_Of_Characters := Number_Of_Characters - 1;
+
if Length > 0 then
LSymb := LSymb + 1;
Symbol (LSymb) := B;
@@ -273,7 +272,6 @@ package body Processing is
if (Flags and V_NORM_Mask) = 0 then
S_Data.Kind := Data;
-
else
S_Data.Kind := Proc;
end if;
@@ -294,7 +292,7 @@ package body Processing is
end loop;
end if;
- -- Exit the GSD section when number of characters reaches 0
+ -- Exit the GSD section when number of characters reaches zero
exit when Number_Of_Characters = 0;
end loop;