Reputation: 2442
I am not an XCode user, but I want to know if XCode uses LLDB through it's interpreter or if it uses the shared library lldb.so.
What can you do with lldb.so? Does it have all the debugger functionality inside? So you can make an IDE that has debugging capabilities inside and does not need to call an external command?
I'm planning to make a C++ IDE.
Upvotes: 1
Views: 381
Reputation: 27203
lldb has a well defined C++ public API - the SB (for Script Bridge) API's. The name really only describes half their usage. They are the C++ API's we feed to SWIG to provide the Python interface to lldb. But they are also intended to be used as is, and that is in fact how Xcode uses lldb.
For some more details, see:
http://lldb.llvm.org/cpp_reference/html/annotated.html
This just gives an outline of the classes provided. There aren't any "How to use" documents for the C++ API's, but note that they mirror the Python API's so you can easily learn how to use the C++ API's by playing around with the Python ones, and looking at the Python Tutorial and examples on the lldb site.
The SB Classes are thin wrappers around internal LLDB objects using opaque pointers of one form or other so that they are robust against changes to the internal objects. We don't remove API's.
Note, there are also several other IDE's on the Mac that use lldb this way, so you wouldn't be alone...
If you want to know more, the lldb-dev mailing list is a good resource:
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
Upvotes: 4