summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/MemoryHistory
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-03-12 02:45:34 +0000
committerJim Ingham <jingham@apple.com>2016-03-12 02:45:34 +0000
commit0a6b1eca11bb44a377296999ced5feedf927da5c (patch)
tree02a3fb654ad9994c706a04771a37697529c12e9d /lldb/source/Plugins/MemoryHistory
parentd8c9c8dc3d06220f2130c5bae563992decbd5ede (diff)
This change introduces a "ExpressionExecutionThread" to the ThreadList.
Turns out that most of the code that runs expressions (e.g. the ObjC runtime grubber) on behalf of the expression parser was using the currently selected thread. But sometimes, e.g. when we are evaluating breakpoint conditions/commands, we don't select the thread we're running on, we instead set the context for the interpreter, and explicitly pass that to other callers. That wasn't getting communicated to these utility expressions, so they would run on some other thread instead, and that could cause a variety of subtle and hard to reproduce problems. I also went through the commands and cleaned up the use of GetSelectedThread. All those uses should have been trying the thread in the m_exe_ctx belonging to the command object first. It would actually have been pretty hard to get misbehavior in these cases, but for correctness sake it is good to make this usage consistent. <rdar://problem/24978569>
Diffstat (limited to 'lldb/source/Plugins/MemoryHistory')
-rw-r--r--lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp b/lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
index c5751987162..21e4680e468 100644
--- a/lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
+++ b/lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
@@ -148,7 +148,7 @@ MemoryHistoryASan::GetHistoryThreads(lldb::addr_t address)
ProcessSP process_sp = m_process_wp.lock();
if (process_sp)
{
- ThreadSP thread_sp = process_sp->GetThreadList().GetSelectedThread();
+ ThreadSP thread_sp = process_sp->GetThreadList().GetExpressionExecutionThread();
if (thread_sp)
{