LLDB  mainline
OptionArgParser.h
Go to the documentation of this file.
1 //===-- OptionArgParser.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 LLDB_INTERPRETER_OPTIONARGPARSER_H
10 #define LLDB_INTERPRETER_OPTIONARGPARSER_H
11 
13 
14 namespace lldb_private {
15 
17  static lldb::addr_t ToAddress(const ExecutionContext *exe_ctx,
18  llvm::StringRef s, lldb::addr_t fail_value,
19  Status *error);
20 
21  static bool ToBoolean(llvm::StringRef s, bool fail_value, bool *success_ptr);
22 
23  static char ToChar(llvm::StringRef s, char fail_value, bool *success_ptr);
24 
25  static int64_t ToOptionEnum(llvm::StringRef s,
26  const OptionEnumValues &enum_values,
27  int32_t fail_value, Status &error);
28 
29  static lldb::ScriptLanguage ToScriptLanguage(llvm::StringRef s,
30  lldb::ScriptLanguage fail_value,
31  bool *success_ptr);
32 
33  // TODO: Use StringRef
34  static Status ToFormat(const char *s, lldb::Format &format,
35  size_t *byte_size_ptr); // If non-NULL, then a
36  // byte size can precede
37  // the format character
38 };
39 
40 } // namespace lldb_private
41 
42 #endif // LLDB_INTERPRETER_OPTIONARGPARSER_H
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb-private-types.h
lldb::ScriptLanguage
ScriptLanguage
Script interpreter types.
Definition: lldb-enumerations.h:216
lldb::Format
Format
Display format definitions.
Definition: lldb-enumerations.h:155
lldb_private::OptionArgParser::ToChar
static char ToChar(llvm::StringRef s, char fail_value, bool *success_ptr)
Definition: OptionArgParser.cpp:35
lldb_private::OptionArgParser::ToScriptLanguage
static lldb::ScriptLanguage ToScriptLanguage(llvm::StringRef s, lldb::ScriptLanguage fail_value, bool *success_ptr)
Definition: OptionArgParser.cpp:123
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::OptionArgParser::ToFormat
static Status ToFormat(const char *s, lldb::Format &format, size_t *byte_size_ptr)
Definition: OptionArgParser.cpp:78
lldb_private::OptionArgParser::ToBoolean
static bool ToBoolean(llvm::StringRef s, bool fail_value, bool *success_ptr)
Definition: OptionArgParser.cpp:18
lldb_private::Status
Definition: Status.h:44
lldb_private::OptionArgParser::ToOptionEnum
static int64_t ToOptionEnum(llvm::StringRef s, const OptionEnumValues &enum_values, int32_t fail_value, Status &error)
Definition: OptionArgParser.cpp:47
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::OptionArgParser
Definition: OptionArgParser.h:16
lldb_private::OptionArgParser::ToAddress
static lldb::addr_t ToAddress(const ExecutionContext *exe_ctx, llvm::StringRef s, lldb::addr_t fail_value, Status *error)
Definition: OptionArgParser.cpp:142