Rob*_*bie 17 cocoa-touch nslog
[]下面的日志消息之间有什么东西?我在我的iPhone应用程序中得到了这个,我不知道消息来自哪里.我的第一个猜测是行号,但它会在哪个文件中?
2010-10-19 08:56:12.006 Encore[376:6907]
Run Code Online (Sandbox Code Playgroud)
Jer*_*man 27
第一个数字是进程ID,第二个是日志记录线程的Mach端口.桌面示例:
2010-10-19 17:37:13.189 nc_init[28617:a0f] nc <CFNotificationCenter 0x10010d170 [0x7fff70d96f20]> - default <CFNotificationCenter 0x10010d2a0 [0x7fff70d96f20]>
(gdb) i thread
Thread 1 has current state "WAITING"
Mach port #0xa0f (gdb port #0x4203)
frame 0: main () at nc_init.m:10
pthread ID: 0x7fff70ebfc20
system-wide unique thread id: 0x167b49
dispatch queue name: "com.apple.main-thread"
dispatch queue flags: 0x0
total user time: 13232000
total system time: 16099000
scaled cpu usage percentage: 0
scheduling policy in effect: 0x1
run state: 0x3 (WAITING)
flags: 0x0
number of seconds that thread has slept: 0
current priority: 31
max priority: 63
suspend count: 0.
(gdb) p/x (int)mach_thread_self()
$1 = 0xa0f
Run Code Online (Sandbox Code Playgroud)
注意如何将0xa0f报告为线程的Mach端口.
| 归档时间: |
|
| 查看次数: |
2983 次 |
| 最近记录: |