19 std::lock_guard<std::mutex> lock(other.
m_mutex);
28 std::scoped_lock<std::mutex, std::mutex> lock(
m_mutex, other.
m_mutex);
39 llvm::StringRef value) {
41 error.SetErrorString(
"SetSubValue is not supported");
274 std::lock_guard<std::mutex> lock(
m_mutex);
276 return option_value->GetCurrentValue();
281 std::lock_guard<std::mutex> lock(
m_mutex);
283 option_value->SetCurrentValue(new_value);
290 std::lock_guard<std::mutex> lock(
m_mutex);
292 return option_value->GetCurrentValue();
297 std::lock_guard<std::mutex> lock(
m_mutex);
299 option_value->SetCurrentValue(new_value);
306 std::lock_guard<std::mutex> lock(
m_mutex);
308 return option_value->GetCurrentValue();
313 std::lock_guard<std::mutex> lock(
m_mutex);
315 option_value->SetCurrentValue(value);
322 std::lock_guard<std::mutex> lock(
m_mutex);
324 return option_value->GetCurrentValue();
329 std::lock_guard<std::mutex> lock(
m_mutex);
331 option_value->SetCurrentValue(file_spec,
false);
338 std::lock_guard<std::mutex> lock(
m_mutex);
340 option_value->AppendCurrentValue(file_spec);
347 std::lock_guard<std::mutex> lock(
m_mutex);
349 return option_value->GetCurrentValue();
354 std::lock_guard<std::mutex> lock(
m_mutex);
356 return option_value->GetCurrentValue();
361 std::lock_guard<std::mutex> lock(
m_mutex);
363 option_value->SetCurrentValue(new_value);
370 std::lock_guard<std::mutex> lock(
m_mutex);
372 return option_value->GetCurrentValue();
377 std::lock_guard<std::mutex> lock(
m_mutex);
379 option_value->SetCurrentValue(new_language);
386 std::lock_guard<std::mutex> lock(
m_mutex);
388 return &option_value->GetCurrentValue();
393 std::lock_guard<std::mutex> lock(
m_mutex);
395 return option_value->GetCurrentValue();
400 std::lock_guard<std::mutex> lock(
m_mutex);
402 return option_value->GetCurrentValue();
407 std::lock_guard<std::mutex> lock(
m_mutex);
409 option_value->SetCurrentValue(new_value);
416 std::lock_guard<std::mutex> lock(
m_mutex);
418 return option_value->GetCurrentValueAsRef();
423 std::lock_guard<std::mutex> lock(
m_mutex);
425 option_value->SetCurrentValue(new_value);
432 std::lock_guard<std::mutex> lock(
m_mutex);
434 return option_value->GetCurrentValue();
439 std::lock_guard<std::mutex> lock(
m_mutex);
441 option_value->SetCurrentValue(new_value);
448 std::lock_guard<std::mutex> lock(
m_mutex);
450 return option_value->GetCurrentValue();
455 std::lock_guard<std::mutex> lock(
m_mutex);
457 option_value->SetCurrentValue(uuid);
464 std::lock_guard<std::mutex> lock(
m_mutex);
466 return option_value->GetCurrentValue();
471 std::lock_guard<std::mutex> lock(
m_mutex);
473 option_value->SetCurrentValue(arch_spec,
false);
498 return "file:line:column specifier";
506 return "format-string";
528 const char *value_cstr, uint32_t type_mask,
Status &
error) {
534 value_sp = std::make_shared<OptionValueArch>();
537 value_sp = std::make_shared<OptionValueBoolean>(
false);
540 value_sp = std::make_shared<OptionValueChar>(
'\0');
543 value_sp = std::make_shared<OptionValueFileSpec>();
549 value_sp = std::make_shared<OptionValueFormatEntity>(
nullptr);
555 value_sp = std::make_shared<OptionValueSInt64>();
558 value_sp = std::make_shared<OptionValueString>();
561 value_sp = std::make_shared<OptionValueUInt64>();
564 value_sp = std::make_shared<OptionValueUUID>();
571 error.SetErrorString(
"unsupported type mask");
576 bool dumped_something =
false;
579 if (m_parent_sp->DumpQualifiedName(strm))
580 dumped_something =
true;
582 llvm::StringRef name(
GetName());
584 if (dumped_something)
587 dumped_something =
true;
590 return dumped_something;
595 clone->SetParent(new_parent);
607 error.SetErrorStringWithFormat(
608 "%s objects do not support the 'replace' operation",
612 error.SetErrorStringWithFormat(
613 "%s objects do not support the 'insert-before' operation",
617 error.SetErrorStringWithFormat(
618 "%s objects do not support the 'insert-after' operation",
622 error.SetErrorStringWithFormat(
626 error.SetErrorStringWithFormat(
630 error.SetErrorStringWithFormat(
634 error.SetErrorStringWithFormat(
638 error.SetErrorStringWithFormat(
"invalid operation performed on a %s object",
static llvm::raw_ostream & error(Stream &strm)
An architecture specification class.
"lldb/Utility/ArgCompletionRequest.h"
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
virtual bool DumpQualifiedName(Stream &strm) const
std::optional< char > GetCharValue() const
std::optional< FileSpecList > GetFileSpecListValue() const
bool SetArchSpecValue(ArchSpec arch_spec)
std::optional< ArchSpec > GetArchSpecValue() const
OptionValueDictionary * GetAsDictionary()
virtual Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign)
OptionValueSInt64 * GetAsSInt64()
std::optional< FileSpec > GetFileSpecValue() const
static lldb::OptionValueSP CreateValueFromCStringForTypeMask(const char *value_cstr, uint32_t type_mask, Status &error)
std::optional< uint64_t > GetUInt64Value() const
bool SetFileSpecValue(FileSpec file_spec)
virtual lldb::OptionValueSP Clone() const =0
virtual Type GetType() const =0
lldb::OptionValueWP m_parent_wp
OptionValueFileSpecList * GetAsFileSpecList()
OptionValueRegex * GetAsRegex()
OptionValueUInt64 * GetAsUInt64()
OptionValue & operator=(const OptionValue &other)
OptionValueFormatEntity * GetAsFormatEntity()
bool SetCharValue(char new_value)
OptionValuePathMappings * GetAsPathMappings()
virtual void AutoComplete(CommandInterpreter &interpreter, CompletionRequest &request)
OptionValueProperties * GetAsProperties()
OptionValueEnumeration * GetAsEnumeration()
virtual lldb::OptionValueSP DeepCopy(const lldb::OptionValueSP &new_parent) const
static const char * GetBuiltinTypeAsCString(Type t)
OptionValueFormat * GetAsFormat()
OptionValueArgs * GetAsArgs()
virtual const char * GetTypeAsCString() const
OptionValueChar * GetAsChar()
bool AppendFileSpecValue(FileSpec file_spec)
OptionValueArray * GetAsArray()
std::optional< lldb::LanguageType > GetLanguageValue() const
bool SetStringValue(llvm::StringRef new_value)
std::optional< int64_t > GetSInt64Value() const
bool SetUUIDValue(const UUID &uuid)
std::optional< lldb::Format > GetFormatValue() const
std::optional< int64_t > GetEnumerationValue() const
std::optional< bool > GetBooleanValue() const
bool SetBooleanValue(bool new_value)
std::optional< llvm::StringRef > GetStringValue() const
OptionValueBoolean * GetAsBoolean()
OptionValueFileSpec * GetAsFileSpec()
const RegularExpression * GetRegexValue() const
const FormatEntity::Entry * GetFormatEntity() const
bool SetEnumerationValue(int64_t value)
OptionValueUUID * GetAsUUID()
bool SetUInt64Value(uint64_t new_value)
virtual llvm::StringRef GetName() const
OptionValueArch * GetAsArch()
bool SetFormatValue(lldb::Format new_value)
bool SetLanguageValue(lldb::LanguageType new_language)
std::function< void()> m_callback
OptionValueLanguage * GetAsLanguage()
std::optional< UUID > GetUUIDValue() const
bool SetSInt64Value(int64_t new_value)
virtual Status SetSubValue(const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef name, llvm::StringRef value)
OptionValueString * GetAsString()
A stream class that can stream formatted output to a file.
A class that represents a running process on the host machine.
std::unique_ptr< T > clone(const std::unique_ptr< T > &src)
VarSetOperationType
Settable state variable types.
@ eVarSetOperationReplace
@ eVarSetOperationInvalid
@ eVarSetOperationInsertBefore
@ eVarSetOperationInsertAfter
Format
Display format definitions.
LanguageType
Programming language type.
@ eLanguageTypeUnknown
Unknown or invalid language value.
std::shared_ptr< lldb_private::OptionValue > OptionValueSP