[PATCH v3] Bug 28191 - Interpret DWARF 5 addrx locations

Dodji Seketeli dodji@seketeli.org
Tue Nov 23 17:15:27 GMT 2021


[I am adding Mark to the list recipients as I am going to ask him a
question below]

Hello,

Giuliano Procida <gprocida@google.com> a écrit:

> This change uses libdw facilities to interpret location expressions
> instead of using libabigail's own mini-interpreter. With the fix for
> elfutils https://sourceware.org/bugzilla/show_bug.cgi?id=28220 in
> elfutils-0.186, abidw will correctly interpret Clang DWARF 5 symbol
> addresses. Without that fix many declarations will not be linked to
> their corresponding symbols due to the incorrect interpretation of
> location attribute data.
>
> 	* src/abg-dwarf-reader.cc (die_location_address): Use
> 	dwarf_attr_integrate, dwarf_getlocation and
> 	dwarf_getlocation_attr to decode addreses, instead of
> 	die_location_expr and eval_last_constant_dwarf_sub_expr.
> 	* tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi:
> 	Refresh test reference output; two more symbols have types.

Thanks for looking into that.

It seems to me that we can also do away with the use of eval_last_constant_dwarf_sub_expr from
die_member_offset.  Would that work on your testing binaries?

>From what I am seeing, dwarf_getlocation_attr and dwarf_getlocation are
present in elfutils 0.176 which is the oldest version that we need to
support, so we should be able to ditch eval_last_constant_dwarf_sub_expr
and its dependencies altogether.

Or what am I missing?

[...]

Cheers,

-- 
		Dodji


More information about the Libabigail mailing list