[Lldb-commits] [lldb] r241650 - Don't select a thread that stopped for a signal that was
Jim Ingham
jingham at apple.com
Tue Jul 7 17:06:31 PDT 2015
Author: jingham
Date: Tue Jul 7 19:06:30 2015
New Revision: 241650
URL: http://llvm.org/viewvc/llvm-project?rev=241650&view=rev
Log:
Don't select a thread that stopped for a signal that was
not set to stop - there must be some other thread that
stopped for a more interesting reason.
<rdar://problem/19943567>
Modified:
lldb/trunk/source/Target/Process.cpp
Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=241650&r1=241649&r2=241650&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Tue Jul 7 19:06:30 2015
@@ -1145,6 +1145,7 @@ Process::HandleProcessStateChangedEvent
// Prefer a thread that has just completed its plan over another thread as current thread.
ThreadSP plan_thread;
ThreadSP other_thread;
+
const size_t num_threads = thread_list.GetSize();
size_t i;
for (i = 0; i < num_threads; ++i)
@@ -1157,10 +1158,22 @@ Process::HandleProcessStateChangedEvent
case eStopReasonNone:
break;
+ case eStopReasonSignal:
+ {
+ // Don't select a signal thread if we weren't going to stop at that
+ // signal. We have to have had another reason for stopping here, and
+ // the user doesn't want to see this thread.
+ uint64_t signo = thread->GetStopInfo()->GetValue();
+ if (process_sp->GetUnixSignals().GetShouldStop(signo))
+ {
+ if (!other_thread)
+ other_thread = thread;
+ }
+ break;
+ }
case eStopReasonTrace:
case eStopReasonBreakpoint:
case eStopReasonWatchpoint:
- case eStopReasonSignal:
case eStopReasonException:
case eStopReasonExec:
case eStopReasonThreadExiting:
More information about the lldb-commits
mailing list