[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. From-SVN: r260450
Showing
Please
register
or
sign in
to comment