[PATCH] D137139: [DWARF] Fix handling of .debug_aranges with -g1

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 13:57:26 PST 2023


clayborg added a comment.

In D137139#4084505 <https://reviews.llvm.org/D137139#4084505>, @dblaikie wrote:

> In D137139#4084468 <https://reviews.llvm.org/D137139#4084468>, @clayborg wrote:
>
>> If the only time clang is not emitting .debug_aranges correctly is when we use -g1, then fixing that issue (by either fixing or removing .debug_arnages) would be fine by me. That being said, we have a clang that has been producing bad .debug_aranges, so unless we fix LLDB it won't fix the issue for binaries already out in the wild.
>
> What sort of fix for LLDB are you picturing? One way to fix LLDB would be to teach it to ignore .debug_aranges - which would hurt perf on inputs with correct .debug_aranges but no CU ranges, but we don't seem to have anyone clamouring for support for that scenario.

If I did a fix I would:

- use CU ranges always if they are available
- fall back to .debug_aranges if there
- do expensive manual parsing for ranges


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137139



More information about the llvm-commits mailing list