This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r260450 - in /trunk/gcc/ada: ChangeLog libgnat/...
- From: pmderodat at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Mon, 21 May 2018 14:50:39 -0000
- Subject: r260450 - in /trunk/gcc/ada: ChangeLog libgnat/...
Author: pmderodat
Date: Mon May 21 14:50:38 2018
New Revision: 260450
URL: https://gcc.gnu.org/viewcvs?rev=260450&root=gcc&view=rev
Log:
[Ada] Robustify traceback symbolization from dwarf info
Symbolization of traceback entries from dwarf info is
failing in multiple cases for addresses originating from
shared libraries.
Part of the problem is a confusion across different functions
regarding the kind of "address" at hand, sometimes full process
runtime addresses (e.g. in traceback entries), sometimes module
relative (e.g. in dwarf info segments).
This change fixes this by introducing the use of distinct types
for the two kinds of addresses, resorting to System.Address
for runtime addresses and to Storage_Elements.Storage_Offset
for module relative values. The accompanying code changes
tidy a few places where we can now use standard operators
to combine offets & addresses, and include a few corrections
of consistency problems at spots where comparisons were done
between runtime addresses and relative offsets.
2018-05-21 Olivier Hainque <hainque@adacore.com>
gcc/ada/
* libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
Address, and type of Low, High to Storage_Offset.
(Low): Rename as Low_Address and convey that the return value is a
runtime reference accounting for a load address.
* libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
address/offset type changes.
(Aranges_Lookup): Likewise.
(Symbolic_Address): Likewise.
(Symbolic_Traceback): Likewise.
(Dump_Cache): Likewise.
(Is_Inside): Likewise.
(Open): Likewise.
(Set_Load_Address): Likewise.
(Low_Address): Likewise, and account for C.Load_Address.
* libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
(Multi_Module_Symbolic_Traceback): Compare address in traceback
with module Low_Address instead of Low.
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/libgnat/s-dwalin.adb
trunk/gcc/ada/libgnat/s-dwalin.ads
trunk/gcc/ada/libgnat/s-trasym__dwarf.adb