The API lock was getting dropped too soon in GetVariables. GetValueObjectForFrameVariable could run the target (to get dynamic values) and that requires the target lock.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154711 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBFrame.cpp b/source/API/SBFrame.cpp
index 42c522d..b694418 100644
--- a/source/API/SBFrame.cpp
+++ b/source/API/SBFrame.cpp
@@ -883,11 +883,8 @@
size_t i;
VariableList *variable_list = NULL;
- // Scope for locker
- {
- Mutex::Locker api_locker (target->GetAPIMutex());
- variable_list = frame->GetVariableList(true);
- }
+ Mutex::Locker api_locker (target->GetAPIMutex());
+ variable_list = frame->GetVariableList(true);
if (variable_list)
{
const size_t num_variables = variable_list->GetSize();