2 ms·
Can you print variables in lldb with the debug information? One compiler that I use which emits llvm ir added support for debug information recently and its no
by broken_symlink 6y ago
Can you print variables in lldb with the debug information?
One compiler that I use which emits llvm ir added support for debug information recently and its now possible to set breakpoints in gdb but you can't print out any stack variables or anything so its not useful other than figuring out which code paths execute.
I'd like to learn more about this. Maybe contribute to the compiler and fix this issue.
- jmorse2 6y ago> I'd like to learn more about this. Maybe contribute to the compiler and fix this issue. You need to create a call to the `llvm.dbg.declare` intrinsic that connects the stack variable alloca to a DILocalVariable metadata node, and place the call after the stack variable alloca. The rest of LLVM will handle tracing the stack location through the compiler to the output, including the alloca being promoted. See: https://llvm.org/docs/SourceLevelDebugging.html#debugger-intrinsic-functions https://llvm.org/docs/SourceLevelDebugging.html#debugger-int...