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

Sriraman Tallam via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 12:43:02 PDT 2021


On Thu, Apr 22, 2021 at 11:41 AM David Blaikie via Phabricator <
reviews at reviews.llvm.org> wrote:

> dblaikie added a comment.
>
> In D99693#2706885 <https://reviews.llvm.org/D99693#2706885>, @tmsriram
> wrote:
>
> > 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".
>
> Ah, so that's more about whether the name was demangleable - but I thought
> there was also an issue when the DW_AT_linkage_name differed from the real
> mangled name of the symbol, even if both names could be demangled?
>

Isn;t there a similar issue? So if DW_AT_name is "foo" and
DW_AT_linkage_name is "bar" then "break foo" is not going to work.


>
>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D99693/new/
>
> https://reviews.llvm.org/D99693
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210422/c17c25f0/attachment.html>


More information about the llvm-commits mailing list