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

Alex Langford via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 24 16:22:13 PDT 2023


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 generates a "bad" argument for `trampoline_mangled_target`? My understanding is that you can mark any arbitrary function as a trampoline for any other arbitrary symbol, even ones that don't exist in your compilation unit (so clang or llvm may not be able to verify that your trampoline "target" is correct). This may be even challenging for the dsymutil (and other debug info "linkers") because it's possible the symbol isn't described in debugging information. I suppose then it would fall on LLDB to detect these things? Since LLDB is meant to place a breakpoint on the trampoline target, would we emit a warning when LLDB has no idea where to place the breakpoint?

Not trying to cause trouble or disagree with the idea, but I would like to better understand what we can do to detect a failure.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146595



More information about the cfe-commits mailing list