本文介绍了LLDB为什么不能评估此表达式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
LLDB不能处理这些语句中的任何一个...为什么它不能拿出NSString结果并将其打印出来
Neither one of these statements can be processed by LLDB... why is it unable to come up with the NSString result and print it out
expr -o -- [NSString stringWithFormat:@"%@", @"Wow this doesnt work??"]
po [NSString stringWithFormat:@"%@", @"Wow this doesnt work??"]
推荐答案
lldb中的 expression 命令似乎通常无法使用可变参数列表.即使使用简单的C函数,它也会失败:
It seems that the expression command in lldb can generally not evaluate functions withvariable argument lists. It fails even with a simple C function:
int foo(char *msg, ...)
{
return 17;
}
(lldb) expr foo("bar")
(int) $2 = 17
(lldb) expr foo("bar", 2)
error: no matching function for call to 'foo'
note: candidate function not viable: requires 1 argument, but 2 were provided
error: 1 errors parsing expression
所以这看起来像是lldb中的错误(或没有功能).
So this looks like a bug (or non-feature) in lldb.
这篇关于LLDB为什么不能评估此表达式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!