LLDB  mainline
OptionGroupUInt64.cpp
Go to the documentation of this file.
1 //===-- OptionGroupUInt64.cpp ----------------------------------*- 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 
10 
11 #include "lldb/Host/OptionParser.h"
12 
13 using namespace lldb;
14 using namespace lldb_private;
15 
16 OptionGroupUInt64::OptionGroupUInt64(uint32_t usage_mask, bool required,
17  const char *long_option, int short_option,
18  uint32_t completion_type,
19  lldb::CommandArgumentType argument_type,
20  const char *usage_text,
21  uint64_t default_value)
22  : m_value(default_value, default_value) {
23  m_option_definition.usage_mask = usage_mask;
24  m_option_definition.required = required;
25  m_option_definition.long_option = long_option;
26  m_option_definition.short_option = short_option;
27  m_option_definition.validator = nullptr;
29  m_option_definition.enum_values = {};
30  m_option_definition.completion_type = completion_type;
31  m_option_definition.argument_type = argument_type;
32  m_option_definition.usage_text = usage_text;
33 }
34 
36 
38  llvm::StringRef option_arg,
39  ExecutionContext *execution_context) {
40  Status error(m_value.SetValueFromString(option_arg));
41  return error;
42 }
43 
45  ExecutionContext *execution_context) {
46  m_value.Clear();
47 }
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
void OptionParsingStarting(ExecutionContext *execution_context) override
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) override
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
Status SetValueFromString(llvm::StringRef value, VarSetOperationType op=eVarSetOperationAssign) override
Definition: SBAddress.h:15
An error handling class.
Definition: Status.h:44