Files
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
bdwgc
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm-project
clang
clang-tools-extra
compiler-rt
eng
libcxx
libcxxabi
libunwind
lld
lldb
cmake
docs
examples
include
lit
lldb.xcodeproj
lldb.xcworkspace
packages
resources
scripts
source
third_party
tools
argdumper
compact-unwind
darwin-debug
darwin-threads
debugserver
driver
install-headers
intel-features
lldb-mi
CMakeLists.txt
MICmdArgContext.cpp
MICmdArgContext.h
MICmdArgSet.cpp
MICmdArgSet.h
MICmdArgValBase.cpp
MICmdArgValBase.h
MICmdArgValConsume.cpp
MICmdArgValConsume.h
MICmdArgValFile.cpp
MICmdArgValFile.h
MICmdArgValListBase.cpp
MICmdArgValListBase.h
MICmdArgValListOfN.cpp
MICmdArgValListOfN.h
MICmdArgValNumber.cpp
MICmdArgValNumber.h
MICmdArgValOptionLong.cpp
MICmdArgValOptionLong.h
MICmdArgValOptionShort.cpp
MICmdArgValOptionShort.h
MICmdArgValPrintValues.cpp
MICmdArgValPrintValues.h
MICmdArgValString.cpp
MICmdArgValString.h
MICmdArgValThreadGrp.cpp
MICmdArgValThreadGrp.h
MICmdBase.cpp
MICmdBase.h
MICmdCmd.cpp
MICmdCmd.h
MICmdCmdBreak.cpp
MICmdCmdBreak.h
MICmdCmdData.cpp
MICmdCmdData.h
MICmdCmdEnviro.cpp
MICmdCmdEnviro.h
MICmdCmdExec.cpp
MICmdCmdExec.h
MICmdCmdFile.cpp
MICmdCmdFile.h
MICmdCmdGdbInfo.cpp
MICmdCmdGdbInfo.h
MICmdCmdGdbSet.cpp
MICmdCmdGdbSet.h
MICmdCmdGdbShow.cpp
MICmdCmdGdbShow.h
MICmdCmdGdbThread.cpp
MICmdCmdGdbThread.h
MICmdCmdMiscellanous.cpp
MICmdCmdMiscellanous.h
MICmdCmdStack.cpp
MICmdCmdStack.h
MICmdCmdSupportInfo.cpp
MICmdCmdSupportInfo.h
MICmdCmdSupportList.cpp
MICmdCmdSupportList.h
MICmdCmdSymbol.cpp
MICmdCmdSymbol.h
MICmdCmdTarget.cpp
MICmdCmdTarget.h
MICmdCmdThread.cpp
MICmdCmdThread.h
MICmdCmdTrace.cpp
MICmdCmdTrace.h
MICmdCmdVar.cpp
MICmdCmdVar.h
MICmdCommands.cpp
MICmdCommands.h
MICmdData.cpp
MICmdData.h
MICmdFactory.cpp
MICmdFactory.h
MICmdInterpreter.cpp
MICmdInterpreter.h
MICmdInvoker.cpp
MICmdInvoker.h
MICmdMgr.cpp
MICmdMgr.h
MICmdMgrSetCmdDeleteCallback.cpp
MICmdMgrSetCmdDeleteCallback.h
MICmnBase.cpp
MICmnBase.h
MICmnConfig.h
MICmnLLDBBroadcaster.cpp
MICmnLLDBBroadcaster.h
MICmnLLDBDebugSessionInfo.cpp
MICmnLLDBDebugSessionInfo.h
MICmnLLDBDebugSessionInfoVarObj.cpp
MICmnLLDBDebugSessionInfoVarObj.h
MICmnLLDBDebugger.cpp
MICmnLLDBDebugger.h
MICmnLLDBDebuggerHandleEvents.cpp
MICmnLLDBDebuggerHandleEvents.h
MICmnLLDBProxySBValue.cpp
MICmnLLDBProxySBValue.h
MICmnLLDBUtilSBValue.cpp
MICmnLLDBUtilSBValue.h
MICmnLog.cpp
MICmnLog.h
MICmnLogMediumFile.cpp
MICmnLogMediumFile.h
MICmnMIOutOfBandRecord.cpp
MICmnMIOutOfBandRecord.h
MICmnMIResultRecord.cpp
MICmnMIResultRecord.h
MICmnMIValue.cpp
MICmnMIValue.h
MICmnMIValueConst.cpp
MICmnMIValueConst.h
MICmnMIValueList.cpp
MICmnMIValueList.h
MICmnMIValueResult.cpp
MICmnMIValueResult.h
MICmnMIValueTuple.cpp
MICmnMIValueTuple.h
MICmnResources.cpp
MICmnResources.h
MICmnStreamStderr.cpp
MICmnStreamStderr.h
MICmnStreamStdin.cpp
MICmnStreamStdin.h
MICmnStreamStdout.cpp
MICmnStreamStdout.h
MICmnThreadMgrStd.cpp
MICmnThreadMgrStd.h
MIDataTypes.h
MIDriver.cpp
MIDriver.h
MIDriverBase.cpp
MIDriverBase.h
MIDriverMain.cpp
MIDriverMgr.cpp
MIDriverMgr.h
MIExtensions.txt
MIReadMe.txt
MIUtilDateTimeStd.cpp
MIUtilDateTimeStd.h
MIUtilDebug.cpp
MIUtilDebug.h
MIUtilFileStd.cpp
MIUtilFileStd.h
MIUtilMapIdToVariant.cpp
MIUtilMapIdToVariant.h
MIUtilSingletonBase.h
MIUtilSingletonHelper.h
MIUtilString.cpp
MIUtilString.h
MIUtilThreadBaseStd.cpp
MIUtilThreadBaseStd.h
MIUtilVariant.cpp
MIUtilVariant.h
Platform.h
lldb-Info.plist
lldb-mi.exports
lldb-perf
lldb-server
lldb-test
CMakeLists.txt
unittests
utils
www
.arcconfig
.clang-format
.gitignore
CMakeLists.txt
CODE_OWNERS.txt
INSTALL.txt
LICENSE.TXT
use_lldb_suite_root.py
llvm
nuget
openmp
polly
Directory.Build.props
Directory.Build.targets
NuGet.config
azure-pipelines.yml
build.cmd
build.sh
dir.common.props
global.json
llvm.proj
mxe-Win64.cmake.in
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
llvm
m4
man
mcs
mono
msvc
netcore
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
linux-packaging-mono/external/llvm-project/lldb/tools/lldb-mi/MICmdArgSet.h

113 lines
4.4 KiB
C
Raw Normal View History

//===-- MICmdArgSet.h -------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#pragma once
// C Includes
// C++ Includes
#include <vector>
// Other libraries and framework includes
// Project includes
#include "MICmdArgContext.h"
#include "MICmnBase.h"
// Declarations:
class CMICmdArgValBase;
//++
//============================================================================
// Details: MI common code class. Command arguments container class.
// A command may have one or more arguments of which some may be
// optional.
// *this class contains a list of the command's arguments which are
// validates against the commands argument options string (context
// string).
// Each argument tries to extract the value it is looking for.
// Argument objects added to *this container are owned by this
// container
// and are deleted when this container goes out of scope. Allocate
// argument
// objects on the heap.
// It is assumed the arguments to be parsed are read from left to right
// in
// order. The order added to *this container is the order they will
// parsed.
//--
class CMICmdArgSet : public CMICmnBase {
// Classes:
public:
//++
// Description: ArgSet's interface for command arguments to implement.
//--
class IArg {
public:
virtual bool GetFound() const = 0;
virtual bool GetIsHandledByCmd() const = 0;
virtual bool GetIsMandatory() const = 0;
virtual bool GetIsMissingOptions() const = 0;
virtual const CMIUtilString &GetName() const = 0;
virtual bool GetValid() const = 0;
virtual bool Validate(CMICmdArgContext &vwArgContext) = 0;
virtual ~IArg() = default;
};
// Typedefs:
typedef std::vector<CMICmdArgValBase *> SetCmdArgs_t;
// Methods:
CMICmdArgSet();
void Add(CMICmdArgValBase *vArg);
bool GetArg(const CMIUtilString &vArgName, CMICmdArgValBase *&vpArg) const;
const SetCmdArgs_t &GetArgsThatAreMissing() const;
const SetCmdArgs_t &GetArgsThatInvalid() const;
size_t GetCount() const;
bool IsArgContextEmpty() const;
bool IsArgsPresentButNotHandledByCmd() const;
void WarningArgsNotHandledbyCmdLogFile(const CMIUtilString &vrCmdName);
bool Validate(const CMIUtilString &vStrMiCmd,
CMICmdArgContext &vwCmdArgsText);
// Overrideable:
~CMICmdArgSet() override;
// Methods:
private:
const SetCmdArgs_t &GetArgsNotHandledByCmd() const;
void Destroy(); // Release resources used by *this object
bool ValidationFormErrorMessages(const CMICmdArgContext &vwCmdArgsText);
// Attributes:
bool m_bIsArgsPresentButNotHandledByCmd; // True = The driver's client
// presented the command with options
// recognised but not handled by
// a command, false = all args handled
SetCmdArgs_t m_setCmdArgs; // The set of arguments that are that the command
// is expecting to find in the options string
SetCmdArgs_t m_setCmdArgsThatAreMissing; // The set of arguments that are
// required by the command but are
// missing
SetCmdArgs_t m_setCmdArgsThatNotValid; // The set of arguments found in the
// text but for some reason unable to
// extract a value
SetCmdArgs_t m_setCmdArgsNotHandledByCmd; // The set of arguments specified by
// the command which were present to
// the command but not handled
SetCmdArgs_t m_setCmdArgsMissingInfo; // The set of arguments that were
// present but were found to be missing
// additional information i.e.
// --thread 3 but 3 is missing
CMICmdArgContext m_cmdArgContext; // Copy of the command's argument options
// text before validate takes place (empties
// it of content)
const CMIUtilString m_constStrCommaSpc;
};