summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadList.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2013-04-16 22:53:24 +0000
committerJim Ingham <jingham@apple.com>2013-04-16 22:53:24 +0000
commit7bc3465f6a9bba0e37b892b8f367536aa7edbb92 (patch)
tree544c363c88076cb6f701fa564355df33c43a5421 /lldb/source/Target/ThreadList.cpp
parentd44c8f7d20c1e8d307c77ae859bfad9d849741ed (diff)
downloadbcm5719-llvm-7bc3465f6a9bba0e37b892b8f367536aa7edbb92.tar.gz
bcm5719-llvm-7bc3465f6a9bba0e37b892b8f367536aa7edbb92.zip
Make sure all the threads get a chance to compute their StopInfo's before we start running
ShouldStop on the threads, which might destroy information needed to correctly compute another thread's StopInfo. <rdar://problem/13664026> llvm-svn: 179641
Diffstat (limited to 'lldb/source/Target/ThreadList.cpp')
-rw-r--r--lldb/source/Target/ThreadList.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/lldb/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp
index 10c8e79c732..620a7ccbd4a 100644
--- a/lldb/source/Target/ThreadList.cpp
+++ b/lldb/source/Target/ThreadList.cpp
@@ -232,7 +232,18 @@ ThreadList::ShouldStop (Event *event_ptr)
}
bool did_anybody_stop_for_a_reason = false;
- bool should_stop = false;
+ bool should_stop = false;
+
+ // Now we run through all the threads and get their stop info's. We want to make sure to do this first before
+ // we start running the ShouldStop, because one thread's ShouldStop could destroy information (like deleting a
+ // thread specific breakpoint another thread had stopped at) which could lead us to compute the StopInfo incorrectly.
+ // We don't need to use it here, we just want to make sure it gets computed.
+
+ for (pos = threads_copy.begin(); pos != end; ++pos)
+ {
+ ThreadSP thread_sp(*pos);
+ thread_sp->GetStopInfo();
+ }
for (pos = threads_copy.begin(); pos != end; ++pos)
{
OpenPOWER on IntegriCloud