diff options
author | Jim Ingham <jingham@apple.com> | 2015-11-06 22:45:57 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2015-11-06 22:45:57 +0000 |
commit | 569aaf9e1a22df61f15ac7840fc8800f8c948de0 (patch) | |
tree | 859cd739de22586b97a2af9b349a938eeef005e9 /lldb/source/Target/Thread.cpp | |
parent | 3b0dfe5a89efa628f280adef658d4b7497401cdf (diff) | |
download | bcm5719-llvm-569aaf9e1a22df61f15ac7840fc8800f8c948de0.tar.gz bcm5719-llvm-569aaf9e1a22df61f15ac7840fc8800f8c948de0.zip |
Another optimization to keep down gdb-remote traffic. If we have suspended a thread while
running, don't request the thread status when deciding why we stopped.
llvm-svn: 252355
Diffstat (limited to 'lldb/source/Target/Thread.cpp')
-rw-r--r-- | lldb/source/Target/Thread.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index a1a91a58c28..629943644db 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -726,14 +726,17 @@ Thread::ShouldResume (StateType resume_state) m_discarded_plan_stack.clear(); m_override_should_notify = eLazyBoolCalculate; - m_temporary_resume_state = resume_state; + StateType prev_resume_state = GetTemporaryResumeState(); + + SetTemporaryResumeState(resume_state); lldb::ThreadSP backing_thread_sp (GetBackingThread ()); if (backing_thread_sp) - backing_thread_sp->m_temporary_resume_state = resume_state; + backing_thread_sp->SetTemporaryResumeState(resume_state); - // Make sure m_stop_info_sp is valid - GetPrivateStopInfo(); + // Make sure m_stop_info_sp is valid. Don't do this for threads we suspended in the previous run. + if (prev_resume_state != eStateSuspended) + GetPrivateStopInfo(); // This is a little dubious, but we are trying to limit how often we actually fetch stop info from // the target, 'cause that slows down single stepping. So assume that if we got to the point where |