summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2013-06-22 00:27:45 +0000
committerJim Ingham <jingham@apple.com>2013-06-22 00:27:45 +0000
commitdee1bc98f9d9dcbb7ea60fc6af699ddda315955c (patch)
treef271491f2dcf0a6bad368574495d009d3828783a /lldb/source/Plugins/Process
parent27982c70fc349da9e63d44367dd63e66c464bcc3 (diff)
downloadbcm5719-llvm-dee1bc98f9d9dcbb7ea60fc6af699ddda315955c.tar.gz
bcm5719-llvm-dee1bc98f9d9dcbb7ea60fc6af699ddda315955c.zip
Add some useful logging for tracking thread matching problems.
llvm-svn: 184619
Diffstat (limited to 'lldb/source/Plugins/Process')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 5880e00fa2c..4a2899d8f28 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1314,7 +1314,24 @@ ProcessGDBRemote::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new
tid_t tid = m_thread_ids[i];
ThreadSP thread_sp (old_thread_list_copy.RemoveThreadByProtocolID(tid, false));
if (!thread_sp)
+ {
thread_sp.reset (new ThreadGDBRemote (*this, tid));
+ if (log && log->GetMask().Test(GDBR_LOG_VERBOSE))
+ log->Printf(
+ "ProcessGDBRemote::%s Making new thread: %p for thread ID: 0x%" PRIx64 ".\n",
+ __FUNCTION__,
+ thread_sp.get(),
+ thread_sp->GetID());
+ }
+ else
+ {
+ if (log && log->GetMask().Test(GDBR_LOG_VERBOSE))
+ log->Printf(
+ "ProcessGDBRemote::%s Found old thread: %p for thread ID: 0x%" PRIx64 ".\n",
+ __FUNCTION__,
+ thread_sp.get(),
+ thread_sp->GetID());
+ }
new_thread_list.AddThread(thread_sp);
}
}
@@ -1403,6 +1420,13 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet)
{
// Create the thread if we need to
thread_sp.reset (new ThreadGDBRemote (*this, tid));
+ Log *log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_THREAD));
+ if (log && log->GetMask().Test(GDBR_LOG_VERBOSE))
+ log->Printf ("ProcessGDBRemote::%s Adding new thread: %p for thread ID: 0x%" PRIx64 ".\n",
+ __FUNCTION__,
+ thread_sp.get(),
+ thread_sp->GetID());
+
m_thread_list_real.AddThread(thread_sp);
}
gdb_thread = static_cast<ThreadGDBRemote *> (thread_sp.get());
OpenPOWER on IntegriCloud