[PATCH] D99693: Update the linkage name of coro-split functions where applicable

Sriraman Tallam via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 21 17:04:44 PDT 2021


tmsriram added a comment.

In D99693#2706719 <https://reviews.llvm.org/D99693#2706719>, @dblaikie wrote:

> In D99693#2706501 <https://reviews.llvm.org/D99693#2706501>, @aprantl wrote:
>
>> In D99693#2687996 <https://reviews.llvm.org/D99693#2687996>, @dblaikie wrote:
>>
>>>> This patch does not affect C++ coroutines, since the DW_AT_specification is expected to hold the (original) linkage name.
>>>
>>> So does this mean that for C++ we'll have a DW_TAG_subprogram with a DW_AT_linkage_name that doesn't match the symbol for that code in the object's symbol table?
>>
>> Correct — and I would say this is probably a bug, unless we want DW_AT_linkage_name to show the "original" linkage name for purposes of matching breakpoints refering to the original name without the .resume suffix or something like that.
>
> I'm a bit confused then.
>
>> since the DW_AT_specification is expected to hold the (original) linkage name.
>
> What's this claim ^ about/based on? What happens if it doesn't hold the original linkage name?
>
> @tmsriram - I think you hit a problem with debug info linkage names not matching the symbol names in the unique linkage name work. Do you recall what the problem was when those things diverged?

TLDR; breakpoints on these functions set with "b foo" for function foo will no longer work.

In the unique linkage names work, we originally appended a suffix that could have numeric and alphanumeric characters mixed.  Such suffixes are not demangler friendly.
IIRC, In the presence of DW_AT_linkage_name, the debugger uses that when setting a breakpoint rather than DW_AT_name.   If a function foo had a linkage name say "_ZXXfoo" and didn't demangle, the debugger will not honor "b foo".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99693



More information about the llvm-commits mailing list