This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] libdw: Handle empty location expression for (indirect) DIE locations.
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Fri, 13 Dec 2013 14:27:36 +0100
- Subject: Re: [PATCH] libdw: Handle empty location expression for (indirect) DIE locations.
On Mon, 2013-12-09 at 16:45 +0100, Mark Wielaard wrote:
> When dwarf_getlocation_implicit_pointer and dwarf_getlocation_attr
> refer to a DIE that doesn't contain a DW_AT_location then don't generate
> an error, but return an empty location expression to signal the actual
> value pointed to is not available. This isn't invalid DWARF. Also make
> sure that __libdw_intern_expression handles empty location expressions.
> +2013-12-09 Mark Wielaard <email@example.com>
> + * dwarf_getlocation.c (__libdw_intern_expression): Handle empty
> + location expressions.
> + * dwarf_getlocation_attr.c (dwarf_getlocation_attr): When no
> + location found, return empty location expression.
> + * dwarf_getlocation_implicit_pointer.c
> + (dwarf_getlocation_implicit_pointer): Likewise.
> + (__libdw_empty_loc_attr): New internal function.
> + * libdwP.h (__libdw_empty_loc_attr): Define.
After testing varlocs a bit more on random binaries (varlocs now works
in general on anything I throw at it, extracting all location
expressions as expected) and some testing by Josh I have pushed this to