]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupWatchpoint.h
MFV r328251: 8652 Tautological comparisons with ZPROP_INVAL
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Interpreter / OptionGroupWatchpoint.h
1 //===-- OptionGroupWatchpoint.h ---------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_OptionGroupWatchpoint_h_
11 #define liblldb_OptionGroupWatchpoint_h_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Interpreter/Options.h"
18
19 namespace lldb_private {
20
21 //-------------------------------------------------------------------------
22 // OptionGroupWatchpoint
23 //-------------------------------------------------------------------------
24
25 class OptionGroupWatchpoint : public OptionGroup {
26 public:
27   OptionGroupWatchpoint();
28
29   ~OptionGroupWatchpoint() override;
30
31   static bool IsWatchSizeSupported(uint32_t watch_size);
32
33   llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
34
35   Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
36                         ExecutionContext *execution_context) override;
37   Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
38
39   void OptionParsingStarting(ExecutionContext *execution_context) override;
40
41   // Note:
42   // eWatchRead == LLDB_WATCH_TYPE_READ; and
43   // eWatchWrite == LLDB_WATCH_TYPE_WRITE
44   typedef enum WatchType {
45     eWatchInvalid = 0,
46     eWatchRead,
47     eWatchWrite,
48     eWatchReadWrite
49   } WatchType;
50
51   WatchType watch_type;
52   uint32_t watch_size;
53   bool watch_type_specified;
54
55 private:
56   DISALLOW_COPY_AND_ASSIGN(OptionGroupWatchpoint);
57 };
58
59 } // namespace lldb_private
60
61 #endif // liblldb_OptionGroupWatchpoint_h_