转载自: [NSThread callStackSymbols] 堆栈信息,获取方法执行的类和顺序
(lldb) po csss
<_NSCallStackArray 0x1c0643ff0>(
iOSGeneral 0x00000001011e3514 +[GXJAFNetworking POST:parameters:success:failure:showDefaultErrMsg:] + 1708,
iOSGeneral 0x00000001011e2e10 +[GXJAFNetworking POST:parameters:success:failure:] + 188,
iOSGeneral 0x000000010121880c -[MyViewController loadData] + 236,
iOSGeneral 0x0000000101218714 -[MyViewController viewWillAppear:] + 308,
UIKit 0x000000018d4726d8 <redacted> + 616,
UIKit 0x000000018d472448 <redacted> + 140,
UIKit 0x000000018d4a05b8 <redacted> + 784,
UIKit 0x000000018d49fc90 <redacted> + 1164,
UIKit 0x000000018d49f720 <redacted> + 164,
UIKit 0x000000018d493424 <redacted> + 188,
UIKit 0x000000018d3eb770 <redacted> + 1420,
QuartzCore 0x000000018798d25c <redacted> + 184,
QuartzCore 0x00000001879913ec <redacted> + 324,
QuartzCore 0x00000001878fdaa0 <redacted> + 320,
QuartzCore 0x00000001879255d0 <redacted> + 580,
QuartzCore 0x0000000187926450 <redacted> + 92,
CoreFoundation 0x00000001837be910 <redacted> + 32,
CoreFoundation 0x00000001837bc238 <redacted> + 412,
CoreFoundation 0x00000001837bc884 <redacted> + 1436,
CoreFoundation 0x00000001836dcda8 CFRunLoopRunSpecific + 552,
GraphicsServices 0x00000001856bf020 GSEventRunModal + 100,
UIKit 0x000000018d6bd78c UIApplicationMain + 236,
iOSGeneral 0x0000000100f37634 main + 124,
libdyld.dylib 0x000000018316dfc0 <redacted> + 4
)
(lldb)
NSArray *csss = [NSThread callStackSymbols];
然后断点po了一下这个csss,可以看到是在+[GXJAFNetworking POST:parameters:success:failure:showDefaultErrMsg:]
这个方法中打印的,有四层方法调用,最初是在-[MyViewController viewWillAppear:]
调用
网友评论