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());
62 error.SetErrorStringWithFormat(
63 "invalid file list index %s, index must be 0 through %u",
66 for (
size_t i = 1; i < argc; ++i, ++idx) {
76 error.SetErrorString(
"replace operation takes an array index followed by "
77 "one or more values");
88 for (
size_t i = 0; i < argc; ++i) {
95 "assign operation takes at least one file path argument");
105 error.SetErrorStringWithFormat(
106 "invalid insert file list index %s, index must be 0 through %u",
111 for (
size_t i = 1; i < argc; ++i, ++idx) {
118 error.SetErrorString(
"insert operation takes an array index followed by "
119 "one or more values");
125 std::vector<int> remove_indexes;
126 bool all_indexes_valid =
true;
128 for (i = 0; all_indexes_valid && i < argc; ++i) {
131 all_indexes_valid =
false;
133 remove_indexes.push_back(idx);
136 if (all_indexes_valid) {
137 size_t num_remove_indexes = remove_indexes.size();
138 if (num_remove_indexes) {
140 llvm::sort(remove_indexes);
141 for (
size_t j = num_remove_indexes - 1; j < num_remove_indexes; ++j) {
147 error.SetErrorStringWithFormat(
148 "invalid array index '%s', aborting remove operation",
152 error.SetErrorString(
"remove operation takes one or more array index");
164 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
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