[Dwarf-Discuss] question about [0x0..0xffffffff] location list entry
Wed Jan 19 20:50:34 GMT 2011
> The location list entry, as dumped by readelf looks is:
> Offset Begin End Expression
> 00090068 0009f7c4 0009f7c3 (DW_OP_addr: 4000d120)
> 00090068 <End of list>
> A raw dump of the .debug_loc section at the offset where our
> location list is located shows that begin and end offsets are
> 0x0 and 0xffffffff (address size is 32bits).
> I believe that the intention behind this location list entry is
> to say: variable lives at DW_OP_addr=4000d120 for all PC addresses
> (infinite range).
Any sensible compiler would just emit a direct DW_FORM_exprloc here instead
of using a location list at all.
> But I also believe that this is not saying what they thing it is
> expressing. According to the way I understand the DWARF4 standard,
> I believe that the above should mean that the variable is live
> only for PC addresses starting at 0x0009f7c4 (the base address
> of the unit containing that variable). So the live range for
> that address, as expressed, is [0x0009f7c4..+Inf[.
Assuming there is no previous base address entry in that location list,
then that's roughly correct. What makes it "rough" is that I don't think
it's at all clear what overflowing/wrapping address computations are
supposed to mean. It seems highly dubious that the producer should ever
emit values wherein the additions the consumer does would overflow like this.
More information about the Dwarf-discuss