[lldb] Add a "display-recognized-arguments" target setting to show recognized arguments by default
Differential Revision: https://reviews.llvm.org/D55954 llvm-svn: 349856
This commit is contained in:
@@ -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;
|
||||
@@ -16,9 +20,10 @@ using namespace lldb_private;
|
||||
class VariablesOptionsImpl {
|
||||
public:
|
||||
VariablesOptionsImpl()
|
||||
: m_include_arguments(false), m_include_recognized_arguments(false),
|
||||
m_include_locals(false), m_include_statics(false),
|
||||
m_in_scope_only(false), m_include_runtime_support_values(false),
|
||||
: 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,12 +36,14 @@ public:
|
||||
|
||||
void SetIncludeArguments(bool b) { m_include_arguments = b; }
|
||||
|
||||
bool GetIncludeRecognizedArguments() const {
|
||||
return m_include_recognized_arguments;
|
||||
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;
|
||||
m_include_recognized_arguments = b ? eLazyBoolYes : eLazyBoolNo;
|
||||
}
|
||||
|
||||
bool GetIncludeLocals() const { return m_include_locals; }
|
||||
@@ -65,11 +72,11 @@ public:
|
||||
|
||||
private:
|
||||
bool m_include_arguments : 1;
|
||||
bool m_include_recognized_arguments : 1;
|
||||
bool m_include_locals : 1;
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -97,8 +104,9 @@ void SBVariablesOptions::SetIncludeArguments(bool arguments) {
|
||||
m_opaque_ap->SetIncludeArguments(arguments);
|
||||
}
|
||||
|
||||
bool SBVariablesOptions::GetIncludeRecognizedArguments() const {
|
||||
return m_opaque_ap->GetIncludeRecognizedArguments();
|
||||
bool SBVariablesOptions::GetIncludeRecognizedArguments(
|
||||
const lldb::SBTarget &target) const {
|
||||
return m_opaque_ap->GetIncludeRecognizedArguments(target.GetSP());
|
||||
}
|
||||
|
||||
void SBVariablesOptions::SetIncludeRecognizedArguments(bool arguments) {
|
||||
|
||||
Reference in New Issue
Block a user