]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/include/lldb/Interpreter/OptionGroupWatchpoint.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / include / lldb / Interpreter / OptionGroupWatchpoint.h
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 liblldb_OptionGroupWatchpoint_h_
10 #define liblldb_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();
21
22   ~OptionGroupWatchpoint() override;
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   Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
31
32   void OptionParsingStarting(ExecutionContext *execution_context) override;
33
34   // Note:
35   // eWatchRead == LLDB_WATCH_TYPE_READ; and
36   // eWatchWrite == LLDB_WATCH_TYPE_WRITE
37   enum WatchType {
38     eWatchInvalid = 0,
39     eWatchRead,
40     eWatchWrite,
41     eWatchReadWrite
42   };
43
44   WatchType watch_type;
45   uint32_t watch_size;
46   bool watch_type_specified;
47
48 private:
49   DISALLOW_COPY_AND_ASSIGN(OptionGroupWatchpoint);
50 };
51
52 } // namespace lldb_private
53
54 #endif // liblldb_OptionGroupWatchpoint_h_