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

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 10:47:19 PST 2023


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

In D137139#4092255 <https://reviews.llvm.org/D137139#4092255>, @clayborg wrote:

> In D137139#4091685 <https://reviews.llvm.org/D137139#4091685>, @dblaikie wrote:
>
>> In D137139#4091500 <https://reviews.llvm.org/D137139#4091500>, @clayborg wrote:
>>
>>> In D137139#4091496 <https://reviews.llvm.org/D137139#4091496>, @dblaikie wrote:
>>>
>>>> In D137139#4091399 <https://reviews.llvm.org/D137139#4091399>, @clayborg wrote:
>>>>
>>>>> In D137139#4091380 <https://reviews.llvm.org/D137139#4091380>, @dblaikie wrote:
>>>>>
>>>>>> In D137139#4090779 <https://reviews.llvm.org/D137139#4090779>, @ayermolo wrote:
>>>>>>
>>>>>>> To me it sounds it's easier to just fix it in llvm, no?
>>>>>>
>>>>>> Though that doesn't address the concern @clayborg that lldb will still misbehave on existing compiled code?
>>>>>
>>>>> Which is ok, this is to fix the compiler. I can make separate LLDB changes to address the reality of the situation.
>>>>
>>>> What sort of change to LLDB are you thinking of?
>>>
>>> using DW_AT_ranges instead of .debug_aranges if they are available.
>>
>> So then LLDB wouldn't use this .debug_aranges data this patch fixes, right? So could we remove this .debug_aranges data instead?
>
> Older LLDB versions which are out in the wild and will exist until the end of time will use the .debug_aranges. So I would vote to fix the compiler and do it with this patch.

They won't use them if we remove them. Old debug info in old lldb will always be broken, can't help there. Yes, we could fix or remove aranges and that'd fix new code in new or old lldb and we could change the priority (CU ranges first, then aranges) or remove aranges support from lldb and that'd fix new lldb with old and new code.

I'd prefer we move in a direction away from aranges.

But sure, feel free to make this fix - but I'd really encourage you to revisit your use of/need for aranges.


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