[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-30 Thread Augusto Noronha via Phabricator via cfe-commits
augusto2112 updated this revision to Diff 509810. augusto2112 added a comment. Updating to "transparent_stepping" attribute Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146595/new/ https://reviews.llvm.org/D146595 Files: clang/include/clang/Bas

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-28 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. How is this attribute going to handle a trampoline that performs a virtual dispatch from C++ call into Swift? In that case, the target is not known. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146595/new/ https://review

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: akhuang, bwyma, zturner. aaron.ballman added a comment. In D146595#4225702 , @aprantl wrote: > In D146595#4225630 , @aaron.ballman > wrote: > >> It's less about other debug format

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-27 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a subscriber: rnk. aprantl added a comment. In D146595#4225630 , @aaron.ballman wrote: > It's less about other debug formats and more about user experience. My two > big concerns are: 1) writing multiple attributes to do the same thing is

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D146595#4225490 , @aprantl wrote: >> We don't want to have one attribute per debug format, because that's not >> going to scale. > > LLVM supports outputting a total of 2 debug info formats. Why should the user have to

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-27 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. > We don't want to have one attribute per debug format, because that's not > going to scale. LLVM supports outputting a total of 2 debug info formats. > So how do we validate that this attribute should be exposed to users *now* > before we know what the story is for ot

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-27 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. > Why should this feature be limited to DWARF? Don't we have the same kind of > stepping behavior issue with PDB files, for example? That's not what I was trying to say. Yes, `DW_AT_trampoline` is a DWARF feature. But the "target function" LLVM IR feature is not necessa

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-27 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. > I guess it was implemented there first/ported to clang with the fortran effort Yeah my understanding is that the LLVM feature was added for flang, and so I'm not sure what the targeted debugger is, I believe there are some non-GDB/LLDB debuggers targeting the HPC mark

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D146595#4225259 , @augusto2112 wrote: > In D146595#4225170 , @aaron.ballman > wrote: > >> In D146595#4225132 , @aprantl >> wrote: >> >

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-27 Thread Augusto Noronha via Phabricator via cfe-commits
augusto2112 added a comment. In D146595#4225170 , @aaron.ballman wrote: > In D146595#4225132 , @aprantl wrote: > >> In D146595#4225048 , @dblaikie >> wrote: >> >>> I kno

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-27 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D146595#4225132 , @aprantl wrote: > In D146595#4225048 , @dblaikie > wrote: > >> I know this is a bit of a redirection/scope creep/etc - but I'd quite like >> to see a solution that

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D146595#4225132 , @aprantl wrote: > In D146595#4225048 , @dblaikie > wrote: > >> I know this is a bit of a redirection/scope creep/etc - but I'd quite like >> to see a solution

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-27 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. In D146595#4225048 , @dblaikie wrote: > I know this is a bit of a redirection/scope creep/etc - but I'd quite like to > see a solution that is likely to be usable for the "std::function" problem > (stepping into std::function sh

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-27 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. I know this is a bit of a redirection/scope creep/etc - but I'd quite like to see a solution that is likely to be usable for the "std::function" problem (stepping into std::function should allow you to reach the underlying function - but lldb currently skips any call t

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-24 Thread Alex Langford via Phabricator via cfe-commits
bulbazord added a comment. I had one question about this: I think through the comments you've made it quite clear that the intent is for this to be used by compiler-generated code (i.e. "tooling"). Given that even tools have bugs, what does the debugging/remediation story look like when a tool

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-24 Thread Augusto Noronha via Phabricator via cfe-commits
augusto2112 added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6775 +static void handleTrampolineMangledTarget(Sema &S, Decl *D, + const ParsedAttr &AL) { augusto2112 wrote: > erichkeane wrote: > > I don'

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-24 Thread Augusto Noronha via Phabricator via cfe-commits
augusto2112 added a subscriber: DavidSpickett. augusto2112 added a comment. > I'm coming around to maybe this is the best tradeoff, though not /super/ > enthusiastic - if there was some way to annotate in a way that's easier for > users (like a bit on the function - "transparent" or something -

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/Basic/Attr.td:776 + let Subjects = SubjectList<[Function, ObjCMethod]>; + let Args = [StringArgument<"Name">]; + let Documentation = [TrampolineDocs]; augusto2112 wrote: > aaron.ballman wrote: >

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-23 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D146595#4218040 , @augusto2112 wrote: What would happen if, instead, these trampolining functions were annotated nodebug? I guess then you wouldn't have the top level one as an entry point for the user, as th

[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

2023-03-23 Thread Augusto Noronha via Phabricator via cfe-commits
augusto2112 marked an inline comment as done. augusto2112 added inline comments. Comment at: clang/include/clang/Basic/Attr.td:776 + let Subjects = SubjectList<[Function, ObjCMethod]>; + let Args = [StringArgument<"Name">]; + let Documentation = [TrampolineDocs]; -