LLDB mainline
|
#include <Options.h>
Classes | |
struct | OptionInfo |
Public Types | |
typedef std::vector< OptionInfo > | OptionInfos |
Public Member Functions | |
OptionGroupOptions ()=default | |
~OptionGroupOptions () override=default | |
void | Append (OptionGroup *group) |
Append options from a OptionGroup class. | |
void | Append (OptionGroup *group, uint32_t src_mask, uint32_t dst_mask) |
Append options from a OptionGroup class. | |
void | Append (OptionGroup *group, llvm::ArrayRef< llvm::StringRef > exclude_long_options) |
Append selected options from a OptionGroup class. | |
void | Finalize () |
bool | DidFinalize () |
Status | SetOptionValue (uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override |
Set the value of an option. | |
void | OptionParsingStarting (ExecutionContext *execution_context) override |
Status | OptionParsingFinished (ExecutionContext *execution_context) override |
llvm::ArrayRef< OptionDefinition > | GetDefinitions () override |
const OptionGroup * | GetGroupWithOption (char short_opt) |
Public Member Functions inherited from lldb_private::Options | |
Options () | |
virtual | ~Options () |
void | BuildGetoptTable () |
void | BuildValidOptionSets () |
uint32_t | NumCommandOptions () |
Option * | GetLongOptions () |
Get the option definitions to use when parsing Args options. | |
void | OptionSeen (int short_option) |
bool | VerifyOptions (CommandReturnObject &result) |
bool | VerifyPartialOptions (CommandReturnObject &result) |
void | OutputFormattedUsageText (Stream &strm, const OptionDefinition &option_def, uint32_t output_max_columns) |
void | GenerateOptionUsage (Stream &strm, CommandObject &cmd, uint32_t screen_width) |
bool | SupportsLongOption (const char *long_option) |
virtual llvm::ArrayRef< OptionDefinition > | GetDefinitions () |
void | NotifyOptionParsingStarting (ExecutionContext *execution_context) |
llvm::Expected< Args > | Parse (const Args &args, ExecutionContext *execution_context, lldb::PlatformSP platform_sp, bool require_validation) |
Parse the provided arguments. | |
llvm::Expected< Args > | ParseAlias (const Args &args, OptionArgVector *option_arg_vector, std::string &input_line) |
OptionElementVector | ParseForCompletion (const Args &args, uint32_t cursor_index) |
Status | NotifyOptionParsingFinished (ExecutionContext *execution_context) |
virtual Status | SetOptionValue (uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context)=0 |
Set the value of an option. | |
bool | HandleOptionCompletion (lldb_private::CompletionRequest &request, OptionElementVector &option_map, CommandInterpreter &interpreter) |
Handles the generic bits of figuring out whether we are in an option, and if so completing it. | |
virtual void | HandleOptionArgumentCompletion (lldb_private::CompletionRequest &request, OptionElementVector &opt_element_vector, int opt_element_index, CommandInterpreter &interpreter) |
Handles the generic bits of figuring out whether we are in an option, and if so completing it. | |
Public Attributes | |
std::vector< OptionDefinition > | m_option_defs |
OptionInfos | m_option_infos |
bool | m_did_finalize = false |
Additional Inherited Members | |
Protected Types inherited from lldb_private::Options | |
typedef std::set< int > | OptionSet |
typedef std::vector< OptionSet > | OptionSetVector |
Protected Member Functions inherited from lldb_private::Options | |
OptionSetVector & | GetRequiredOptions () |
OptionSetVector & | GetOptionalOptions () |
bool | IsASubset (const OptionSet &set_a, const OptionSet &set_b) |
size_t | OptionsSetDiff (const OptionSet &set_a, const OptionSet &set_b, OptionSet &diffs) |
void | OptionsSetUnion (const OptionSet &set_a, const OptionSet &set_b, OptionSet &union_set) |
virtual void | OptionParsingStarting (ExecutionContext *execution_context)=0 |
virtual Status | OptionParsingFinished (ExecutionContext *execution_context) |
Protected Attributes inherited from lldb_private::Options | |
std::vector< Option > | m_getopt_table |
OptionSet | m_seen_options |
OptionSetVector | m_required_options |
OptionSetVector | m_optional_options |
typedef std::vector<OptionInfo> lldb_private::OptionGroupOptions::OptionInfos |
|
default |
|
overridedefault |
void OptionGroupOptions::Append | ( | OptionGroup * | group | ) |
Append options from a OptionGroup class.
Append all options from group using the exact same option groups that each option is defined with.
[in] | group | A group of options to take option values from and copy their definitions into this class. |
Definition at line 788 of file Options.cpp.
References lldb_private::OptionGroup::GetDefinitions(), m_option_defs, and m_option_infos.
Referenced by CommandObjectBreakpointModify::CommandObjectBreakpointModify(), CommandObjectBreakpointNameAdd::CommandObjectBreakpointNameAdd(), CommandObjectBreakpointNameConfigure::CommandObjectBreakpointNameConfigure(), CommandObjectBreakpointNameDelete::CommandObjectBreakpointNameDelete(), CommandObjectBreakpointNameList::CommandObjectBreakpointNameList(), CommandObjectBreakpointSet::CommandObjectBreakpointSet(), CommandObjectCommandsAlias::CommandObjectCommandsAlias(), lldb_private::CommandObjectDWIMPrint::CommandObjectDWIMPrint(), CommandObjectFrameVariable::CommandObjectFrameVariable(), CommandObjectMemoryFind::CommandObjectMemoryFind(), CommandObjectMemoryRead::CommandObjectMemoryRead(), CommandObjectMemoryRegion::CommandObjectMemoryRegion(), CommandObjectMemoryTagWrite::CommandObjectMemoryTagWrite(), CommandObjectPlatformProcessAttach::CommandObjectPlatformProcessAttach(), CommandObjectPlatformProcessLaunch::CommandObjectPlatformProcessLaunch(), CommandObjectPlatformSelect::CommandObjectPlatformSelect(), CommandObjectPlatformSettings::CommandObjectPlatformSettings(), CommandObjectProcessAttach::CommandObjectProcessAttach(), CommandObjectProcessKDPPacketSend::CommandObjectProcessKDPPacketSend(), CommandObjectProcessLaunch::CommandObjectProcessLaunch(), CommandObjectTargetCreate::CommandObjectTargetCreate(), CommandObjectTargetDelete::CommandObjectTargetDelete(), CommandObjectTargetModulesAdd::CommandObjectTargetModulesAdd(), CommandObjectTargetModulesLoad::CommandObjectTargetModulesLoad(), CommandObjectTargetSymbolsAdd::CommandObjectTargetSymbolsAdd(), CommandObjectTargetVariable::CommandObjectTargetVariable(), CommandObjectThreadSelect::CommandObjectThreadSelect(), CommandObjectThreadStepWithTypeAndScope::CommandObjectThreadStepWithTypeAndScope(), CommandObjectPlatformMkDir::GetOptions(), and CommandObjectPlatformFOpen::GetOptions().
void OptionGroupOptions::Append | ( | OptionGroup * | group, |
llvm::ArrayRef< llvm::StringRef > | exclude_long_options | ||
) |
Append selected options from a OptionGroup class.
Append the subset of options from group, where the "long_option" value is not in exclude_long_options.
[in] | group | A group of options to take option values from and copy their definitions into this class. |
[in] | exclude_long_options | A set of long option strings which indicate which option values values to limit from group. |
Definition at line 817 of file Options.cpp.
References lldb_private::OptionGroup::GetDefinitions(), m_option_defs, and m_option_infos.
void OptionGroupOptions::Append | ( | OptionGroup * | group, |
uint32_t | src_mask, | ||
uint32_t | dst_mask | ||
) |
Append options from a OptionGroup class.
Append options from group that have a usage mask that has any bits in "src_mask" set. After the option definition is copied into the options definitions in this class, set the usage_mask to "dst_mask".
[in] | group | A group of options to take option values from and copy their definitions into this class. |
[in] | src_mask | When copying options from group, you might only want some of the options to be appended to this group. This mask allows you to control which options from group get added. It also allows you to specify the same options from group multiple times for different option sets. |
[in] | dst_mask | Set the usage mask for any copied options to dst_mask after copying the option definition. |
Definition at line 805 of file Options.cpp.
References lldb_private::OptionGroup::GetDefinitions(), m_option_defs, and m_option_infos.
|
inline |
Definition at line 311 of file Options.h.
References m_did_finalize.
Referenced by CommandObjectPlatformSettings::GetOptions(), CommandObjectPlatformMkDir::GetOptions(), and CommandObjectPlatformFOpen::GetOptions().
void OptionGroupOptions::Finalize | ( | ) |
Definition at line 830 of file Options.cpp.
References m_did_finalize.
Referenced by CommandObjectBreakpointModify::CommandObjectBreakpointModify(), CommandObjectBreakpointNameAdd::CommandObjectBreakpointNameAdd(), CommandObjectBreakpointNameConfigure::CommandObjectBreakpointNameConfigure(), CommandObjectBreakpointNameDelete::CommandObjectBreakpointNameDelete(), CommandObjectBreakpointNameList::CommandObjectBreakpointNameList(), CommandObjectBreakpointSet::CommandObjectBreakpointSet(), CommandObjectCommandsAlias::CommandObjectCommandsAlias(), lldb_private::CommandObjectDWIMPrint::CommandObjectDWIMPrint(), CommandObjectFrameVariable::CommandObjectFrameVariable(), CommandObjectMemoryFind::CommandObjectMemoryFind(), CommandObjectMemoryRead::CommandObjectMemoryRead(), CommandObjectMemoryRegion::CommandObjectMemoryRegion(), CommandObjectMemoryTagWrite::CommandObjectMemoryTagWrite(), CommandObjectPlatformProcessAttach::CommandObjectPlatformProcessAttach(), CommandObjectPlatformProcessLaunch::CommandObjectPlatformProcessLaunch(), CommandObjectPlatformSelect::CommandObjectPlatformSelect(), CommandObjectProcessAttach::CommandObjectProcessAttach(), CommandObjectProcessKDPPacketSend::CommandObjectProcessKDPPacketSend(), CommandObjectProcessLaunch::CommandObjectProcessLaunch(), CommandObjectProcessMinidumpDump::CommandObjectProcessMinidumpDump(), CommandObjectTargetCreate::CommandObjectTargetCreate(), CommandObjectTargetDelete::CommandObjectTargetDelete(), CommandObjectTargetModulesAdd::CommandObjectTargetModulesAdd(), CommandObjectTargetModulesLoad::CommandObjectTargetModulesLoad(), CommandObjectTargetSymbolsAdd::CommandObjectTargetSymbolsAdd(), CommandObjectTargetVariable::CommandObjectTargetVariable(), CommandObjectThreadSelect::CommandObjectThreadSelect(), CommandObjectThreadStepWithTypeAndScope::CommandObjectThreadStepWithTypeAndScope(), CommandObjectPlatformConnect::GetOptions(), CommandObjectPlatformSettings::GetOptions(), CommandObjectPlatformMkDir::GetOptions(), and CommandObjectPlatformFOpen::GetOptions().
|
inlineoverridevirtual |
Reimplemented from lldb_private::Options.
Definition at line 320 of file Options.h.
References m_did_finalize, and m_option_defs.
const OptionGroup * OptionGroupOptions::GetGroupWithOption | ( | char | short_opt | ) |
Definition at line 796 of file Options.cpp.
References m_option_defs, m_option_infos, and lldb_private::OptionDefinition::short_option.
Referenced by CommandObjectPlatformMkDir::DoExecute(), and CommandObjectPlatformFOpen::DoExecute().
|
overridevirtual |
Reimplemented from lldb_private::Options.
Definition at line 866 of file Options.cpp.
References error(), m_option_infos, and lldb_private::OptionGroup::OptionParsingFinished().
|
overridevirtual |
Implements lldb_private::Options.
Definition at line 853 of file Options.cpp.
References m_option_infos, and lldb_private::OptionGroup::OptionParsingStarting().
|
overridevirtual |
Set the value of an option.
[in] | option_idx | The index into the "struct option" array that was returned by Options::GetLongOptions(). |
[in] | option_arg | The argument value for the option that the user entered, or nullptr if there is no argument for the current option. |
[in] | execution_context | The execution context to use for evaluating the option. May be nullptr if the option is to be evaluated outside any particular context. |
Implements lldb_private::Options.
Definition at line 834 of file Options.cpp.
References error(), lldb_private::Status::FromErrorString(), m_did_finalize, and m_option_infos.
bool lldb_private::OptionGroupOptions::m_did_finalize = false |
Definition at line 336 of file Options.h.
Referenced by DidFinalize(), Finalize(), GetDefinitions(), CommandObjectPlatformConnect::GetOptions(), and SetOptionValue().
std::vector<OptionDefinition> lldb_private::OptionGroupOptions::m_option_defs |
Definition at line 334 of file Options.h.
Referenced by Append(), GetDefinitions(), and GetGroupWithOption().
OptionInfos lldb_private::OptionGroupOptions::m_option_infos |
Definition at line 335 of file Options.h.
Referenced by Append(), GetGroupWithOption(), OptionParsingFinished(), OptionParsingStarting(), and SetOptionValue().