Introduce the notion of "runtime support values"

A runtime support value is a ValueObject whose only purpose is to support some language runtime's operation, but it does not directly provide any user-visible benefit
As such, unless the user is working on the runtime support, it is mostly safe for them not to see such a value when debugging

It is a language runtime's job to check whether a ValueObject is a support value, and that - in conjunction with a target setting - is used by frame variable and target variable
SBFrame::GetVariables gets a new overload with yet another flag to dictate whether to return those support values to the caller - that which defaults to the setting's value

rdar://problem/15539930

llvm-svn: 228791
This commit is contained in:
Enrico Granata
2015-02-11 02:35:39 +00:00
parent 7ad134a746
commit 560558eb7c
13 changed files with 127 additions and 5 deletions

View File

@@ -1080,11 +1080,30 @@ SBFrame::GetVariables (bool arguments,
return value_list;
}
lldb::SBValueList
SBFrame::GetVariables (bool arguments,
bool locals,
bool statics,
bool in_scope_only,
lldb::DynamicValueType use_dynamic)
{
ExecutionContext exe_ctx(m_opaque_sp.get());
Target *target = exe_ctx.GetTargetPtr();
bool include_runtime_support_values = target ? target->GetDisplayRuntimeSupportValues() : false;
return GetVariables(arguments,
locals,
statics,
in_scope_only,
include_runtime_support_values,
use_dynamic);
}
SBValueList
SBFrame::GetVariables (bool arguments,
bool locals,
bool statics,
bool in_scope_only,
bool include_runtime_support_values,
lldb::DynamicValueType use_dynamic)
{
Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
@@ -1147,6 +1166,12 @@ SBFrame::GetVariables (bool arguments,
continue;
ValueObjectSP valobj_sp(frame->GetValueObjectForFrameVariable (variable_sp, eNoDynamicValues));
if (false == include_runtime_support_values &&
valobj_sp &&
true == valobj_sp->IsRuntimeSupportValue())
continue;
SBValue value_sb;
value_sb.SetSP(valobj_sp,use_dynamic);
value_list.Append(value_sb);