Open rjra100 opened 7 months ago
@llvm/issue-subscribers-lldb
Author: None (rjra100)
@augusto2112 Looks like you worked on something that would fix this but never landed it. Can you take a look?
Hi @rjra100, thanks for reminding me of this, I got side-tracked with other work and didn't upstream this and the accompanying clang patch. If you're on macOS or don't mind compiling clang and lldb from the apple fork (branch stable/20230725
should have the change), you can use the feature until I land this upstream. It requires you to annotate the trampoline function with __attribute__((transparent_stepping))
though. There's some documentation in https://github.com/apple/llvm-project/pull/6597. Let me know if you have any questions!
Hi @augusto2112, thanks for the patches! I have tried them for our downstream project and they work amazingly well. I'm looking forward to seeing them ported to the upstream.
you can use the feature until I land this upstream.
Hi @augusto2112, do you have any updates on this? The patch is awesome and I believe other platforms besides macOS will benefit from it. When do you plan to land it on the mainline? It would be great to have it in the coming LLVM 19 release. Please let me know if you need any help with reviewing the patch or anything.
We're seeing behaviour when debugging code in shared objects, where LLDB
thread step-in
steps over functions instead of stepping into them unlesstarget.process.thread.step-in-avoid-nodebug
is set to false. If set false, we can step into a couple of lines of disassembly of what is presumably a trampoline function, then through to the function of interest. That's a viable workaround, but it's not ideal.I can't be certain, but this review in the llvm phabricator archive looks relevant: https://reviews.llvm.org/D147292. It seems to have been accepted. However, as far as I can see the code never actually landed into the lldb source.