Fixed rdar://problem/8767055 test suite failure TestStaticVariables.py (ToT r121745).
Populate the variable list from the stack frame, first.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121773 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBFrame.cpp b/source/API/SBFrame.cpp
index 3a7a4e3..7fdbfba 100644
--- a/source/API/SBFrame.cpp
+++ b/source/API/SBFrame.cpp
@@ -360,7 +360,7 @@
 
         if (var_scope != eValueTypeInvalid)
         {
-            lldb_private::VariableList variable_list;
+            lldb_private::VariableList *variable_list = m_opaque_sp->GetVariableList(true);
 
             SymbolContext sc (m_opaque_sp->GetSymbolContext (eSymbolContextBlock));
 
@@ -371,13 +371,13 @@
             if (sc.block && sc.block->AppendVariables (can_create, 
                                                        get_parent_variables,
                                                        stop_if_block_is_inlined_function,
-                                                       &variable_list))
+                                                       variable_list))
             {
                 lldb_private::ConstString const_var_name(var_name);
-                const uint32_t num_variables = variable_list.GetSize();
+                const uint32_t num_variables = variable_list->GetSize();
                 for (uint32_t i = 0; i < num_variables; ++i)
                 {
-                    lldb::VariableSP curr_var_sp (variable_list.GetVariableAtIndex(i));
+                    lldb::VariableSP curr_var_sp (variable_list->GetVariableAtIndex(i));
                     if (curr_var_sp && curr_var_sp->GetScope() == var_scope &&
                         curr_var_sp->GetName() == const_var_name)
                     {