LLDB  mainline
OptionGroupFormat.h
Go to the documentation of this file.
1 //===-- OptionGroupFormat.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_OptionGroupFormat_h_
10 #define liblldb_OptionGroupFormat_h_
11 
16 
17 namespace lldb_private {
18 
19 // OptionGroupFormat
20 
22 public:
27 
29  lldb::Format default_format,
30  uint64_t default_byte_size =
31  UINT64_MAX, // Pass UINT64_MAX to disable the "--size" option
32  uint64_t default_count =
33  UINT64_MAX); // Pass UINT64_MAX to disable the "--count" option
34 
35  ~OptionGroupFormat() override;
36 
37  llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
38 
39  Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
40  ExecutionContext *execution_context) override;
41  Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
42 
43  void OptionParsingStarting(ExecutionContext *execution_context) override;
44 
46 
48 
49  const OptionValueFormat &GetFormatValue() const { return m_format; }
50 
52 
53  const OptionValueUInt64 &GetByteSizeValue() const { return m_byte_size; }
54 
56 
57  const OptionValueUInt64 &GetCountValue() const { return m_count; }
58 
59  bool HasGDBFormat() const { return m_has_gdb_format; }
60 
61  bool AnyOptionWasSet() const {
64  }
65 
66 protected:
67  bool ParserGDBFormatLetter(ExecutionContext *execution_context,
68  char format_letter, lldb::Format &format,
69  uint32_t &byte_size);
70 
77 };
78 
79 } // namespace lldb_private
80 
81 #endif // liblldb_OptionGroupFormat_h_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
lldb::Format GetCurrentValue() const
OptionValueFormat & GetFormatValue()
OptionGroupFormat(lldb::Format default_format, uint64_t default_byte_size=UINT64_MAX, uint64_t default_count=UINT64_MAX)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
void OptionParsingStarting(ExecutionContext *execution_context) override
bool ParserGDBFormatLetter(ExecutionContext *execution_context, char format_letter, lldb::Format &format, uint32_t &byte_size)
static const uint32_t OPTION_GROUP_SIZE
#define LLDB_OPT_SET_3
Definition: lldb-defines.h:113
const OptionValueUInt64 & GetByteSizeValue() const
const OptionValueFormat & GetFormatValue() const
OptionValueUInt64 & GetByteSizeValue()
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) override
static const uint32_t OPTION_GROUP_FORMAT
OptionValueUInt64 & GetCountValue()
#define LLDB_OPT_SET_4
Definition: lldb-defines.h:114
#define LLDB_OPT_SET_2
Definition: lldb-defines.h:112
const OptionValueUInt64 & GetCountValue() const
static const uint32_t OPTION_GROUP_COUNT
static const uint32_t OPTION_GROUP_GDB_FMT
#define LLDB_OPT_SET_1
Definition: lldb-defines.h:111
#define UINT64_MAX
Definition: lldb-defines.h:35
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
An error handling class.
Definition: Status.h:44