[PATCH] D113741: [RFC][DwarfDebug][AsmPrinter] Support emitting function-local declaration for a lexical block

Alexander Yermolovich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 08:28:00 PDT 2022


ayermolo added a comment.

In D113741#3536166 <https://reviews.llvm.org/D113741#3536166>, @dblaikie wrote:

> In D113741#3534761 <https://reviews.llvm.org/D113741#3534761>, @ayermolo wrote:
>
>> In D113741#3532850 <https://reviews.llvm.org/D113741#3532850>, @dblaikie wrote:
>>
>>> In D113741#3516038 <https://reviews.llvm.org/D113741#3516038>, @krisb wrote:
>>>
>>>> There is an alternative implementation that relies on addition field of DISubprogram/DILexicalScope that tracks static locals, local imports and types D125693 <https://reviews.llvm.org/D125693>.
>>>
>>> Ah, OK - so that 5-part sequence is an alternative to this one?
>>>
>>> Might be good to figure out the issue here before debating which direction to go in, etc. (hmm, one of the patches in that series I've already approved? So am I reviewing alternatives here? Given the complexity here that's a bit costly for me/end up feeling like I'm drowning under trying to figure out all these moving parts... - a linear sequence is generally OK/good, I can review the easy parts and focus on the difficult ones, but multiple large alternatives can be a bit daunting)
>
> Ping on this ^
>
>>>> ---
>>>>
>>>> In D113741#3448685 <https://reviews.llvm.org/D113741#3448685>, @jmorse wrote:
>>>>
>>>>> Drive-by comment on the topic of the gnu pubnames error,
>>>>>
>>>>> In D113741#3439940 <https://reviews.llvm.org/D113741#3439940>, @krisb wrote:
>>>>>
>>>>>> If I remember correctly, this issue with .debug_gnu_pubnames was caused by another patch (https://reviews.llvm.org/rG78d15a112cbd545fbb6e1aa37c221ef5aeffb3f2). 
>>>>>> Did I understand you right that the same issue is reproduced with w/o that patch?
>>>>>
>>>>> I've run into that error myself when trying to alter which unit a subprogram definition goes in -- see the comment at D94976#2543257 <https://reviews.llvm.org/D94976#2543257> . That patch never landed in the end because I couldn't figure out exactly what was wrong. IMHO, there's some latent weirdness that triggers that error, exactly how is unclear though. IMO, it's not specific to rG78d15a112cbd5 <https://reviews.llvm.org/rG78d15a112cbd545fbb6e1aa37c221ef5aeffb3f2> .
>>>>>
>>>>> [0] "(.debug_gnu_pubnames): name lookup table at offset (...) has a terminator at offset (...) before the expected end at (...)"
>>>>
>>>> I've tried to reproduce the issue using the example from D94976 <https://reviews.llvm.org/D94976> (and with this patch), it compiled fine and didn't show the mentioned problem with pubnames. 
>>>> Another question is about the combination of FullLTO and split-dwarf which has been already discussed in this thread and which isn't (fully) supported by LLVM mainline (yet, at least in a way that doesn't violate DWARF specification).
>>>>
>>>> So, I'm still looking for a reproducer for the issue with pubnames. Any help will be appreciated.
>>>
>>> Yeah, I still need to figure out how to do that/get you that. :/
>>>
>>> (is this at all/possibly related to https://reviews.llvm.org/D124892 ?)
>>
>> Seems like a discussion is more about multiple CUs in DWO with full LTO? Need to read all the history in more details.
>> Side note BOLT doesn't support multiple CUs in the dwo. There are certain assumptions about abbrev, and how it writes out new dwo files.
>> Does pubnames actually used for anything? My impression is that debuggers (or at least lldb) ignores it.
>
> Yep, debug_gnu_pubnames are used by gold and lld to build gdb_index which improves gdb startup time.

Ah right, forgot about it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113741



More information about the llvm-commits mailing list