[Dwarf-Discuss] variable locations - safe use as lvalues
Tue Jan 21 23:17:49 GMT 2020
> On Jan 21, 2020, at 2:58 PM, Frank Ch. Eigler via Dwarf-Discuss <dwarf-discuss at lists.dwarfstd.org> wrote:
> Hi -
>> While dwarfdump has 'check the DWARF' options available the
>> location list overlap test is not done at all. The -kl option suggests
>> it does loclist checking, but its checking is rather superficial.
> Note that one should not present these overlaps as -errors- (because
> they may be accurate), but rather as complications for lvalue usage.
Indeed. Warnings might be nice if the locations expressions are the same _and_ the types are different.
It would be very hard to figure out in a language agnostic way if two types are not the same ("int" and a typedef to a "int" for example for C based languages).
Maybe if we have two different DWARF types entirely, like one DW_TAG_structure_type and one DW_TAG_enumeration. We would also need to omit any values that are constants values since two different types could both have the same location expression in that case. There are many complexities involved.
> - FChE
> Dwarf-Discuss mailing list
> Dwarf-Discuss at lists.dwarfstd.org
More information about the Dwarf-discuss