diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 | 
| commit | 94994d372d014ce4c8758b9605d63fae651bd8aa (patch) | |
| tree | 51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /source/API/SBVariablesOptions.cpp | |
| parent | 39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff) | |
Diffstat (limited to 'source/API/SBVariablesOptions.cpp')
| -rw-r--r-- | source/API/SBVariablesOptions.cpp | 29 | 
1 files changed, 26 insertions, 3 deletions
diff --git a/source/API/SBVariablesOptions.cpp b/source/API/SBVariablesOptions.cpp index e12b9696521c..2651ce11d02a 100644 --- a/source/API/SBVariablesOptions.cpp +++ b/source/API/SBVariablesOptions.cpp @@ -9,6 +9,10 @@  //===----------------------------------------------------------------------===//  #include "lldb/API/SBVariablesOptions.h" +#include "lldb/API/SBTarget.h" +#include "lldb/Target/Target.h" + +#include "lldb/lldb-private.h"  using namespace lldb;  using namespace lldb_private; @@ -19,6 +23,7 @@ public:        : m_include_arguments(false), m_include_locals(false),          m_include_statics(false), m_in_scope_only(false),          m_include_runtime_support_values(false), +        m_include_recognized_arguments(eLazyBoolCalculate),          m_use_dynamic(lldb::eNoDynamicValues) {}    VariablesOptionsImpl(const VariablesOptionsImpl &) = default; @@ -31,6 +36,16 @@ public:    void SetIncludeArguments(bool b) { m_include_arguments = b; } +  bool GetIncludeRecognizedArguments(const lldb::TargetSP &target_sp) const { +    if (m_include_recognized_arguments != eLazyBoolCalculate) +        return m_include_recognized_arguments; +    return target_sp ? target_sp->GetDisplayRecognizedArguments() : false; +  } + +  void SetIncludeRecognizedArguments(bool b) { +    m_include_recognized_arguments = b ? eLazyBoolYes : eLazyBoolNo; +  } +    bool GetIncludeLocals() const { return m_include_locals; }    void SetIncludeLocals(bool b) { m_include_locals = b; } @@ -61,6 +76,7 @@ private:    bool m_include_statics : 1;    bool m_in_scope_only : 1;    bool m_include_runtime_support_values : 1; +  LazyBool m_include_recognized_arguments; // can be overridden with a setting    lldb::DynamicValueType m_use_dynamic;  }; @@ -78,9 +94,7 @@ operator=(const SBVariablesOptions &options) {  SBVariablesOptions::~SBVariablesOptions() = default; -bool SBVariablesOptions::IsValid() const { -  return m_opaque_ap.get() != nullptr; -} +bool SBVariablesOptions::IsValid() const { return m_opaque_ap != nullptr; }  bool SBVariablesOptions::GetIncludeArguments() const {    return m_opaque_ap->GetIncludeArguments(); @@ -90,6 +104,15 @@ void SBVariablesOptions::SetIncludeArguments(bool arguments) {    m_opaque_ap->SetIncludeArguments(arguments);  } +bool SBVariablesOptions::GetIncludeRecognizedArguments( +    const lldb::SBTarget &target) const { +  return m_opaque_ap->GetIncludeRecognizedArguments(target.GetSP()); +} + +void SBVariablesOptions::SetIncludeRecognizedArguments(bool arguments) { +  m_opaque_ap->SetIncludeRecognizedArguments(arguments); +} +  bool SBVariablesOptions::GetIncludeLocals() const {    return m_opaque_ap->GetIncludeLocals();  }  | 
