[lldb-dev] Some Basic LLDB Usage Questions
Curtis Faith
curtis at curtisfaith.com
Mon Jul 5 10:02:47 PDT 2010
I am in the middle of a project where I have built a domain-specific-language (DSL) front-end for trading simulation that uses LLVM to JIT the DSL code and link it into precompiled LLVM bitcode that comes from a C++ simulation engine compiled with clang++.
I need to implement some sort of debugger to let users of the trading simulation environment set breakpoints, see local variables defined in the DSL, global variables etc. It needs to be real lightweight and simple as the users are not experienced programmers. They are generally just traders with some basic knowledge of trading algorithms. I'm going to provide a Cocoa-based GUI and want to use the LLDB API to get the appropriate data from the users.
It seems to me after a perusal of the lldb C++ API's that it is likely that lldb will suit my purposes. There are a couple of important open issues:
1) What does the SB stand for? I'm guessing that there was once a code name for the project of SourceBug? Am I close?
2) Can I easily debug JIT'd code with LLDB?
3) Most of the time, users will run unoptimized code while debugging their algorithms and then they'll want fully optimized code while running large tests that might take several hours or days. In the case of the unoptimized quick test, the turnaround is what is important, how quickly can I get a test started. This seems like it will be dependent on how quickly the debugger can startup and load the symbols. Any benchmarks startup times for reasonable sized projects? Say for clang?
4) I know that lldb just made its public debut, so the documentation is a bit sparse. While I'm working on my project, I will be learning how to use lldb without the benefit of the documentation to come. I'm willing to help out on documentation if that makes sense but I don't want to duplicate ongoing work. Does my use of LLDB seem common enough that a tutorial would be helpful once I've learned how to make it work?
5) I need to segregate out much of the debugging information to hide variables and class members from the C++ code that aren't visible to the DSL, I also want to hide a lot of technical detail. Will this be possible? It seems like it ought to be fairly easy but I might be missing something.
Thanks in advance,
Curtis
More information about the lldb-dev
mailing list