2014-09-10 63 views
0

调试时一个线程执行是否有可能对我来说,跟踪线程与gdb.I做以下跟踪什么功能/代码使用gdb

$gdb 

$gdb attach pid 

$info threads 

    27 Thread 0x7f0d3a0fe700 (LWP 3418) "BgHangManager" 0x00007f0d4fd9b0af in [email protected]@GLIBC_2.3.2() from /lib64/libpthread.so.0 
    26 Thread 0x7f0d389ff700 (LWP 3419) "gdbus" 0x00007f0d4f098b3d in poll() from /lib64/libc.so.6 
    25 Thread 0x7f0d381fe700 (LWP 3420) "gmain" 0x00007f0d4f098b3d in poll() from /lib64/libc.so.6 
    24 Thread 0x7f0d36fff700 (LWP 3422) "Timer" 0x00007f0d4fd9b458 in [email protected]@GLIBC_2.3.2() from /lib64/libpthread.so.0 
    23 Thread 0x7f0d3ee52700 (LWP 3423) "Cache2 I/O" 0x00007f0d4fd9b0af in [email protected]@GLIBC_2.3.2() from /lib64/libpthread.so.0 

$ BT

调试时,执行什么功能/代码
Only gives me the stack-trace of the currently executing code while I would like to 
for know what code is exuting in another thread for instance thread 26. 
+1

是否围绕它的工作'线程应用26个bt'你想要做什么? – 2014-09-10 11:21:26

回答

0

通过切换到“通缉令”线程和打印堆栈跟踪