aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectFrame.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2015-02-11 02:35:39 +0000
committerEnrico Granata <egranata@apple.com>2015-02-11 02:35:39 +0000
commit560558eb7c1deee76a1adb941e001e074dba460d (patch)
tree361a34a9afb6b9516874d4537736cae2b917806a /lldb/source/Commands/CommandObjectFrame.cpp
parent7ad134a7467c97ce9d8ef46fea90267a03c30b30 (diff)
downloadllvm-560558eb7c1deee76a1adb941e001e074dba460d.zip
llvm-560558eb7c1deee76a1adb941e001e074dba460d.tar.gz
llvm-560558eb7c1deee76a1adb941e001e074dba460d.tar.bz2
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
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 4458a69..cd38216 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -522,30 +522,31 @@ protected:
{
var_sp = variable_list->GetVariableAtIndex(i);
bool dump_variable = true;
+ std::string scope_string;
switch (var_sp->GetScope())
{
case eValueTypeVariableGlobal:
dump_variable = m_option_variable.show_globals;
if (dump_variable && m_option_variable.show_scope)
- s.PutCString("GLOBAL: ");
+ scope_string = "GLOBAL: ";
break;
case eValueTypeVariableStatic:
dump_variable = m_option_variable.show_globals;
if (dump_variable && m_option_variable.show_scope)
- s.PutCString("STATIC: ");
+ scope_string = "STATIC: ";
break;
case eValueTypeVariableArgument:
dump_variable = m_option_variable.show_args;
if (dump_variable && m_option_variable.show_scope)
- s.PutCString(" ARG: ");
+ scope_string = " ARG: ";
break;
case eValueTypeVariableLocal:
dump_variable = m_option_variable.show_locals;
if (dump_variable && m_option_variable.show_scope)
- s.PutCString(" LOCAL: ");
+ scope_string = " LOCAL: ";
break;
default:
@@ -568,6 +569,13 @@ protected:
// that are not in scope to avoid extra unneeded output
if (valobj_sp->IsInScope ())
{
+ if (false == valobj_sp->GetTargetSP()->GetDisplayRuntimeSupportValues() &&
+ true == valobj_sp->IsRuntimeSupportValue())
+ continue;
+
+ if (!scope_string.empty())
+ s.PutCString(scope_string.c_str());
+
if (m_option_variable.show_decl && var_sp->GetDeclaration ().GetFile())
{
var_sp->GetDeclaration ().DumpStopContext (&s, false);