OptionGroupWatchpoint.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #ifndef LLDB_INTERPRETER_OPTIONGROUPWATCHPOINT_H
  9. #define LLDB_INTERPRETER_OPTIONGROUPWATCHPOINT_H
  10. #include "lldb/Interpreter/Options.h"
  11. namespace lldb_private {
  12. // OptionGroupWatchpoint
  13. class OptionGroupWatchpoint : public OptionGroup {
  14. public:
  15. OptionGroupWatchpoint() = default;
  16. ~OptionGroupWatchpoint() override = default;
  17. static bool IsWatchSizeSupported(uint32_t watch_size);
  18. llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
  19. Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
  20. ExecutionContext *execution_context) override;
  21. void OptionParsingStarting(ExecutionContext *execution_context) override;
  22. // Note:
  23. // eWatchRead == LLDB_WATCH_TYPE_READ; and
  24. // eWatchWrite == LLDB_WATCH_TYPE_WRITE
  25. enum WatchType {
  26. eWatchInvalid = 0,
  27. eWatchRead,
  28. eWatchWrite,
  29. eWatchReadWrite
  30. };
  31. WatchType watch_type;
  32. uint32_t watch_size;
  33. bool watch_type_specified;
  34. private:
  35. OptionGroupWatchpoint(const OptionGroupWatchpoint &) = delete;
  36. const OptionGroupWatchpoint &
  37. operator=(const OptionGroupWatchpoint &) = delete;
  38. };
  39. } // namespace lldb_private
  40. #endif // LLDB_INTERPRETER_OPTIONGROUPWATCHPOINT_H