简体   繁体   English

XCode如何使用LLDB?

[英]How XCode uses LLDB?

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. 我不是XCode用户,但我想知道XCode是通过其解释器使用LLDB还是使用共享库lldb.so。

What can you do with lldb.so? 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? 因此,您可以使IDE内部具有调试功能,而无需调用外部命令?

I'm planning to make a C++ IDE. 我打算制作一个C ++ IDE。

lldb has a well defined C++ public API - the SB (for Script Bridge) API's. lldb具有定义良好的C ++公共API-SB(用于脚本桥)API。 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. 它们是我们提供给SWIG的C ++ API,以提供lldb的Python接口。 But they are also intended to be used as is, and that is in fact how Xcode uses lldb. 但是它们也打算照原样使用,实际上这就是Xcode使用lldb的方式。

For some more details, see: 有关更多详细信息,请参见:

http://lldb.llvm.org/cpp_reference/html/annotated.html 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. 没有关于C ++ API的“如何使用”文档,但是请注意,它们反映了Python API的内容,因此您可以通过玩弄Python的文档并查看Python教程和轻松地学习如何使用C ++ API。 lldb网站上的示例。

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. SB类是内部LLDB对象周围的瘦包装器,它们使用一种或其他形式的不透明指针,因此它们对于内部对象的更改具有鲁棒性。 We don't remove API's. 我们不会删除API。

Note, there are also several other IDE's on the Mac that use lldb this way, so you wouldn't be alone... 请注意,Mac上还有其他几种以这种方式使用lldb的IDE,因此您不会孤单...

If you want to know more, the lldb-dev mailing list is a good resource: 如果您想了解更多,lldb-dev邮件列表是一个很好的资源:

http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM