summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 41942829ca5..dbe0db5de6b 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -1145,6 +1145,7 @@ Process::HandleProcessStateChangedEvent (const EventSP &event_sp,
// 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 (const EventSP &event_sp,
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:
OpenPOWER on IntegriCloud