[Lldb-commits] [PATCH] D68655: Trust the arange accelerator tables in dSYMs

Jason Molenda via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 12 09:47:34 PST 2023


jasonmolenda added a comment.

In D68655#4047126 <https://reviews.llvm.org/D68655#4047126>, @labath wrote:

> In D68655#4045895 <https://reviews.llvm.org/D68655#4045895>, @jasonmolenda wrote:
>
>> Both have to be written by the dwarf linker to be correct, but only the former is written ONLY by the dwarf linker.
>
> I don't think that's right:
>
>   $ clang -c -x c - -o - -gdwarf-aranges -g <<<"void f(){}" | llvm-readelf - --sections | grep aranges
>     [ 6] .debug_aranges    PROGBITS        0000000000000000 0000a0 000030 00      0   0  1
>     [ 7] .rela.debug_aranges RELA          0000000000000000 000380 000030 18   I 20   6  8

Ah thanks Pavel, clang on Darwin doesn't emit this in .o files.  So in this case, the .o file has a DW_TAG_compile_unit with a DW_AT_ranges and a .debug_aranges, both generated pre-link-time by the compiler.  And Greg is saying that the DW_AT_ranges list in the final executable will be better than the .debug_aranges?  I don't know how strongly he asserts this - today if a .debug_aranges has an entry, we don't look at DW_TAG_compile_unit's DW_AT_ranges, or create the ranges ourself via the line table; the debug_aranges is trusted above the other methods if it includes CU.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68655



More information about the lldb-commits mailing list