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 protected]>
> +
> +     * 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
master.

Reply via email to