#include "lldb/Interpreter/Options.h"
#include <algorithm>
#include <bitset>
#include <map>
#include <set>
#include "lldb/Host/OptionParser.h"
#include "lldb/Interpreter/CommandCompletions.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandObject.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/StreamString.h"
#include "llvm/ADT/STLExtras.h"
usingnamespacelldb;
usingnamespacelldb_private;
Options::Options() { … }
Options::~Options() = default;
void Options::NotifyOptionParsingStarting(ExecutionContext *execution_context) { … }
Status
Options::NotifyOptionParsingFinished(ExecutionContext *execution_context) { … }
void Options::OptionSeen(int option_idx) { … }
bool Options::IsASubset(const OptionSet &set_a, const OptionSet &set_b) { … }
size_t Options::OptionsSetDiff(const OptionSet &set_a, const OptionSet &set_b,
OptionSet &diffs) { … }
void Options::OptionsSetUnion(const OptionSet &set_a, const OptionSet &set_b,
OptionSet &union_set) { … }
bool Options::VerifyOptions(CommandReturnObject &result) { … }
void Options::BuildValidOptionSets() { … }
uint32_t Options::NumCommandOptions() { … }
Option *Options::GetLongOptions() { … }
void Options::OutputFormattedUsageText(Stream &strm,
const OptionDefinition &option_def,
uint32_t output_max_columns) { … }
bool Options::SupportsLongOption(const char *long_option) { … }
enum OptionDisplayType { … };
static bool PrintOption(const OptionDefinition &opt_def,
OptionDisplayType display_type, const char *header,
const char *footer, bool show_optional, Stream &strm) { … }
void Options::GenerateOptionUsage(Stream &strm, CommandObject &cmd,
uint32_t screen_width) { … }
bool Options::VerifyPartialOptions(CommandReturnObject &result) { … }
bool Options::HandleOptionCompletion(CompletionRequest &request,
OptionElementVector &opt_element_vector,
CommandInterpreter &interpreter) { … }
void Options::HandleOptionArgumentCompletion(
CompletionRequest &request, OptionElementVector &opt_element_vector,
int opt_element_index, CommandInterpreter &interpreter) { … }
void OptionGroupOptions::Append(OptionGroup *group) { … }
const OptionGroup *OptionGroupOptions::GetGroupWithOption(char short_opt) { … }
void OptionGroupOptions::Append(OptionGroup *group, uint32_t src_mask,
uint32_t dst_mask) { … }
void OptionGroupOptions::Append(
OptionGroup *group, llvm::ArrayRef<llvm::StringRef> exclude_long_options) { … }
void OptionGroupOptions::Finalize() { … }
Status OptionGroupOptions::SetOptionValue(uint32_t option_idx,
llvm::StringRef option_value,
ExecutionContext *execution_context) { … }
void OptionGroupOptions::OptionParsingStarting(
ExecutionContext *execution_context) { … }
Status
OptionGroupOptions::OptionParsingFinished(ExecutionContext *execution_context) { … }
static std::vector<char *> GetArgvForParsing(const Args &args) { … }
static Args::const_iterator FindOriginalIter(const char *arg,
const Args &original) { … }
static size_t FindOriginalIndex(const char *arg, const Args &original) { … }
static Args ReconstituteArgsAfterParsing(llvm::ArrayRef<char *> parsed,
const Args &original) { … }
static size_t FindArgumentIndexForOption(const Args &args,
const Option &long_option) { … }
static std::string BuildShortOptions(const Option *long_options) { … }
llvm::Expected<Args> Options::ParseAlias(const Args &args,
OptionArgVector *option_arg_vector,
std::string &input_line) { … }
OptionElementVector Options::ParseForCompletion(const Args &args,
uint32_t cursor_index) { … }
llvm::Expected<Args> Options::Parse(const Args &args,
ExecutionContext *execution_context,
lldb::PlatformSP platform_sp,
bool require_validation) { … }
llvm::Error lldb_private::CreateOptionParsingError(
llvm::StringRef option_arg, const char short_option,
llvm::StringRef long_option, llvm::StringRef additional_context) { … }