带 lldb 断点的 Xcode 4.6/5 不工作

标签 xcode breakpoints

我在使用调试器 LLDB 时遇到了问题,

如果在 "main.c"中,我包含另一个文件,如 "a.c",并在 "a.c"中设置断点 断点永远不会停止。

还有其他人得到这个吗?

好的,这是例子

// main.c
#include "a.c"
int main()
{
    test();
}


// a.c
void test()
{
    return; // (Using UI to)set break point here, the gdb will stop, and lldb will not
}

============================================= =======================

木马敌人: 我曾在 Xcode 4.6.3 命令行实用程序中尝试过这些步骤, 结果和你的一样,但我的问题是在 GUI 上,

当我用鼠标在“a.c”上设置断点时,它不起作用。

我曾尝试在 main() 上停止,然后输入此命令“br list”, 这是控制台上的消息,

(lldb) br list
Current breakpoints:
1: file ='a.c', line = 13, locations = 0 (pending)


2: file ='main.c', line = 15, locations = 1, resolved = 1

  2.1: where = test`main + 15 at main.c:15, address = 0x0000000100000f3f, resolved, hit count = 1 

(lldb) 

如果您需要使用命令行实用程序的日志,请告诉我, 谢谢~

最佳答案

参见 http://lldb.llvm.org/troubleshooting.html 中的“文件和行断点未命中” - 这似乎是在谈论您的构建场景,而我刚刚遇到了这个问题。为了解决这个问题,我不仅要将它放在 $HOME/.lldbinit 中:

设置始终设置 target.inline-breakpoint-strategy

我还必须进行 clobber (distclean) 构建并重新启动 Xcode。

关于带 lldb 断点的 Xcode 4.6/5 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19702714/

相关文章:

java - java/eclipse中的数据断点

c++ - Visual Studio 2015 更新 1 C++ "The breakpoint failed to bind"

ios - 在 Xcode 机器人上运行单元测试后生成 .gcda 文件

ios - 为什么我的 UIViewController 子类有时会自动导入 Cocoa,有时会自动导入 UIKit

xcode - 是否可以在 Xcode 5 中构建 iphoneos6.1 项目,同时保留 Xcode 4.6.3 Storyboard中布局的 View 行为?

netbeans - 无法在 netbeans 上提交断点 LineBreakpoint wicket

gdb - 如何从.gdbinit强制断点?

objective-c - #include <new> 未找到,但仅当从特定 header 引用该文件时?

ios - 如何为 Xamarin.iOS 创建绑定(bind)?

java - Eclipse:可以在单独的列中显示断点吗?