[PATCH] D69462: [DebugInfo]: Support for debug_loclists.dwo section in llvm and llvm-dwarfdump.

Sourabh Singh Tomar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 21:20:52 PST 2019


SouraVX marked an inline comment as done.
SouraVX added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp:529
+      uint64_t Offset =
+          IsDWO ? HeaderSize + getLocSectionBase() : getLocSectionBase();
       DWARFDataExtractor Data(Context.getDWARFObj(), *LocSection,
----------------
dblaikie wrote:
> Maybe in the IsDWO case just set it to "HeaderSize"?
> 
> Hmm, @aprantl @probinson - I can't find the wording in the DWARF5 spec about the use of loclists_base and rnglists_base in split units. It's unclear if these need to be specified in the split unit, or if they're assumed to be zero (or, technically, zero + sizeof(list header))? Currently LLVM doesn't generate a rnglists_base for split DWARFv5 units (I haven't checked the history on that change - but I might've had a hand in it) & this change is going to propagate that choice & do similarly for loclists_base.
> 
> GCC 8.1 at least doesn't seem to give us any hint there - since they don't use rnglists.dwo so far as I can tell (I induced a function-local range list and it was put in the .o rnglists section, there was no rnglists.dwo section)
> 
> In some ways it'd be tidier to emit it, of course - consistent between .o and .dwo, but also it'd likely be redundant/always have the same value in every .dwo file.
Anyways it's ` getLocSectionBase() ` value is ` 0 ` . 
Since, we've set it up that way above --

```
if (IsDWO)
       setLocSection(&Context.getDWARFObj().getLoclistsDWOSection(), 0);
```

Added this here just for readibility / uniformity sake.


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

https://reviews.llvm.org/D69462





More information about the llvm-commits mailing list