dblaikie added a comment.

In D146595#4217855 <https://reviews.llvm.org/D146595#4217855>, @augusto2112 
wrote:

>> Should there be some check that that symbol exists? (the current test uses 
>> the unmangled name "bar" for instance - which gives the wrong impression?)
>
> You mean as part of the attribute validation?

Right

>> 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 there would be no debug info for it?
>
> These trampoline functions can call other functions as part of their setup, 
> so annotating them with nodebug wouldn't guarantee that the debugger would be 
> able to step through to the correct place. Additionally, you wouldn't be able 
> to refer to them in LLDB expression evaluation either.

Oh, that's a bit worrying - that these aren't trampolines in the sort of 
lower-level sense, only in a high level sense.

Is the ability to debug these functions under some debugger flag ("show me 
intermediate steps/implementation details") a priority? Would it be OK if that 
were only available with a rebuild (ie: maybe didn't need to be represented in 
DWARF - this would also allow debug info to be smaller & not having to describe 
these transparent/implementation detail functions)?

For instance std::move/std::forward got turned into compiler intrinsics and so 
have no debug info impact anymore - you can't step into the std::move 
implementation at all, even at -O0. It'd be nice if some other standard library 
functions maybe could have this behavior - though the callability is an issue 
which would be different for different functions. (I guess non-callability is 
already covered by nodebug)

I guess the debug info size benefit couldn't be attained while providing 
callability...

Is there a single public entry point in most cases? How bad would it be if the 
implementation functions were all nodebug, but the public entry point and 
underlying function had debug info? Would that provide most/enough of the 
benefits you're after?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146595

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to