LLDB mainline
Options.cpp File Reference
#include "lldb/Interpreter/Options.h"
#include <algorithm>
#include <bitset>
#include <map>
#include <set>
#include "lldb/Host/OptionParser.h"
#include "lldb/Host/common/DiagnosticsRendering.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/AnsiTerminal.h"
#include "lldb/Utility/OptionDefinition.h"
#include "lldb/Utility/StreamString.h"
#include "lldb/lldb-defines.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ErrorExtras.h"

Go to the source code of this file.

Classes

class  lldb_private::OptionParseError
 An llvm::Error that represents an option parsing diagnostic. More...

Namespaces

namespace  lldb_private
 A class that represents a running process on the host machine.

Enumerations

enum  OptionDisplayType { eDisplayBestOption , eDisplayShortOption , eDisplayLongOption }

Functions

static bool PrintOption (const OptionDefinition &opt_def, OptionDisplayType display_type, const char *header, const char *footer, bool show_optional, Stream &strm)
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 std::pair< size_t, size_t > FindArgumentIndexForOption (const Args &args, const Option &long_option)
 Find the index of the given option in the arguments.
static std::string BuildShortOptions (const Option *long_options)

Enumeration Type Documentation

◆ OptionDisplayType

Enumerator
eDisplayBestOption 
eDisplayShortOption 
eDisplayLongOption 

Definition at line 309 of file Options.cpp.

Function Documentation

◆ BuildShortOptions()

◆ FindArgumentIndexForOption()

std::pair< size_t, size_t > FindArgumentIndexForOption ( const Args & args,
const Option & long_option )
static

Find the index of the given option in the arguments.

If the option takes an argument, the second index is the index of the value in args. Otherwise, the second index is LLDB_INVALID_INDEX64.

Definition at line 897 of file Options.cpp.

References lldb_private::Option::definition, lldb_private::OptionParser::eNoArgument, LLDB_INVALID_INDEX64, lldb_private::OptionDefinition::long_option, lldb_private::OptionDefinition::option_has_arg, and lldb_private::Option::val.

Referenced by lldb_private::Options::ParseAlias().

◆ FindOriginalIndex()

size_t FindOriginalIndex ( const char * arg,
const Args & original )
static

◆ FindOriginalIter()

Args::const_iterator FindOriginalIter ( const char * arg,
const Args & original )
static

◆ GetArgvForParsing()

std::vector< char * > GetArgvForParsing ( const Args & args)
static

◆ PrintOption()

◆ ReconstituteArgsAfterParsing()

Args ReconstituteArgsAfterParsing ( llvm::ArrayRef< char * > parsed,
const Args & original )
static