File indexing completed on 2026-05-10 08:42:50
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_INTERPRETER_OPTIONVALUEPATHMAPPINGS_H
0010 #define LLDB_INTERPRETER_OPTIONVALUEPATHMAPPINGS_H
0011
0012 #include "lldb/Interpreter/OptionValue.h"
0013 #include "lldb/Target/PathMappingList.h"
0014
0015 namespace lldb_private {
0016
0017 class OptionValuePathMappings
0018 : public Cloneable<OptionValuePathMappings, OptionValue> {
0019 public:
0020 OptionValuePathMappings(bool notify_changes)
0021 : m_notify_changes(notify_changes) {}
0022
0023 ~OptionValuePathMappings() override = default;
0024
0025
0026
0027 OptionValue::Type GetType() const override { return eTypePathMap; }
0028
0029 void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
0030 uint32_t dump_mask) override;
0031
0032 llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) override;
0033
0034 Status
0035 SetValueFromString(llvm::StringRef value,
0036 VarSetOperationType op = eVarSetOperationAssign) override;
0037
0038 void Clear() override {
0039 m_path_mappings.Clear(m_notify_changes);
0040 m_value_was_set = false;
0041 }
0042
0043 bool IsAggregateValue() const override { return true; }
0044
0045
0046
0047 PathMappingList &GetCurrentValue() { return m_path_mappings; }
0048
0049 const PathMappingList &GetCurrentValue() const { return m_path_mappings; }
0050
0051 protected:
0052 PathMappingList m_path_mappings;
0053 bool m_notify_changes;
0054 };
0055
0056 }
0057
0058 #endif