[lldb-mi] Clean up CMICmdArgSet usage.

Summary:
CMICmdArgSet stores a vector of non-const pointers to the arguments
that it is validating. It owns them and is responsible for deleting
them.

We don't need to pass a const reference to the argument to
CMICmdArgSet::Add and then take the address and const_cast it
when we can just pass the argument pointer in directly.

This lets us remove some noise at every call site for CMICmdArgSet::Add
and then clean up a couple of bits inside CMICmdArgSet to remove
const_casts.

Reviewers: abidh, ki.stfu, domipheus

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D12878

llvm-svn: 247677
This commit is contained in:
Bruce Mitchener 2015-09-15 12:00:08 +00:00
parent 9c8453fb4b
commit 7dd8c12d84
17 changed files with 141 additions and 142 deletions

View File

@ -94,10 +94,9 @@ CMICmdArgSet::IsArgsPresentButNotHandledByCmd() const
// Throws: None.
//--
void
CMICmdArgSet::Add(const CMICmdArgValBase &vArg)
CMICmdArgSet::Add(CMICmdArgValBase *vArg)
{
CMICmdArgValBase *pArg = const_cast<CMICmdArgValBase *>(&vArg);
m_setCmdArgs.push_back(pArg);
m_setCmdArgs.push_back(vArg);
}
//++ ------------------------------------------------------------------------------------
@ -169,25 +168,25 @@ CMICmdArgSet::Validate(const CMIUtilString &vStrMiCmd, CMICmdArgContext &vwCmdAr
SetCmdArgs_t::const_iterator it = m_setCmdArgs.begin();
while (it != m_setCmdArgs.end())
{
const CMICmdArgValBase *pArg(*it);
CMICmdArgValBase *pArg = *it;
if (!const_cast<CMICmdArgValBase *>(pArg)->Validate(vwCmdArgsText))
if (!pArg->Validate(vwCmdArgsText))
{
if (pArg->GetFound())
{
if (pArg->GetIsMissingOptions())
m_setCmdArgsMissingInfo.push_back(const_cast<CMICmdArgValBase *>(pArg));
m_setCmdArgsMissingInfo.push_back(pArg);
else if (!pArg->GetValid())
m_setCmdArgsThatNotValid.push_back(const_cast<CMICmdArgValBase *>(pArg));
m_setCmdArgsThatNotValid.push_back(pArg);
}
else if (pArg->GetIsMandatory())
m_setCmdArgsThatAreMissing.push_back(const_cast<CMICmdArgValBase *>(pArg));
m_setCmdArgsThatAreMissing.push_back(pArg);
}
if (pArg->GetFound() && !pArg->GetIsHandledByCmd())
{
m_bIsArgsPresentButNotHandledByCmd = true;
m_setCmdArgsNotHandledByCmd.push_back(const_cast<CMICmdArgValBase *>(pArg));
m_setCmdArgsNotHandledByCmd.push_back(pArg);
}
// Next

View File

@ -60,7 +60,7 @@ class CMICmdArgSet : public CMICmnBase
public:
/* ctor */ CMICmdArgSet();
void Add(const CMICmdArgValBase &vArg);
void Add(CMICmdArgValBase *vArg);
bool GetArg(const CMIUtilString &vArgName, CMICmdArgValBase *&vpArg) const;
const SetCmdArgs_t &GetArgsThatAreMissing() const;
const SetCmdArgs_t &GetArgsThatInvalid() const;

View File

@ -89,21 +89,21 @@ CMICmdCmdBreakInsert::~CMICmdCmdBreakInsert()
bool
CMICmdCmdBreakInsert::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedTempBrkPt, false, true)));
// Not implemented m_setCmdArgs.Add( *(new CMICmdArgValOptionShort( m_constStrArgNamedHWBrkPt, false, false ) ) );
m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedPendinfBrkPt, false, true,
CMICmdArgValListBase::eArgValType_StringQuotedNumberPath, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedDisableBrkPt, false, false)));
// Not implemented m_setCmdArgs.Add( *(new CMICmdArgValOptionShort( m_constStrArgNamedTracePt, false, false ) ) );
m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedConditionalBrkPt, false, true,
CMICmdArgValListBase::eArgValType_StringQuoted, 1)));
m_setCmdArgs.Add(new CMICmdArgValOptionShort(m_constStrArgNamedTempBrkPt, false, true));
// Not implemented m_setCmdArgs.Add(new CMICmdArgValOptionShort( m_constStrArgNamedHWBrkPt, false, false));
m_setCmdArgs.Add(new CMICmdArgValOptionShort(m_constStrArgNamedPendinfBrkPt, false, true,
CMICmdArgValListBase::eArgValType_StringQuotedNumberPath, 1));
m_setCmdArgs.Add(new CMICmdArgValOptionShort(m_constStrArgNamedDisableBrkPt, false, false));
// Not implemented m_setCmdArgs.Add(new CMICmdArgValOptionShort( m_constStrArgNamedTracePt, false, false));
m_setCmdArgs.Add(new CMICmdArgValOptionShort(m_constStrArgNamedConditionalBrkPt, false, true,
CMICmdArgValListBase::eArgValType_StringQuoted, 1));
m_setCmdArgs.Add(
*(new CMICmdArgValOptionShort(m_constStrArgNamedInoreCnt, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedRestrictBrkPtToThreadId, false, true,
CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedLocation, false, true)));
new CMICmdArgValOptionShort(m_constStrArgNamedInoreCnt, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValOptionShort(m_constStrArgNamedRestrictBrkPtToThreadId, false, true,
CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgNamedLocation, false, true));
m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGroup, false, true, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
new CMICmdArgValOptionLong(m_constStrArgNamedThreadGroup, false, true, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
return ParseValidateCmdOptions();
}
@ -405,8 +405,8 @@ bool
CMICmdCmdBreakDelete::ParseArgs()
{
m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true, CMICmdArgValListBase::eArgValType_Number)));
new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
m_setCmdArgs.Add(new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true, CMICmdArgValListBase::eArgValType_Number));
return ParseValidateCmdOptions();
}
@ -524,8 +524,8 @@ bool
CMICmdCmdBreakDisable::ParseArgs()
{
m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true, CMICmdArgValListBase::eArgValType_Number)));
new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
m_setCmdArgs.Add(new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true, CMICmdArgValListBase::eArgValType_Number));
return ParseValidateCmdOptions();
}
@ -663,8 +663,8 @@ bool
CMICmdCmdBreakEnable::ParseArgs()
{
m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true, CMICmdArgValListBase::eArgValType_Number)));
new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
m_setCmdArgs.Add(new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true, CMICmdArgValListBase::eArgValType_Number));
return ParseValidateCmdOptions();
}
@ -803,9 +803,9 @@ bool
CMICmdCmdBreakAfter::ParseArgs()
{
m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNamedNumber, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNamedCount, true, true)));
new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNamedNumber, true, true));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNamedCount, true, true));
return ParseValidateCmdOptions();
}
@ -934,11 +934,11 @@ bool
CMICmdCmdBreakCondition::ParseArgs()
{
m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNamedNumber, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedExpr, true, true, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedExprNoQuotes, false, false,
CMICmdArgValListBase::eArgValType_StringQuotedNumber)));
new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNamedNumber, true, true));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgNamedExpr, true, true, true, true));
m_setCmdArgs.Add(new CMICmdArgValListOfN(m_constStrArgNamedExprNoQuotes, false, false,
CMICmdArgValListBase::eArgValType_StringQuotedNumber));
return ParseValidateCmdOptions();
}

View File

@ -90,9 +90,9 @@ CMICmdCmdDataEvaluateExpression::~CMICmdCmdDataEvaluateExpression()
bool
CMICmdCmdDataEvaluateExpression::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, false, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, false, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgExpr, true, true, true, true)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, false, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgFrame, false, false, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgExpr, true, true, true, true));
return ParseValidateCmdOptions();
}
@ -277,13 +277,13 @@ CMICmdCmdDataDisassemble::~CMICmdCmdDataDisassemble()
bool
CMICmdCmdDataDisassemble::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(
*(new CMICmdArgValOptionShort(m_constStrArgAddrStart, true, true, CMICmdArgValListBase::eArgValType_StringQuotedNumber, 1)));
new CMICmdArgValOptionShort(m_constStrArgAddrStart, true, true, CMICmdArgValListBase::eArgValType_StringQuotedNumber, 1));
m_setCmdArgs.Add(
*(new CMICmdArgValOptionShort(m_constStrArgAddrEnd, true, true, CMICmdArgValListBase::eArgValType_StringQuotedNumber, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValConsume(m_constStrArgConsume, true)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgMode, true, true)));
new CMICmdArgValOptionShort(m_constStrArgAddrEnd, true, true, CMICmdArgValListBase::eArgValType_StringQuotedNumber, 1));
m_setCmdArgs.Add(new CMICmdArgValConsume(m_constStrArgConsume, true));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgMode, true, true));
return ParseValidateCmdOptions();
}
@ -506,11 +506,11 @@ CMICmdCmdDataReadMemoryBytes::~CMICmdCmdDataReadMemoryBytes()
bool
CMICmdCmdDataReadMemoryBytes::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgByteOffset, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgAddrExpr, true, true, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumBytes, true, true)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValOptionShort(m_constStrArgByteOffset, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgAddrExpr, true, true, true, true));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNumBytes, true, true));
return ParseValidateCmdOptions();
}
@ -822,8 +822,8 @@ CMICmdCmdDataListRegisterNames::~CMICmdCmdDataListRegisterNames()
bool
CMICmdCmdDataListRegisterNames::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThreadGroup, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgRegNo, false, false, CMICmdArgValListBase::eArgValType_Number)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThreadGroup, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
m_setCmdArgs.Add(new CMICmdArgValListOfN(m_constStrArgRegNo, false, false, CMICmdArgValListBase::eArgValType_Number));
return ParseValidateCmdOptions();
}
@ -1012,10 +1012,10 @@ CMICmdCmdDataListRegisterValues::~CMICmdCmdDataListRegisterValues()
bool
CMICmdCmdDataListRegisterValues::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, false, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgSkip, false, false)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgFormat, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgRegNo, false, true, CMICmdArgValListBase::eArgValType_Number)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, false, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgSkip, false, false));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgFormat, true, true));
m_setCmdArgs.Add(new CMICmdArgValListOfN(m_constStrArgRegNo, false, true, CMICmdArgValListBase::eArgValType_Number));
return ParseValidateCmdOptions();
}
@ -1322,10 +1322,10 @@ CMICmdCmdDataWriteMemoryBytes::~CMICmdCmdDataWriteMemoryBytes()
bool
CMICmdCmdDataWriteMemoryBytes::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, false, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgAddr, true, true, false, true)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgContents, true, true, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgCount, false, true, false, true)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, false, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgAddr, true, true, false, true));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgContents, true, true, true, true));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgCount, false, true, false, true));
return ParseValidateCmdOptions();
}
@ -1444,12 +1444,12 @@ CMICmdCmdDataWriteMemory::~CMICmdCmdDataWriteMemory()
bool
CMICmdCmdDataWriteMemory::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, false, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgOffset, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgAddr, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgD, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgContents, true, true)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, false, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValOptionShort(m_constStrArgOffset, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgAddr, true, true));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgD, true, true));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNumber, true, true));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgContents, true, true));
return ParseValidateCmdOptions();
}
@ -1587,7 +1587,7 @@ CMICmdCmdDataInfoLine::~CMICmdCmdDataInfoLine()
bool
CMICmdCmdDataInfoLine::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgLocation, true, true)));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgLocation, true, true));
return ParseValidateCmdOptions();
}

View File

@ -57,7 +57,7 @@ CMICmdCmdEnvironmentCd::~CMICmdCmdEnvironmentCd()
bool
CMICmdCmdEnvironmentCd::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValFile(m_constStrArgNamePathDir, true, true)));
m_setCmdArgs.Add(new CMICmdArgValFile(m_constStrArgNamePathDir, true, true));
CMICmdArgContext argCntxt(m_cmdData.strMiCmdOption);
return ParseValidateCmdOptions();
}

View File

@ -315,8 +315,8 @@ CMICmdCmdExecNext::~CMICmdCmdExecNext()
bool
CMICmdCmdExecNext::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, false, false)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNumber, false, false));
return ParseValidateCmdOptions();
}
@ -441,8 +441,8 @@ CMICmdCmdExecStep::~CMICmdCmdExecStep()
bool
CMICmdCmdExecStep::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, false, false)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNumber, false, false));
return ParseValidateCmdOptions();
}
@ -567,8 +567,8 @@ CMICmdCmdExecNextInstruction::~CMICmdCmdExecNextInstruction()
bool
CMICmdCmdExecNextInstruction::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, false, false)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNumber, false, false));
return ParseValidateCmdOptions();
}
@ -693,8 +693,8 @@ CMICmdCmdExecStepInstruction::~CMICmdCmdExecStepInstruction()
bool
CMICmdCmdExecStepInstruction::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, false, false)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNumber, false, false));
return ParseValidateCmdOptions();
}
@ -819,8 +819,8 @@ CMICmdCmdExecFinish::~CMICmdCmdExecFinish()
bool
CMICmdCmdExecFinish::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, false, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgFrame, false, false, CMICmdArgValListBase::eArgValType_Number, 1));
return ParseValidateCmdOptions();
}
@ -1047,7 +1047,7 @@ bool
CMICmdCmdExecArguments::ParseArgs()
{
m_setCmdArgs.Add(
*(new CMICmdArgValListOfN(m_constStrArgArguments, false, true, CMICmdArgValListBase::eArgValType_StringAnything)));
new CMICmdArgValListOfN(m_constStrArgArguments, false, true, CMICmdArgValListBase::eArgValType_StringAnything));
return ParseValidateCmdOptions();
}

View File

@ -67,12 +67,12 @@ bool
CMICmdCmdFileExecAndSymbols::ParseArgs()
{
m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValFile(m_constStrArgNameFile, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedPlatformName, false, true,
CMICmdArgValListBase::eArgValType_String, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedRemotePath, false, true,
CMICmdArgValListBase::eArgValType_StringQuotedNumberPath, 1)));
new CMICmdArgValOptionLong(m_constStrArgThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
m_setCmdArgs.Add(new CMICmdArgValFile(m_constStrArgNameFile, true, true));
m_setCmdArgs.Add(new CMICmdArgValOptionShort(m_constStrArgNamedPlatformName, false, true,
CMICmdArgValListBase::eArgValType_String, 1));
m_setCmdArgs.Add(new CMICmdArgValOptionShort(m_constStrArgNamedRemotePath, false, true,
CMICmdArgValListBase::eArgValType_StringQuotedNumberPath, 1));
return ParseValidateCmdOptions();
}

View File

@ -68,7 +68,7 @@ CMICmdCmdGdbInfo::~CMICmdCmdGdbInfo()
bool
CMICmdCmdGdbInfo::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedPrint, true, true)));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgNamedPrint, true, true));
return ParseValidateCmdOptions();
}

View File

@ -73,9 +73,9 @@ bool
CMICmdCmdGdbSet::ParseArgs()
{
m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
m_setCmdArgs.Add(
*(new CMICmdArgValListOfN(m_constStrArgNamedGdbOption, true, true, CMICmdArgValListBase::eArgValType_StringAnything)));
new CMICmdArgValListOfN(m_constStrArgNamedGdbOption, true, true, CMICmdArgValListBase::eArgValType_StringAnything));
return ParseValidateCmdOptions();
}

View File

@ -77,9 +77,9 @@ bool
CMICmdCmdGdbShow::ParseArgs()
{
m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
m_setCmdArgs.Add(
*(new CMICmdArgValListOfN(m_constStrArgNamedGdbOption, true, true, CMICmdArgValListBase::eArgValType_StringAnything)));
new CMICmdArgValListOfN(m_constStrArgNamedGdbOption, true, true, CMICmdArgValListBase::eArgValType_StringAnything));
return ParseValidateCmdOptions();
}

View File

@ -171,11 +171,11 @@ CMICmdCmdListThreadGroups::~CMICmdCmdListThreadGroups()
bool
CMICmdCmdListThreadGroups::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgNamedAvailable, false, true)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgNamedAvailable, false, true));
m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedRecurse, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedGroup, false, true, CMICmdArgValListBase::eArgValType_Number)));
m_setCmdArgs.Add(*(new CMICmdArgValThreadGrp(m_constStrArgNamedThreadGroup, false, true)));
new CMICmdArgValOptionLong(m_constStrArgNamedRecurse, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValListOfN(m_constStrArgNamedGroup, false, true, CMICmdArgValListBase::eArgValType_Number));
m_setCmdArgs.Add(new CMICmdArgValThreadGrp(m_constStrArgNamedThreadGroup, false, true));
return ParseValidateCmdOptions();
}
@ -430,8 +430,8 @@ CMICmdCmdInterpreterExec::~CMICmdCmdInterpreterExec()
bool
CMICmdCmdInterpreterExec::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedInterpreter, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedCommand, true, true, true)));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgNamedInterpreter, true, true));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgNamedCommand, true, true, true));
return ParseValidateCmdOptions();
}

View File

@ -74,8 +74,8 @@ CMICmdCmdStackInfoDepth::~CMICmdCmdStackInfoDepth()
bool
CMICmdCmdStackInfoDepth::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgMaxDepth, false, false)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgMaxDepth, false, false));
return ParseValidateCmdOptions();
}
@ -300,9 +300,9 @@ CMICmdCmdStackListFrames::~CMICmdCmdStackListFrames()
bool
CMICmdCmdStackListFrames::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrameLow, false, true)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrameHigh, false, true)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgFrameLow, false, true));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgFrameHigh, false, true));
return ParseValidateCmdOptions();
}
@ -481,10 +481,10 @@ CMICmdCmdStackListArguments::~CMICmdCmdStackListArguments()
bool
CMICmdCmdStackListArguments::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrameLow, false, true)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrameHigh, false, true)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgFrameLow, false, true));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgFrameHigh, false, true));
return ParseValidateCmdOptions();
}
@ -666,9 +666,9 @@ CMICmdCmdStackListLocals::~CMICmdCmdStackListLocals()
bool
CMICmdCmdStackListLocals::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true));
return ParseValidateCmdOptions();
}
@ -829,9 +829,9 @@ CMICmdCmdStackListVariables::~CMICmdCmdStackListVariables()
bool
CMICmdCmdStackListVariables::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true));
return ParseValidateCmdOptions();
}
@ -988,7 +988,7 @@ CMICmdCmdStackSelectFrame::~CMICmdCmdStackSelectFrame()
bool
CMICmdCmdStackSelectFrame::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrame, true, false)));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgFrame, true, false));
return ParseValidateCmdOptions();
}

View File

@ -58,7 +58,7 @@ CMICmdCmdSupportInfoMiCmdQuery::~CMICmdCmdSupportInfoMiCmdQuery()
bool
CMICmdCmdSupportInfoMiCmdQuery::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgCmdName, true, true)));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgCmdName, true, true));
return ParseValidateCmdOptions();
}

View File

@ -60,7 +60,7 @@ CMICmdCmdSymbolListLines::~CMICmdCmdSymbolListLines()
bool
CMICmdCmdSymbolListLines::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValFile(m_constStrArgNameFile, true, true)));
m_setCmdArgs.Add(new CMICmdArgValFile(m_constStrArgNameFile, true, true));
return ParseValidateCmdOptions();
}

View File

@ -67,8 +67,8 @@ CMICmdCmdTargetSelect::~CMICmdCmdTargetSelect()
bool
CMICmdCmdTargetSelect::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedType, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedParameters, true, true)));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgNamedType, true, true));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgNamedParameters, true, true));
return ParseValidateCmdOptions();
}
@ -250,10 +250,10 @@ CMICmdCmdTargetAttach::~CMICmdCmdTargetAttach()
bool
CMICmdCmdTargetAttach::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgPid, false, true)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedFile, false, true,
CMICmdArgValListBase::eArgValType_String, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgWaitFor, false, true)));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgPid, false, true));
m_setCmdArgs.Add(new CMICmdArgValOptionShort(m_constStrArgNamedFile, false, true,
CMICmdArgValListBase::eArgValType_String, 1));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgWaitFor, false, true));
return ParseValidateCmdOptions();
}

View File

@ -64,7 +64,7 @@ CMICmdCmdThreadInfo::~CMICmdCmdThreadInfo()
bool
CMICmdCmdThreadInfo::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNamedThreadId, false, true)));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNamedThreadId, false, true));
return ParseValidateCmdOptions();
}

View File

@ -88,13 +88,13 @@ CMICmdCmdVarCreate::~CMICmdCmdVarCreate()
bool
CMICmdCmdVarCreate::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgThreadGroup, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, false, true)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgFrameAddr, false, true)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgExpression, true, true, true, true)));
new CMICmdArgValOptionLong(m_constStrArgThreadGroup, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, false, true));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgFrameAddr, false, true));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgExpression, true, true, true, true));
return ParseValidateCmdOptions();
}
@ -353,8 +353,8 @@ CMICmdCmdVarUpdate::~CMICmdCmdVarUpdate()
bool
CMICmdCmdVarUpdate::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, false, true)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
m_setCmdArgs.Add(new CMICmdArgValPrintValues(m_constStrArgPrintValues, false, true));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
return ParseValidateCmdOptions();
}
@ -558,7 +558,7 @@ CMICmdCmdVarDelete::CMICmdCmdVarDelete()
bool
CMICmdCmdVarDelete::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
return ParseValidateCmdOptions();
}
@ -671,8 +671,8 @@ CMICmdCmdVarAssign::~CMICmdCmdVarAssign()
bool
CMICmdCmdVarAssign::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgExpression, true, true)));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgExpression, true, true));
return ParseValidateCmdOptions();
}
@ -804,8 +804,8 @@ CMICmdCmdVarSetFormat::~CMICmdCmdVarSetFormat()
bool
CMICmdCmdVarSetFormat::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgFormatSpec, true, true)));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgFormatSpec, true, true));
return ParseValidateCmdOptions();
}
@ -951,10 +951,10 @@ CMICmdCmdVarListChildren::~CMICmdCmdVarListChildren()
bool
CMICmdCmdVarListChildren::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, false, true)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrom, false, true)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgTo, false, true)));
m_setCmdArgs.Add(new CMICmdArgValPrintValues(m_constStrArgPrintValues, false, true));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgFrom, false, true));
m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgTo, false, true));
return ParseValidateCmdOptions();
}
@ -1159,8 +1159,8 @@ bool
CMICmdCmdVarEvaluateExpression::ParseArgs()
{
m_setCmdArgs.Add(
*(new CMICmdArgValOptionShort(m_constStrArgFormatSpec, false, false, CMICmdArgValListBase::eArgValType_String, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
new CMICmdArgValOptionShort(m_constStrArgFormatSpec, false, false, CMICmdArgValListBase::eArgValType_String, 1));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
return ParseValidateCmdOptions();
}
@ -1286,7 +1286,7 @@ CMICmdCmdVarInfoPathExpression::~CMICmdCmdVarInfoPathExpression()
bool
CMICmdCmdVarInfoPathExpression::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
return ParseValidateCmdOptions();
}
@ -1446,7 +1446,7 @@ CMICmdCmdVarShowAttributes::~CMICmdCmdVarShowAttributes()
bool
CMICmdCmdVarShowAttributes::ParseArgs()
{
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
return ParseValidateCmdOptions();
}