The unit has got "with" and "use" clauses both for Ada.Exceptions.Traceback
and System.Traceback_Entries, but the former is essentially a forwarder for
the latter so can be eliminated.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-dwalin.ads: Remove clause for Ada.Exceptions.Traceback,
add clause for System.Traceback_Entries and alphabetize.
(AET): Delete.
(STE): New package renaming.
(Symbolic_Traceback): Adjust.
* libgnat/s-dwalin.adb: Remove clauses for Ada.Exceptions.Traceback
and System.Traceback_Entries.
(Symbolic_Traceback): Adjust.
diff --git a/gcc/ada/libgnat/s-dwalin.adb b/gcc/ada/libgnat/s-dwalin.adb
--- a/gcc/ada/libgnat/s-dwalin.adb
+++ b/gcc/ada/libgnat/s-dwalin.adb
@@ -31,7 +31,6 @@
with Ada.Characters.Handling;
with Ada.Containers.Generic_Array_Sort;
-with Ada.Exceptions.Traceback; use Ada.Exceptions.Traceback;
with Ada.Unchecked_Deallocation;
with Interfaces; use Interfaces;
@@ -42,7 +41,6 @@ with System.Bounded_Strings; use System.Bounded_Strings;
with System.IO; use System.IO;
with System.Mmap; use System.Mmap;
with System.Object_Reader; use System.Object_Reader;
-with System.Traceback_Entries; use System.Traceback_Entries;
with System.Storage_Elements; use System.Storage_Elements;
package body System.Dwarf_Lines is
@@ -1864,7 +1862,7 @@ package body System.Dwarf_Lines is
procedure Symbolic_Traceback
(Cin : Dwarf_Context;
- Traceback : AET.Tracebacks_Array;
+ Traceback : STE.Tracebacks_Array;
Suppress_Hex : Boolean;
Symbol_Found : out Boolean;
Res : in out System.Bounded_Strings.Bounded_String)
@@ -1893,7 +1891,7 @@ package body System.Dwarf_Lines is
-- If the buffer is full, no need to do any useless work
exit when Is_Full (Res);
- Addr_In_Traceback := PC_For (Traceback (J));
+ Addr_In_Traceback := STE.PC_For (Traceback (J));
Offset_To_Lookup := Addr_In_Traceback - C.Load_Address;
diff --git a/gcc/ada/libgnat/s-dwalin.ads b/gcc/ada/libgnat/s-dwalin.ads
--- a/gcc/ada/libgnat/s-dwalin.ads
+++ b/gcc/ada/libgnat/s-dwalin.ads
@@ -35,15 +35,14 @@
--
-- Files must be compiled with at least minimal debugging information (-g1).
-with Ada.Exceptions.Traceback;
-
+with System.Bounded_Strings;
with System.Object_Reader;
with System.Storage_Elements;
-with System.Bounded_Strings;
+with System.Traceback_Entries;
package System.Dwarf_Lines is
- package AET renames Ada.Exceptions.Traceback;
+ package STE renames System.Traceback_Entries;
package SOR renames System.Object_Reader;
type Dwarf_Context (In_Exception : Boolean := False) is private;
@@ -83,7 +82,7 @@ package System.Dwarf_Lines is
procedure Symbolic_Traceback
(Cin : Dwarf_Context;
- Traceback : AET.Tracebacks_Array;
+ Traceback : STE.Tracebacks_Array;
Suppress_Hex : Boolean;
Symbol_Found : out Boolean;
Res : in out System.Bounded_Strings.Bounded_String);