18 Stream &strm, uint32_t dump_mask) {
19 std::lock_guard<std::recursive_mutex> lock(
m_mutex);
30 for (uint32_t i = 0; i < size; ++i) {
46 std::lock_guard<std::recursive_mutex> lock(
m_mutex);
48 Args args(value.str());
63 "invalid file list index %s, index must be 0 through %u",
66 for (
size_t i = 1; i < argc; ++i, ++idx) {
77 "replace operation takes an array index followed by "
78 "one or more values");
89 for (
size_t i = 0; i < argc; ++i) {
96 "assign operation takes at least one file path argument");
107 "invalid insert file list index %s, index must be 0 through %u",
112 for (
size_t i = 1; i < argc; ++i, ++idx) {
120 "insert operation takes an array index followed by "
121 "one or more values");
127 std::vector<int> remove_indexes;
128 bool all_indexes_valid =
true;
130 for (i = 0; all_indexes_valid && i < argc; ++i) {
133 all_indexes_valid =
false;
135 remove_indexes.push_back(idx);
138 if (all_indexes_valid) {
139 size_t num_remove_indexes = remove_indexes.size();
140 if (num_remove_indexes) {
142 llvm::sort(remove_indexes);
143 for (
size_t j = num_remove_indexes - 1; j < num_remove_indexes; ++j) {
150 "invalid array index '%s', aborting remove operation",
155 "remove operation takes one or more array index");
167 std::lock_guard<std::recursive_mutex> lock(
m_mutex);
static llvm::raw_ostream & error(Stream &strm)
A command line argument class.
size_t GetArgumentCount() const
Gets the number of arguments left in this command object.
const char * GetArgumentAtIndex(size_t idx) const
Gets the NULL terminated C string argument pointer for the argument at index idx.
std::shared_ptr< typename Base::TopmostBase > Clone() const override
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
bool Insert(size_t idx, const FileSpec &file)
const FileSpec & GetFileSpecAtIndex(size_t idx) const
Get file at index.
void Clear()
Clears the file list.
void Append(const FileSpec &file)
Append a FileSpec object to the list.
size_t GetSize() const
Get the number of files in the file list.
bool Replace(size_t idx, const FileSpec &file)
void Dump(llvm::raw_ostream &s) const
Dump this object to a Stream.
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
FileSpecList m_current_value
void DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) override
lldb::OptionValueSP Clone() const override
std::recursive_mutex m_mutex
virtual Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign)
void NotifyValueChanged()
virtual const char * GetTypeAsCString() const
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
static Status FromErrorString(const char *str)
A stream class that can stream formatted output to a file.
llvm::raw_ostream & AsRawOstream()
Returns a raw_ostream that forwards the data to this Stream object.
size_t Indent(llvm::StringRef s="")
Indent the current line in the stream.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
void IndentLess(unsigned amount=2)
Decrement the current indentation level.
void IndentMore(unsigned amount=2)
Increment the current indentation level.
A class that represents a running process on the host machine.
VarSetOperationType
Settable state variable types.
@ eVarSetOperationReplace
@ eVarSetOperationInvalid
@ eVarSetOperationInsertBefore
@ eVarSetOperationInsertAfter
std::shared_ptr< lldb_private::OptionValue > OptionValueSP