将树lldb的顶部与xcode一起使用 [英] Use top of tree lldb with xcode

查看:81
本文介绍了将树lldb的顶部与xcode一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在/usr/local/bin中建立了lldb树的顶部,我想告诉xcode使用此二进制文件而不是默认的二进制文件.但是我找不到如何/在哪里设置.

I built the top of tree of lldb in /usr/local/bin and I would like to tell xcode to use this binary instead of the default one. But I can't find how/where to set this.

推荐答案

不幸的是,这不起作用.自从lldb-179(于2012年12月上旬)分支到Xcode 4.6.x以来,对svn信息库lldb进行了一些API更改.如果将根据当前svn构建的LLDB.framework放在/Applications/Xcode.app/Contents/SharedFrameworks/中,则在尝试调试任何内容时都会导致Xcode崩溃.

Unfortunately this won't work. There have been a couple of API changes made to the svn repository lldb since lldb-179 was branched off (c. early December 2012) for Xcode 4.6.x. If you were to put the LLDB.framework built from current svn in /Applications/Xcode.app/Contents/SharedFrameworks/ it will cause Xcode to crash when you try to debug anything.

作为背景,请记住lldb实际上是调试器. lldb库在Mac OS X上为LLDB.framework,驱动程序链接至该库.命令行"lldb"程序是一个驱动程序,Xcode是另一个驱动程序.将来可能还会有其他驱动程序,有时我们会开玩笑说"llgdb",该驱动程序的外观与& gdb的感觉,但使用lldb库完成所有工作.

As background, remember that lldb is really a debugger library. The lldb library is LLDB.framework on Mac OS X, which driver programs link against. The command line "lldb" program is one driver, Xcode is another driver. There could be additional driver programs in the future, we sometimes joke about "llgdb", a driver program that has the look & feel of gdb but uses the lldb library to do all the work.

lldb库提供了一个API,驱动程序对该代码进行编程/链接.这是一个C ++ API.在这一点上,它并不打算长期稳定;有时需要对现有方法进行更改,并且必须根据新版本更新/重新链接驱动程序.这就是为什么如果您插入较新的LLDB.framework会导致编译为链接到2012年12月早期lldb(Xcode 4.6.x)的驱动程序(Xcode)中断的原因-自12月和2007年以来,API进行了数次不兼容的更改因此如果您尝试将Xcode混合在一起,Xcode将会崩溃.

The lldb library provides an API that the driver programs code to/link against. It is a C++ API. It is not intended to be long-term stable at this point; occasionally changes to the existing methods need to be made and driver programs have to be updated / relinked against the newer version. This is why a driver program (Xcode) which is compiled to link against an early December 2012 lldb (Xcode 4.6.x) will break if you drop in a newer LLDB.framework - the APIs have been changed incompatibly a few times since December and so the Xcode would crash if you tried to intermix them.

没有确切的修订版本,您可以从svn签出以获取与Xcode 4.6相同的lldb-179 lldb.当需要标记该发行版时,会选择一个稳定版本的lldb并将其导入到苹果内部存储库中.大约是在12月12日的第一周,从那里进行的任何修订都将与lldb-179区分.从那时起,对Xcode 4.6/lldb-179进行了一些小的更新,例如lldb-179.1,lldb-179.2等.它们是从Apple内部分支中提取出来的,是lldb-179,还有一些稍后在公共svn存储库中精心挑选的修复程序.

There isn't an exact revision you can check out from svn to get the same lldb-179 lldb that was included in Xcode 4.6. When it came time to tag that release, a stable version of lldb was picked and imported into an apple internal repository. It was around the first week of December '12, any revision from there will be indistinguishable from lldb-179. There have been a few minor updates to Xcode 4.6/lldb-179 since then, e.g. lldb-179.1, lldb-179.2, etc. These are made off of the apple internal branch and are lldb-179 plus a handful of cherry-picked fixes from later in the public svn repository.

除了LLDB.framework提供的C ++ API外,有趣的是lldb还提供了"SB API".这是python脚本接口的术语.您可以使用SB API完全使用Python编写真正的调试器驱动程序,以在后台进行实际的调试器工作.当您直接链接到LLDB.framework时,这些python API比C ++ API更加稳定,但是如果将来需要重新考虑设计决策,它们有时确实仍然需要更改.

In addition to the C++ API provided by LLDB.framework, it's interesting to note that lldb also provides an "SB API". This is a term for the python scripting interface. You can write a real debugger driver program entirely in Python, using the SB APIs to do the actual debugger work behind the scenes. These python APIs are more stable than the C++ APIs when you link directly against LLDB.framework, but they do occasionally still have to change if design decisions need to be revisited in the future.

顺便说一句,如果我没记错的话,使Xcode 4.6无法与svn lldb链接的第一个API更改是在1月或2月提交的.某些方法必须从采用int变为采用uint64_t或类似的方式.这些是C ++方法,因此该函数的混乱名称已更改,必须针对新版本的lldb重新编译Xcode才能继续链接.

As an aside, if I remember correctly the first API change which made Xcode 4.6 not linkable against the svn lldb was committed in January or February. Some method had to change from taking an int to taking a uint64_t or something along those lines. These are C++ methods so the mangled name of the function changed and Xcode had to be recompiled against the new version of lldb to continue to link.

这篇关于将树lldb的顶部与xcode一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆