我在ARM处理器上调试多线程应用程序, 运行Linux。
当我使用gdb附加到我的应用程序时,我发现了一些 线程正在等待进入由a保护的关键部分 互斥:他们称之为pthread_mutex_lock()&在...停滞不前 核心在futex_lock_pi.isra.9
gdb的回溯显示这些很好: -
(gdb) bt
#0 0x4f4b4378 in ?? ()
#1 0x0184c2cc in pt::mutex::pt_enter (this=0x24bc3a8 <linx::LCMNode::m_Lock>) at pthread.cxx:414
#2 0x0184c8cc in pt::mutex::enter (this=0x24bc3a8 <linx::LCMNode::m_Lock>) at pthread.cxx:717
#3 0x0184a800 in pt::rwlock::rdlock (this=0x24bc3a8 <linx::LCMNode::m_Lock>) at prwlock.cxx:128
#4 0x01749544 in linx::LCMNode::ReadLock (this=0x2fddd1a0) at src/MNode.cpp:411
#5 0x017796ac in linx::LCMVar<bool>::GetValue (this=0x2fddd1a0, Transaction=...) at ../../src/ManagedObjects/include/MVar_TemplateDefinition.hpp:324
哪个是花花公子。
但是其他线程以不同的方式使用pthreads-lib:例如有些人称之为pthread_cond_wait()&amp;伤口停滞不前 内核在futex_wait_queue_me
对于这些,我无法从gdb获得回溯: -
(gdb) thread 45
[Switching to thread 45 (Thread 909)]
#0 0x4f4bb930 in ?? ()
(gdb) bt
#0 0x4f4bb930 in ?? ()
#1 0x4f4bb914 in ?? ()
#2 0x4f4bb914 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
有什么我可以做的,有人可以说,要争吵 为这些线程回溯gdb? - TIA,s。