goy*_*kit 8 debugging xcode lldb swift
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
Run Code Online (Sandbox Code Playgroud)
好像它无法找到类型.
(lldb) image lookup -t CustomCollectionViewCell
(lldb)
Run Code Online (Sandbox Code Playgroud)
我可以看到包含该类型的图像已加载.
(lldb) image list
...
/path/to/CustomFramework
Run Code Online (Sandbox Code Playgroud)
此外,该文件还包含符号.
$strings /path/to/CustomFramework | grep CustomCollectionViewCell
_TtC17CustomFramework24CustomCollectionViewCell
Run Code Online (Sandbox Code Playgroud)
我似乎有调试符号,因为:
(lldb) script lldb.target.module['/data/Containers/Bundle/Application/23A3AF01-4F87-439F-B2F7-36E7BD09390B/MyApp.app/Frameworks/CustomFramework.framework/CustomFramework'].GetNumCompileUnits()
74
Run Code Online (Sandbox Code Playgroud)
另外,编译的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 ) )
Run Code Online (Sandbox Code Playgroud)
我仍然无法查找类型.
我已经检查过在复制阶段没有发生条带化,并且发布是调试的.
有任何想法吗?我很感激任何帮助.
| 归档时间: |
|
| 查看次数: |
806 次 |
| 最近记录: |