From dae0df6cd979c71c7ed1c60b9203f2a41b03e20e Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 23 Jun 2021 00:21:00 +0200 Subject: [PATCH] [Ada] Small cleanup in System.Dwarf_Line 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. --- gcc/ada/libgnat/s-dwalin.adb | 6 ++---- gcc/ada/libgnat/s-dwalin.ads | 9 ++++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/gcc/ada/libgnat/s-dwalin.adb b/gcc/ada/libgnat/s-dwalin.adb index 4a9d538..56564c5 100644 --- 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 index 132d3e1..23ec275 100644 --- 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); -- 2.7.4