diff options
author | Enrico Granata <egranata@apple.com> | 2015-02-12 23:09:17 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2015-02-12 23:09:17 +0000 |
commit | e0d951db44c7f86bcb643165ee0f419a6d2a119d (patch) | |
tree | ab07c0cf5d04124256d6e1e7733f4fe9e281f733 /lldb/source/API/SBFrame.cpp | |
parent | 64a3f3084e2834aa91ea4730d1b6ff9ff0786660 (diff) | |
download | bcm5719-llvm-e0d951db44c7f86bcb643165ee0f419a6d2a119d.tar.gz bcm5719-llvm-e0d951db44c7f86bcb643165ee0f419a6d2a119d.zip |
I had recently added a new SBFrame::GetVariables() overload with yet another bool argument
We talked about it internally - and came to the conclusion that it's time to have an options class
This commit adds an SBVariablesOptions class and goes through all the required dance
llvm-svn: 228975
Diffstat (limited to 'lldb/source/API/SBFrame.cpp')
-rw-r--r-- | lldb/source/API/SBFrame.cpp | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp index da1d32f2e80..d51f59c2307 100644 --- a/lldb/source/API/SBFrame.cpp +++ b/lldb/source/API/SBFrame.cpp @@ -44,6 +44,7 @@ #include "lldb/API/SBStream.h" #include "lldb/API/SBSymbolContext.h" #include "lldb/API/SBThread.h" +#include "lldb/API/SBVariablesOptions.h" using namespace lldb; using namespace lldb_private; @@ -1075,7 +1076,17 @@ SBFrame::GetVariables (bool arguments, if (frame && target) { lldb::DynamicValueType use_dynamic = frame->CalculateTarget()->GetPreferDynamicValue(); - value_list = GetVariables (arguments, locals, statics, in_scope_only, use_dynamic); + const bool include_runtime_support_values = target ? target->GetDisplayRuntimeSupportValues() : false; + + SBVariablesOptions options; + options.SetIncludeArguments(arguments); + options.SetIncludeLocals(locals); + options.SetIncludeStatics(statics); + options.SetInScopeOnly(in_scope_only); + options.SetIncludeRuntimeSupportValues(include_runtime_support_values); + options.SetUseDynamic(use_dynamic); + + value_list = GetVariables (options); } return value_list; } @@ -1089,22 +1100,19 @@ SBFrame::GetVariables (bool arguments, { 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); + const bool include_runtime_support_values = target ? target->GetDisplayRuntimeSupportValues() : false; + SBVariablesOptions options; + options.SetIncludeArguments(arguments); + options.SetIncludeLocals(locals); + options.SetIncludeStatics(statics); + options.SetInScopeOnly(in_scope_only); + options.SetIncludeRuntimeSupportValues(include_runtime_support_values); + options.SetUseDynamic(use_dynamic); + return GetVariables(options); } SBValueList -SBFrame::GetVariables (bool arguments, - bool locals, - bool statics, - bool in_scope_only, - bool include_runtime_support_values, - lldb::DynamicValueType use_dynamic) +SBFrame::GetVariables (const lldb::SBVariablesOptions& options) { Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); @@ -1115,10 +1123,19 @@ SBFrame::GetVariables (bool arguments, StackFrame *frame = NULL; Target *target = exe_ctx.GetTargetPtr(); + const bool statics = options.GetIncludeStatics(); + const bool arguments = options.GetIncludeArguments(); + const bool locals = options.GetIncludeLocals(); + const bool in_scope_only = options.GetInScopeOnly(); + const bool include_runtime_support_values = options.GetIncludeRuntimeSupportValues(); + const lldb::DynamicValueType use_dynamic = options.GetUseDynamic(); + if (log) - log->Printf ("SBFrame::GetVariables (arguments=%i, locals=%i, statics=%i, in_scope_only=%i)", - arguments, locals, statics, in_scope_only); - + log->Printf ("SBFrame::GetVariables (arguments=%i, locals=%i, statics=%i, in_scope_only=%i runtime=%i dynamic=%i)", + arguments, locals, + statics, in_scope_only, + include_runtime_support_values, use_dynamic); + Process *process = exe_ctx.GetProcessPtr(); if (target && process) { |