23 : m_name(definition.name), m_description(definition.description),
24 m_is_global(definition.global) {
25 switch (definition.
type) {
39 m_value_sp = std::make_shared<OptionValueArgs>();
59 m_value_sp = std::make_shared<OptionValueBoolean>(
65 m_value_sp = std::make_shared<OptionValueChar>(
71 m_value_sp = std::make_shared<OptionValueDictionary>(
105 m_value_sp = std::make_shared<OptionValueFileColonLine>();
115 m_value_sp = std::make_shared<OptionValueFileSpec>(file_spec, resolve);
122 m_value_sp = std::make_shared<OptionValueFileSpecList>();
137 m_value_sp = std::make_shared<OptionValueFormat>(new_format);
153 m_value_sp = std::make_shared<OptionValueLanguage>(new_lang);
160 m_value_sp = std::make_shared<OptionValueFormatEntity>(
167 m_value_sp = std::make_shared<OptionValuePathMappings>(
188 m_value_sp = std::make_shared<OptionValueSInt64>(
201 m_value_sp = std::make_shared<OptionValueUInt64>(
212 m_value_sp = std::make_shared<OptionValueUUID>(uuid);
229 assert(
m_value_sp &&
"invalid property definition");
234 : m_name(name), m_description(desc), m_value_sp(value_sp),
235 m_is_global(is_global) {}
248 uint32_t dump_mask)
const {
252 const bool transparent =
m_value_sp->ValueIsTransparent();
253 if (dump_cmd && !transparent)
254 strm <<
"settings set -f ";
255 if (dump_desc || !transparent) {
265 strm <<
"-- " << desc;
271 m_value_sp->DumpValue(exe_ctx, strm, dump_mask);
276 uint32_t output_width,
277 bool display_qualified_name)
const {
287 if (sub_properties) {
290 if (
m_value_sp->DumpQualifiedName(qualified_name))
291 strm.
Printf(
"'%s' variables:\n\n", qualified_name.
GetData());
294 if (display_qualified_name) {
298 "--", desc, output_width);
308 m_value_sp->SetValueChangedCallback(std::move(callback));
void OutputFormattedHelpText(Stream &strm, llvm::StringRef prefix, llvm::StringRef help_text)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
void Resolve(llvm::SmallVectorImpl< char > &path)
Resolve path to make it canonical.
static FileSystem & Instance()
void Reset(ValueType flags)
Set accessor for all flags.
static lldb::LanguageType GetLanguageTypeFromString(const char *string)=delete
void SetDefaultValue(enum_type value)
enum_type GetCurrentValue() const
virtual void DumpAllDescriptions(CommandInterpreter &interpreter, Stream &strm) const
static uint32_t ConvertTypeToMask(OptionValue::Type type)
void DumpDescription(CommandInterpreter &interpreter, Stream &strm, uint32_t output_width, bool display_qualified_name) const
llvm::StringRef GetDescription() const
lldb::OptionValueSP m_value_sp
void SetValueChangedCallback(std::function< void()> callback)
void Dump(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) const
Property(const PropertyDefinition &definition)
bool DumpQualifiedName(Stream &strm) const
const char * GetData() const
llvm::StringRef GetString() const
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t EOL()
Output and End of Line character to the stream.
bool SetFromStringRef(llvm::StringRef str)
A class that represents a running process on the host machine.
Format
Display format definitions.
LanguageType
Programming language type.
@ eLanguageTypeUnknown
Unknown or invalid language value.
std::shared_ptr< lldb_private::OptionValue > OptionValueSP
static char ToChar(llvm::StringRef s, char fail_value, bool *success_ptr)
static Status ToFormat(const char *s, lldb::Format &format, size_t *byte_size_ptr)
static bool ToBoolean(llvm::StringRef s, bool fail_value, bool *success_ptr)
const char * default_cstr_value
OptionEnumValues enum_values
uintptr_t default_uint_value