我已经用条件设置了一个断点...
[event.name isEqualToString:@"Some Name"]这可以很好地工作。
但是,当我尝试使用条件添加另一个断点时...
[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我是不是需要躲开收容所之类的标志?
发布于 2013-06-22 15:02:38
表达式解析器和包含非ASCII码字符的NSString文字存在错误。
(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字符串文字,因此可以解决此问题,例如
(lldb) po [NSString stringWithUTF8String:"ü"]
$11 = 0x000000010010b040 ü发布于 2013-06-19 22:07:54
我不知道为什么断点仍然有如此有限的编译器支持,但不管怎样,为了解决你的问题,你调用的每个方法的返回类型应该是这样的:
(BOOL)[(NSString *)[part name] isEqualToString:@"some string"]这样,如果字符串不包含‘’t‘符号或任何其他非ASCII字符,您的代码应该会暂停。由于LLDB编译器似乎存在非ASCII字符的问题,您可能希望首先使用该编码转换字符串。同时,如果可能,我正在寻找一种避免这种情况的方法,…
https://stackoverflow.com/questions/17192505
复制相似问题