19 Stream &strm, uint32_t dump_mask) {
20 std::lock_guard<std::recursive_mutex> lock(
m_mutex);
37 for (uint32_t i = 0; i < size; ++i) {
53 std::lock_guard<std::recursive_mutex> lock(
m_mutex);
54 llvm::json::Array array;
56 array.emplace_back(file_spec.ToJSON());
62 std::lock_guard<std::recursive_mutex> lock(
m_mutex);
64 Args args(value.str());
79 "invalid file list index %s, index must be 0 through %u",
82 for (
size_t i = 1; i < argc; ++i, ++idx) {
93 "replace operation takes an array index followed by "
94 "one or more values");
105 for (
size_t i = 0; i < argc; ++i) {
112 "assign operation takes at least one file path argument");
123 "invalid insert file list index %s, index must be 0 through %u",
128 for (
size_t i = 1; i < argc; ++i, ++idx) {
136 "insert operation takes an array index followed by "
137 "one or more values");
143 std::vector<int> remove_indexes;
144 bool all_indexes_valid =
true;
146 for (i = 0; all_indexes_valid && i < argc; ++i) {
149 all_indexes_valid =
false;
151 remove_indexes.push_back(idx);
154 if (all_indexes_valid) {
155 size_t num_remove_indexes = remove_indexes.size();
156 if (num_remove_indexes) {
158 llvm::sort(remove_indexes);
159 for (
size_t j = num_remove_indexes - 1; j < num_remove_indexes; ++j) {
166 "invalid array index '%s', aborting remove operation",
171 "remove operation takes one or more array index");
183 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.
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
llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) const 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
@ eDumpOptionDefaultValue
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.
size_t PutCString(llvm::StringRef cstr)
Output a C string 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