summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2015-07-08 00:06:30 +0000
committerJim Ingham <jingham@apple.com>2015-07-08 00:06:30 +0000
commitce400d9ab4e39920e871e5836c32ed45ebed5ded (patch)
tree98badde4db1fca9c707cc8f2851cc2baf4d6a82a /lldb/source/Target/Process.cpp
parent45788152898fa77668c02741426d1f02bc9f4db5 (diff)
downloadbcm5719-llvm-ce400d9ab4e39920e871e5836c32ed45ebed5ded.tar.gz
bcm5719-llvm-ce400d9ab4e39920e871e5836c32ed45ebed5ded.zip
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> llvm-svn: 241650
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