您的位置:首页 > 其它

【工作总结】LLDB调试技巧 - 篇一

2016-02-29 18:59 501 查看
备忘命令 :

命令“l”可以查看程序当前运行的位置

(lldb) l
341
342
343
344
345
346     }
347
348
349     - (void)rightBarButtonAction {
350


命令“bt”也能查看程序运行的调用栈

(lldb) bt
* thread #1: tid = 0x527b4, 0x000000010db858d7 iSKG`__47-[SKGOAInformationViewController loadFileData:]_block_invoke(.block_descriptor=0x00007f83dc96d5d0, responseObject=2 key/value pairs) + 663 at SKGOAInformationViewController.m:331, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
* frame #0: 0x000000010db858d7 iSKG`__47-[SKGOAInformationViewController loadFileData:]_block_invoke(.block_descriptor=0x00007f83dc96d5d0, responseObject=2 key/value pairs) + 663 at SKGOAInformationViewController.m:331
frame #1: 0x000000010d948b00 iSKG`__54+[AFNetworkingTool GETwithURL:params:success:failure:]_block_invoke(.block_descriptor=0x00007f83dc96d5a0, task=0x00007f83da4d3370, responseObject=2 key/value pairs) + 112 at AFNetworkingTool.m:24
frame #2: 0x000000010d9feb21 iSKG`__55-[AFHTTPSessionManager GET:parameters:success:failure:]_block_invoke(.block_descriptor=0x00007f83dc96d500, response=0x00007f83da5c80c0, responseObject=2 key/value pairs, error=0x0000000000000000) + 241 at AFHTTPSessionManager.m:121
frame #3: 0x000000010d8a39cb iSKG`__72-[AFURLSessionManagerTaskDelegate URLSession:task:didCompleteWithError:]_block_invoke_272(.block_descriptor=<unavailable>) + 203 at AFURLSessionManager.m:194
frame #4: 0x0000000112d3fe5d libdispatch.dylib`_dispatch_call_block_and_release + 12
frame #5: 0x0000000112d6049b libdispatch.dylib`_dispatch_client_callout + 8
frame #6: 0x0000000112d482af libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1738
frame #7: 0x000000011209a2e9 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
frame #8: 0x000000011205b8a9 CoreFoundation`__CFRunLoopRun + 2073
frame #9: 0x000000011205ae08 CoreFoundation`CFRunLoopRunSpecific + 488
frame #10: 0x00000001146fdad2 GraphicsServices`GSEventRunModal + 161
frame #11: 0x000000010fe0330d UIKit`UIApplicationMain + 171
frame #12: 0x000000010db8a14f iSKG`main(argc=1, argv=0x00007fff5237e648) + 111 at main.m:17
frame #13: 0x0000000112d9592d libdyld.dylib`start + 1
frame #14: 0x0000000112d9592d libdyld.dylib`start + 1


[b]检查帧参数和本地变量的最简便的方式“[b]frame variable”[/b][/b]

(lldb) frame variable
(__block_literal_1 *) .block_descriptor = 0x00007f83dc96d5d0
(__NSCFDictionary *) responseObject = 0x00007f83dc96e390 2 key/value pairs
(SKGOAInformationViewController *) self = 0x00007f83da4cdce0
(__NSCFArray *) shtLists = 0x00007f83dc970910 @"1 object"
(__NSCFDictionary *) aShtDic = 0x00007f83dc9713e0 3 key/value pairs
(SKGOAInformationFileModel *) file = nil
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: