Levo DeLellis via llvm-dev
2020-Feb-24 20:54 UTC
[llvm-dev] Skipping a function/line in the debug information?
I'm not sure where to look or if it's possible, if someone could point me in the right direction that would be great There's a few internal functions in my language like WriteLine. When I use lldb to 'thread step-in' (or vscode) the debugger will enter the function. Is it possible to let lldb know it should skip the function? I tried using clang to find some clues but puts and other function all allow me to step in and gets a missing source error. Is there any llvm-ir code I can look at to show me how to skip a function? Or a language that generates the appropriate ir? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200224/baa40194/attachment.html>
David Blaikie via llvm-dev
2020-Feb-24 21:23 UTC
[llvm-dev] Skipping a function/line in the debug information?
I don't know of any DWARF functionality or extensions that are currently used to communicate "uninteresting" functions not to step into. If there's a specific example where you've seen this behavior work as you'd like in another language/frontend/etc - if you provide that example I/we might be able to explain why it works that way & how you could reproduce that behavior. On Mon, Feb 24, 2020 at 12:54 PM Levo DeLellis via llvm-dev < llvm-dev at lists.llvm.org> wrote:> I'm not sure where to look or if it's possible, if someone could point me > in the right direction that would be great > > There's a few internal functions in my language like WriteLine. When I use > lldb to 'thread step-in' (or vscode) the debugger will enter the function. > Is it possible to let lldb know it should skip the function? I tried using > clang to find some clues but puts and other function all allow me to step > in and gets a missing source error. > Is there any llvm-ir code I can look at to show me how to skip a function? > Or a language that generates the appropriate ir? > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200224/3cbbfd09/attachment.html>
Adrian Prantl via llvm-dev
2020-Feb-24 21:29 UTC
[llvm-dev] Skipping a function/line in the debug information?
The first two options that come to mind are: 1. don't generate debug info for these functions Many debuggers will avoid stepping into functions without debug info. 2. mark the function as as DW_AT_artifical to communicate to your debugger to skip it. I don't know if LLDB does this automatically, but you could easily make that the behavior for your language. For details it's best to ask on lldb-dev. -- adrian> On Feb 24, 2020, at 12:54 PM, Levo DeLellis via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > I'm not sure where to look or if it's possible, if someone could point me in the right direction that would be great > > There's a few internal functions in my language like WriteLine. When I use lldb to 'thread step-in' (or vscode) the debugger will enter the function. Is it possible to let lldb know it should skip the function? I tried using clang to find some clues but puts and other function all allow me to step in and gets a missing source error. > Is there any llvm-ir code I can look at to show me how to skip a function? Or a language that generates the appropriate ir? > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev