断点条件错误 [英] Error in breakpoint condition

查看:682
本文介绍了断点条件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置了条件的断点...

I've set a breakpoint with the condition...

[event.name isEqualToString:@"Some Name"]

一切正常。

但是,当我尝试添加具有条件的另一个断点时...

However, when I try to add another breakpoint with the condition...

[part.name isEqualToString:@"Some Value With A Pound Sign £"]

我收到错误...

Internal error [IRForTarget]: An Objective-C constant string's string initializer is not an array
Stopped due to an error evaluating condition of breakpoint

我是否需要逃脱英镑符号?

Do I need to escape the pound sign or something?

推荐答案

表达式解析器和包含非ASCII字符的NSString文字有一个错误。

There's a bug with the expression parser and an NSString literal containing non-ASCII characters.

(lldb) po @"u"
$9 = 0x00007fff7debe5e0 u
(lldb) po @"ü"
Internal error [IRForTarget]: An Objective-C constant string's string initializer is not an array
error: warning: expression result unused
error: The expression could not be prepared to run in the target

http://bugreport.apple.com/关于这个问题。

非ASCII C字符串文字处理正确,因此可以解决此问题,例如

Non-ASCII C string literals are handled correctly so it is possible to work around this, e.g.

(lldb) po [NSString stringWithUTF8String:"ü"]
$11 = 0x000000010010b040 ü

这篇关于断点条件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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