[PATCH] D85085: Fix debug_loc offset difference with basic block sections

Sriraman Tallam via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 21:38:31 PDT 2020


tmsriram added a comment.

In D85085#2225425 <https://reviews.llvm.org/D85085#2225425>, @dblaikie wrote:

> In D85085#2225420 <https://reviews.llvm.org/D85085#2225420>, @tmsriram wrote:
>
>> @amharc
>>
>> When basic block sections are on and the debug_loc entries span multiple sections, emit entries for each section.  This keeps the fidelity and there is no loss of debug information.
>>
>> To summarize, by default there is only one entry which is collapsed into a DW_AT_const_value.
>>
>> WIth basic block sections, this one entry spans multiple sections and must be split into an entry for each section.
>
> if the location is valid for the entire range of the enclosing scope, it could still be described with a single DW_AT_const_value, I think?
>
> DWARFv5 spec: "[single (non-loclist) location descriptions] are sufficient for describing the location of any object as long as its lifetime is either static or the same as the lexical block that owns it, and it does not move during its lifetime"

I am not sure I fully understood what you meant here, could you please elaborate?  With sections, since the individual sections could be separated and can become disjoint you need one per section right?  Maybe you meant something else.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85085/new/

https://reviews.llvm.org/D85085



More information about the llvm-commits mailing list