lldb swift不打印调试变量

时间:2015-08-28 05:16:44

标签: xcode swift debugging lldb

Xcode 6.4中的Swift LLDB不打印框架内任何局部变量的值。 这是我到目前为止所发现的。

(lldb) frame variable --no-args
cell = <Unable to determine byte size.>

(lldb) register read pc // get the current program counter value
  rip = 0x00000001072177cf  

(lldb) image lookup -va  0x00000001072177cf
Variable: id = {0x000a93a7}, name = "cell", type= "<NULL>", location = DW_OP_fbreg(-64), decl = CustomCollectionViewCell.swift:321

似乎无法找到类型。

(lldb) image lookup -t CustomCollectionViewCell
(lldb)

我可以看到包含该类型的图像已加载。

(lldb) image list
...
/path/to/CustomFramework

此外,该文件还包含符号。

$strings /path/to/CustomFramework | grep CustomCollectionViewCell
_TtC17CustomFramework24CustomCollectionViewCell

我似乎有以下调试符号:

(lldb) script lldb.target.module['/data/Containers/Bundle/Application/23A3AF01-4F87-439F-B2F7-36E7BD09390B/MyApp.app/Frameworks/CustomFramework.framework/CustomFramework'].GetNumCompileUnits()
74

此外,已编译的swift文件的目标文件具有变量和类型。

$ dwarfdump /path/to/FileUsingCell.o
0x00003140:                                 TAG_variable [44]
                                             AT_location( fbreg -8 )
                                             AT_name( "cell" )
                                             AT_decl_file( "CustomCollectionViewCell.swift" )
                                             AT_decl_line( 324 )
                                             AT_type( {0x0000133d} ( CustomCollectionViewCell ) )

我仍然无法查找该类型。

我已经检查过在复制阶段没有发生条带化,并且发布是调试的。

有什么想法吗?我很感激任何帮助。

0 个答案:

没有答案
相关问题