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
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
static char ToChar(llvm::StringRef s, char fail_value, bool *success_ptr)
static int64_t ToOptionEnum(llvm::StringRef s, const OptionEnumValues &enum_values, int32_t fail_value, Status &error)
static lldb::ScriptLanguage ToScriptLanguage(llvm::StringRef s, lldb::ScriptLanguage fail_value, bool *success_ptr)
static bool ToBoolean(llvm::StringRef s, bool fail_value, bool *success_ptr)
static lldb::addr_t ToAddress(const ExecutionContext *exe_ctx, llvm::StringRef s, lldb::addr_t fail_value, Status *error)
uint64_t addr_t
Definition: lldb-types.h:83
static Status ToFormat(const char *s, lldb::Format &format, size_t *byte_size_ptr)
An error handling class.
Definition: Status.h:44