【发布时间】:2013-02-24 14:16:24
【问题描述】:
我有一个 c++ 应用程序,并试图在 Xcode 下使用 LLDB 对其进行调试。我想在成员函数内停止,但仅当 this 指针与特定实例匹配时。
我尝试使用以下表达式在断点中设置条件:
this == 0x12345
但我反复收到以下错误:
error: invalid use of 'this' outside of a nonstatic member function
error: 1 errors parsing expression
在该断点处暂停时,我也无法在调试器控制台中输入上述表达式。
我做错了什么?
【问题讨论】:
-
您是否使用任何优化标志编译您的应用程序?或者,如果您使用 Cmake,您的构建类型是“Release with Debug Info”吗?
-
@Dan 这是一个调试版本,所有优化标志都关闭了,我们正在生成调试符号。
标签: xcode debugging breakpoints lldb conditional-breakpoint