1 //===-- OptionGroupWatchpoint.h ---------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLDB_INTERPRETER_OPTIONGROUPWATCHPOINT_H 10 #define LLDB_INTERPRETER_OPTIONGROUPWATCHPOINT_H 11 12 #include "lldb/Interpreter/Options.h" 13 14 namespace lldb_private { 15 16 // OptionGroupWatchpoint 17 18 class OptionGroupWatchpoint : public OptionGroup { 19 public: 20 OptionGroupWatchpoint() = default; 21 22 ~OptionGroupWatchpoint() override = default; 23 24 static bool IsWatchSizeSupported(uint32_t watch_size); 25 26 llvm::ArrayRef<OptionDefinition> GetDefinitions() override; 27 28 Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, 29 ExecutionContext *execution_context) override; 30 31 void OptionParsingStarting(ExecutionContext *execution_context) override; 32 33 // Note: 34 // eWatchRead == LLDB_WATCH_TYPE_READ; and 35 // eWatchWrite == LLDB_WATCH_TYPE_WRITE 36 enum WatchType { 37 eWatchInvalid = 0, 38 eWatchRead, 39 eWatchWrite, 40 eWatchReadWrite 41 }; 42 43 WatchType watch_type; 44 uint32_t watch_size; 45 bool watch_type_specified; 46 lldb::LanguageType language_type; 47 48 private: 49 OptionGroupWatchpoint(const OptionGroupWatchpoint &) = delete; 50 const OptionGroupWatchpoint & 51 operator=(const OptionGroupWatchpoint &) = delete; 52 }; 53 54 } // namespace lldb_private 55 56 #endif // LLDB_INTERPRETER_OPTIONGROUPWATCHPOINT_H 57