Restore the ability of SBFrame::FindValue() to look for file global variables
This should clean up the new test failures caused by r201614 llvm-svn: 201710
This commit is contained in:
@@ -845,6 +845,8 @@ SBFrame::FindValue (const char *name, ValueType value_type, lldb::DynamicValueTy
|
||||
frame = exe_ctx.GetFramePtr();
|
||||
if (frame)
|
||||
{
|
||||
VariableList variable_list;
|
||||
|
||||
switch (value_type)
|
||||
{
|
||||
case eValueTypeVariableGlobal: // global variable
|
||||
@@ -852,8 +854,7 @@ SBFrame::FindValue (const char *name, ValueType value_type, lldb::DynamicValueTy
|
||||
case eValueTypeVariableArgument: // function argument variables
|
||||
case eValueTypeVariableLocal: // function local variables
|
||||
{
|
||||
VariableList variable_list;
|
||||
|
||||
|
||||
SymbolContext sc (frame->GetSymbolContext (eSymbolContextBlock));
|
||||
|
||||
const bool can_create = true;
|
||||
@@ -865,6 +866,13 @@ SBFrame::FindValue (const char *name, ValueType value_type, lldb::DynamicValueTy
|
||||
stop_if_block_is_inlined_function,
|
||||
&variable_list))
|
||||
{
|
||||
if (value_type == eValueTypeVariableGlobal)
|
||||
{
|
||||
const bool get_file_globals = true;
|
||||
VariableList* frame_vars = frame->GetVariableList(get_file_globals);
|
||||
if (frame_vars)
|
||||
frame_vars->AppendVariablesIfUnique(variable_list);
|
||||
}
|
||||
ConstString const_name(name);
|
||||
VariableSP variable_sp(variable_list.FindVariable(const_name,value_type));
|
||||
if (variable_sp)
|
||||
|
||||
Reference in New Issue
Block a user