[Lldb-commits] [lldb] r242911 - [lldb-mi] Remove unused bool results.
Bruce Mitchener
bruce.mitchener at gmail.com
Wed Jul 22 10:07:27 PDT 2015
Author: brucem
Date: Wed Jul 22 12:07:27 2015
New Revision: 242911
URL: http://llvm.org/viewvc/llvm-project?rev=242911&view=rev
Log:
[lldb-mi] Remove unused bool results.
Summary:
Many methods, in particular various 'Add' methods didn't have
any actual failure scenarios that were being emitted. This meant
that a lot of surrounding code could be simplified.
Reviewers: abidh, ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11412
Modified:
lldb/trunk/tools/lldb-mi/MICmdArgSet.cpp
lldb/trunk/tools/lldb-mi/MICmdArgSet.h
lldb/trunk/tools/lldb-mi/MICmdBase.cpp
lldb/trunk/tools/lldb-mi/MICmdBase.h
lldb/trunk/tools/lldb-mi/MICmdCmdBreak.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdData.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdData.h
lldb/trunk/tools/lldb-mi/MICmdCmdEnviro.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdFile.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdGdbInfo.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdGdbShow.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdMiscellanous.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdStack.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdSupportInfo.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdSymbol.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdTarget.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdThread.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp
lldb/trunk/tools/lldb-mi/MICmdCmdVar.h
lldb/trunk/tools/lldb-mi/MICmdFactory.cpp
lldb/trunk/tools/lldb-mi/MICmdInvoker.h
lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h
lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.h
lldb/trunk/tools/lldb-mi/MICmnMIResultRecord.cpp
lldb/trunk/tools/lldb-mi/MICmnMIResultRecord.h
lldb/trunk/tools/lldb-mi/MICmnMIValueList.cpp
lldb/trunk/tools/lldb-mi/MICmnMIValueList.h
lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp
lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h
lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp
lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h
Modified: lldb/trunk/tools/lldb-mi/MICmdArgSet.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgSet.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdArgSet.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdArgSet.cpp Wed Jul 22 12:07:27 2015
@@ -90,17 +90,14 @@ CMICmdArgSet::IsArgsPresentButNotHandled
// Details: Add the list of command's arguments to parse and validate another one.
// Type: Method.
// Args: vArg - (R) A command argument object.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmdArgSet::Add(const CMICmdArgValBase &vArg)
{
CMICmdArgValBase *pArg = const_cast<CMICmdArgValBase *>(&vArg);
m_setCmdArgs.push_back(pArg);
-
- return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdArgSet.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgSet.h?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdArgSet.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmdArgSet.h Wed Jul 22 12:07:27 2015
@@ -63,7 +63,7 @@ class CMICmdArgSet : public CMICmnBase
public:
/* ctor */ CMICmdArgSet(void);
- bool Add(const CMICmdArgValBase &vArg);
+ void Add(const CMICmdArgValBase &vArg);
bool GetArg(const CMIUtilString &vArgName, CMICmdArgValBase *&vpArg) const;
const SetCmdArgs_t &GetArgsThatAreMissing(void) const;
const SetCmdArgs_t &GetArgsThatInvalid(void) const;
Modified: lldb/trunk/tools/lldb-mi/MICmdBase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdBase.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdBase.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdBase.cpp Wed Jul 22 12:07:27 2015
@@ -83,16 +83,13 @@ CMICmdBase::GetMiCmd(void) const
// provide data about its status or provide information to other objects.
// Type: Overridden.
// Args: None.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmdBase::SetCmdData(const SMICmdData &vCmdData)
{
m_cmdData = vCmdData;
-
- return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdBase.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdBase.h?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdBase.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmdBase.h Wed Jul 22 12:07:27 2015
@@ -57,7 +57,7 @@ class CMICmdBase : public CMICmnBase, pu
// From CMICmdInvoker::ICmd
virtual const SMICmdData &GetCmdData(void) const;
virtual const CMIUtilString &GetErrorDescription(void) const;
- virtual bool SetCmdData(const SMICmdData &vCmdData);
+ virtual void SetCmdData(const SMICmdData &vCmdData);
virtual void CmdFinishedTellInvoker(void) const;
virtual const CMIUtilString &GetMIResultRecord(void) const;
virtual const CMIUtilString &GetMIResultRecordExtra(void) const;
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdBreak.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdBreak.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdBreak.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdBreak.cpp Wed Jul 22 12:07:27 2015
@@ -89,27 +89,22 @@ CMICmdCmdBreakInsert::~CMICmdCmdBreakIns
bool
CMICmdCmdBreakInsert::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedTempBrkPt, false, true)));
- // Not implemented bOk = bOk && m_setCmdArgs.Add( *(new CMICmdArgValOptionShort( m_constStrArgNamedHWBrkPt, false, false ) ) );
- bOk = bOk &&
- m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedPendinfBrkPt, false, true,
- CMICmdArgValListBase::eArgValType_StringQuotedNumberPath, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedDisableBrkPt, false, false)));
- // Not implemented bOk = bOk && m_setCmdArgs.Add( *(new CMICmdArgValOptionShort( m_constStrArgNamedTracePt, false, false ) ) );
- bOk = bOk &&
- m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedConditionalBrkPt, false, true,
- CMICmdArgValListBase::eArgValType_StringQuoted, 1)));
- bOk = bOk &&
- m_setCmdArgs.Add(
- *(new CMICmdArgValOptionShort(m_constStrArgNamedInoreCnt, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk &&
- m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedRestrictBrkPtToThreadId, false, true,
- CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedLocation, false, true)));
- bOk = bOk &&
- m_setCmdArgs.Add(
- *(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGroup, false, true, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
- return (bOk && ParseValidateCmdOptions());
+ 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)));
+ m_setCmdArgs.Add(
+ *(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGroup, false, true, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -386,11 +381,10 @@ CMICmdCmdBreakDelete::~CMICmdCmdBreakDel
bool
CMICmdCmdBreakDelete::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(
+ m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
- bOk =
- bOk && m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true, CMICmdArgValListBase::eArgValType_Number)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true, CMICmdArgValListBase::eArgValType_Number)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -506,11 +500,10 @@ CMICmdCmdBreakDisable::~CMICmdCmdBreakDi
bool
CMICmdCmdBreakDisable::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(
+ m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
- bOk =
- bOk && m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true, CMICmdArgValListBase::eArgValType_Number)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true, CMICmdArgValListBase::eArgValType_Number)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -566,10 +559,10 @@ CMICmdCmdBreakDisable::Acknowledge(void)
CMICmnMIValueTuple miValueTuple(miValueResult);
const CMICmnMIValueConst miValueConst2("n");
const CMICmnMIValueResult miValueResult2("enabled", miValueConst2);
- bool bOk = miValueTuple.Add(miValueResult2);
+ miValueTuple.Add(miValueResult2);
const CMICmnMIValueResult miValueResult3("bkpt", miValueTuple);
const CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified, miValueResult3);
- bOk = bOk && CMICmnStreamStdout::TextToStdout(miOutOfBandRecord.GetString());
+ bool bOk = CMICmnStreamStdout::TextToStdout(miOutOfBandRecord.GetString());
const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
m_miResultRecord = miRecordResult;
@@ -646,11 +639,10 @@ CMICmdCmdBreakEnable::~CMICmdCmdBreakEna
bool
CMICmdCmdBreakEnable::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(
+ m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
- bOk =
- bOk && m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true, CMICmdArgValListBase::eArgValType_Number)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true, CMICmdArgValListBase::eArgValType_Number)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -706,10 +698,10 @@ CMICmdCmdBreakEnable::Acknowledge(void)
CMICmnMIValueTuple miValueTuple(miValueResult);
const CMICmnMIValueConst miValueConst2("y");
const CMICmnMIValueResult miValueResult2("enabled", miValueConst2);
- bool bOk = miValueTuple.Add(miValueResult2);
+ miValueTuple.Add(miValueResult2);
const CMICmnMIValueResult miValueResult3("bkpt", miValueTuple);
const CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified, miValueResult3);
- bOk = bOk && CMICmnStreamStdout::TextToStdout(miOutOfBandRecord.GetString());
+ bool bOk = CMICmnStreamStdout::TextToStdout(miOutOfBandRecord.GetString());
const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
m_miResultRecord = miRecordResult;
@@ -787,11 +779,11 @@ CMICmdCmdBreakAfter::~CMICmdCmdBreakAfte
bool
CMICmdCmdBreakAfter::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(
+ m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNamedNumber, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNamedCount, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNamedNumber, true, true)));
+ m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNamedCount, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -918,14 +910,13 @@ CMICmdCmdBreakCondition::~CMICmdCmdBreak
bool
CMICmdCmdBreakCondition::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(
+ m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNamedNumber, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedExpr, true, true, true, true)));
- bOk = bOk &&
- m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedExprNoQuotes, true, false,
- CMICmdArgValListBase::eArgValType_StringQuotedNumber)));
- return (bOk && ParseValidateCmdOptions());
+ 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, true, false,
+ CMICmdArgValListBase::eArgValType_StringQuotedNumber)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdData.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdData.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdData.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdData.cpp Wed Jul 22 12:07:27 2015
@@ -91,12 +91,10 @@ CMICmdCmdDataEvaluateExpression::~CMICmd
bool
CMICmdCmdDataEvaluateExpression::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, false, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk &&
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, false, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgExpr, true, true, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ 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();
}
//++ ------------------------------------------------------------------------------------
@@ -323,17 +321,14 @@ CMICmdCmdDataDisassemble::~CMICmdCmdData
bool
CMICmdCmdDataDisassemble::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk &&
- m_setCmdArgs.Add(
- *(new CMICmdArgValOptionShort(m_constStrArgAddrStart, true, true, CMICmdArgValListBase::eArgValType_StringQuotedNumber, 1)));
- bOk = bOk &&
- m_setCmdArgs.Add(
- *(new CMICmdArgValOptionShort(m_constStrArgAddrEnd, true, true, CMICmdArgValListBase::eArgValType_StringQuotedNumber, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValConsume(m_constStrArgConsume, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgMode, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ 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)));
+ 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)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -555,16 +550,12 @@ CMICmdCmdDataReadMemoryBytes::~CMICmdCmd
bool
CMICmdCmdDataReadMemoryBytes::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk &&
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk =
- bOk &&
- m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgByteOffset, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgAddrExpr, true, true, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumBytes, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ 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();
}
//++ ------------------------------------------------------------------------------------
@@ -875,10 +866,9 @@ CMICmdCmdDataListRegisterNames::~CMICmdC
bool
CMICmdCmdDataListRegisterNames::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(
- *(new CMICmdArgValOptionLong(m_constStrArgThreadGroup, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgRegNo, false, false, CMICmdArgValListBase::eArgValType_Number)));
- return (bOk && ParseValidateCmdOptions());
+ 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();
}
//++ ------------------------------------------------------------------------------------
@@ -940,9 +930,7 @@ CMICmdCmdDataListRegisterNames::Execute(
if (regValue.IsValid())
{
const CMICmnMIValueConst miValueConst(CMICmnLLDBUtilSBValue(regValue).GetName());
- const bool bOk = m_miValueList.Add(miValueConst);
- if (!bOk)
- return MIstatus::failure;
+ m_miValueList.Add(miValueConst);
}
}
}
@@ -1068,12 +1056,11 @@ CMICmdCmdDataListRegisterValues::~CMICmd
bool
CMICmdCmdDataListRegisterValues::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, false, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgSkip, false, false)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgFormat, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgRegNo, false, true, CMICmdArgValListBase::eArgValType_Number)));
- return (bOk && ParseValidateCmdOptions());
+ 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();
}
//++ ------------------------------------------------------------------------------------
@@ -1124,9 +1111,7 @@ CMICmdCmdDataListRegisterValues::Execute
lldb::SBValue regValue = GetRegister(nRegIndex);
if (regValue.IsValid())
{
- const bool bOk = AddToOutput(nRegIndex, regValue, eFormat);
- if (!bOk)
- return MIstatus::failure;
+ AddToOutput(nRegIndex, regValue, eFormat);
}
// Next
@@ -1150,9 +1135,7 @@ CMICmdCmdDataListRegisterValues::Execute
lldb::SBValue regValue = value.GetChildAtIndex(j);
if (regValue.IsValid())
{
- const bool bOk = AddToOutput(nRegIndex, regValue, eFormat);
- if (!bOk)
- return MIstatus::failure;
+ AddToOutput(nRegIndex, regValue, eFormat);
}
// Next
@@ -1240,7 +1223,7 @@ CMICmdCmdDataListRegisterValues::GetRegi
// Return: None
// Throws: None.
//--
-bool
+void
CMICmdCmdDataListRegisterValues::AddToOutput(const MIuint vnIndex, const lldb::SBValue &vrValue,
CMICmnLLDBDebugSessionInfoVarObj::varFormat_e veVarFormat)
{
@@ -1250,8 +1233,8 @@ CMICmdCmdDataListRegisterValues::AddToOu
const CMIUtilString strRegValue(CMICmnLLDBDebugSessionInfoVarObj::GetValueStringFormatted(vrValue, veVarFormat));
const CMICmnMIValueConst miValueConst2(strRegValue);
const CMICmnMIValueResult miValueResult2("value", miValueConst2);
- bool bOk = miValueTuple.Add(miValueResult2);
- return bOk && m_miValueList.Add(miValueTuple);
+ miValueTuple.Add(miValueResult2);
+ m_miValueList.Add(miValueTuple);
}
//---------------------------------------------------------------------------------------
@@ -1383,12 +1366,11 @@ CMICmdCmdDataWriteMemoryBytes::~CMICmdCm
bool
CMICmdCmdDataWriteMemoryBytes::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, false, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgAddr, true, true, false, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgContents, true, true, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgCount, false, true, false, true)));
- return (bOk && ParseValidateCmdOptions());
+ 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();
}
//++ ------------------------------------------------------------------------------------
@@ -1506,15 +1488,13 @@ CMICmdCmdDataWriteMemory::~CMICmdCmdData
bool
CMICmdCmdDataWriteMemory::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, false, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk &&
- m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgOffset, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgAddr, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgD, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgContents, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ 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();
}
//++ ------------------------------------------------------------------------------------
@@ -1651,8 +1631,8 @@ CMICmdCmdDataInfoLine::~CMICmdCmdDataInf
bool
CMICmdCmdDataInfoLine::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgLocation, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgLocation, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -1765,9 +1745,7 @@ CMICmdCmdDataInfoLine::Acknowledge(void)
const CMIUtilString strEndAddress(rLine.substr(nStartAddressEndPos + 1, nEndAddressLen).c_str());
const CMICmnMIValueConst miValueConst2(strEndAddress);
const CMICmnMIValueResult miValueResult2("end", miValueConst2);
- bool bOk = miRecordResult.Add(miValueResult2);
- if (!bOk)
- return MIstatus::failure;
+ miRecordResult.Add(miValueResult2);
// LineEntry: \[0x0000000100000f37-0x0000000100000f45\): /path/to/file:3[:1]
// ^^^^^^^^^^^^^ -- file
@@ -1781,9 +1759,7 @@ CMICmdCmdDataInfoLine::Acknowledge(void)
const CMIUtilString strFile(rLine.substr(nFileStartPos, nFileLen).c_str());
const CMICmnMIValueConst miValueConst3(strFile);
const CMICmnMIValueResult miValueResult3("file", miValueConst3);
- bOk = miRecordResult.Add(miValueResult3);
- if (!bOk)
- return MIstatus::failure;
+ miRecordResult.Add(miValueResult3);
// LineEntry: \[0x0000000100000f37-0x0000000100000f45\): /path/to/file:3[:1]
// ^ -- line
@@ -1794,9 +1770,7 @@ CMICmdCmdDataInfoLine::Acknowledge(void)
const CMIUtilString strLine(rLine.substr(nLineStartPos, nLineLen).c_str());
const CMICmnMIValueConst miValueConst4(strLine);
const CMICmnMIValueResult miValueResult4("line", miValueConst4);
- bOk = miRecordResult.Add(miValueResult4);
- if (!bOk)
- return MIstatus::failure;
+ miRecordResult.Add(miValueResult4);
// MI print "%s^done,start=\"%d\",end=\"%d\"",file=\"%s\",line=\"%d\"
m_miResultRecord = miRecordResult;
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdData.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdData.h?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdData.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdData.h Wed Jul 22 12:07:27 2015
@@ -255,7 +255,7 @@ class CMICmdCmdDataListRegisterValues :
// Methods:
private:
lldb::SBValue GetRegister(const MIuint vRegisterIndex) const;
- bool AddToOutput(const MIuint vnIndex, const lldb::SBValue &vrValue, CMICmnLLDBDebugSessionInfoVarObj::varFormat_e veVarFormat);
+ void AddToOutput(const MIuint vnIndex, const lldb::SBValue &vrValue, CMICmnLLDBDebugSessionInfoVarObj::varFormat_e veVarFormat);
// Attributes:
private:
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdEnviro.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdEnviro.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdEnviro.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdEnviro.cpp Wed Jul 22 12:07:27 2015
@@ -57,9 +57,9 @@ CMICmdCmdEnvironmentCd::~CMICmdCmdEnviro
bool
CMICmdCmdEnvironmentCd::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValFile(m_constStrArgNamePathDir, true, true)));
+ m_setCmdArgs.Add(*(new CMICmdArgValFile(m_constStrArgNamePathDir, true, true)));
CMICmdArgContext argCntxt(m_cmdData.strMiCmdOption);
- return (bOk && ParseValidateCmdOptions());
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdExec.cpp Wed Jul 22 12:07:27 2015
@@ -315,10 +315,9 @@ CMICmdCmdExecNext::~CMICmdCmdExecNext(vo
bool
CMICmdCmdExecNext::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, false, false)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
+ m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, false, false)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -442,10 +441,9 @@ CMICmdCmdExecStep::~CMICmdCmdExecStep(vo
bool
CMICmdCmdExecStep::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, false, false)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
+ m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, false, false)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -569,10 +567,9 @@ CMICmdCmdExecNextInstruction::~CMICmdCmd
bool
CMICmdCmdExecNextInstruction::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, false, false)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
+ m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, false, false)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -696,10 +693,9 @@ CMICmdCmdExecStepInstruction::~CMICmdCmd
bool
CMICmdCmdExecStepInstruction::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, false, false)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
+ m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNumber, false, false)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -823,11 +819,9 @@ CMICmdCmdExecFinish::~CMICmdCmdExecFinis
bool
CMICmdCmdExecFinish::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk &&
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, false, CMICmdArgValListBase::eArgValType_Number, 1)));
- return (bOk && ParseValidateCmdOptions());
+ 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();
}
//++ ------------------------------------------------------------------------------------
@@ -1052,9 +1046,9 @@ CMICmdCmdExecArguments::~CMICmdCmdExecAr
bool
CMICmdCmdExecArguments::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(
+ m_setCmdArgs.Add(
*(new CMICmdArgValListOfN(m_constStrArgArguments, false, true, CMICmdArgValListBase::eArgValType_StringAnything)));
- return (bOk && ParseValidateCmdOptions());
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdFile.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdFile.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdFile.cpp Wed Jul 22 12:07:27 2015
@@ -66,16 +66,14 @@ CMICmdCmdFileExecAndSymbols::~CMICmdCmdF
bool
CMICmdCmdFileExecAndSymbols::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(
+ m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValFile(m_constStrArgNameFile, true, true)));
- bOk = bOk &&
+ m_setCmdArgs.Add(*(new CMICmdArgValFile(m_constStrArgNameFile, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedPlatformName, false, true,
CMICmdArgValListBase::eArgValType_String, 1)));
- bOk = bOk &&
m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedRemotePath, false, true,
CMICmdArgValListBase::eArgValType_StringQuotedNumberPath, 1)));
- return (bOk && ParseValidateCmdOptions());
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdGdbInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdGdbInfo.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdGdbInfo.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdGdbInfo.cpp Wed Jul 22 12:07:27 2015
@@ -68,8 +68,8 @@ CMICmdCmdGdbInfo::~CMICmdCmdGdbInfo(void
bool
CMICmdCmdGdbInfo::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedPrint, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedPrint, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdGdbSet.cpp Wed Jul 22 12:07:27 2015
@@ -72,12 +72,11 @@ CMICmdCmdGdbSet::~CMICmdCmdGdbSet(void)
bool
CMICmdCmdGdbSet::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(
+ m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
- bOk = bOk &&
- m_setCmdArgs.Add(
- *(new CMICmdArgValListOfN(m_constStrArgNamedGdbOption, true, true, CMICmdArgValListBase::eArgValType_StringAnything)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(
+ *(new CMICmdArgValListOfN(m_constStrArgNamedGdbOption, true, true, CMICmdArgValListBase::eArgValType_StringAnything)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdGdbShow.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdGdbShow.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdGdbShow.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdGdbShow.cpp Wed Jul 22 12:07:27 2015
@@ -76,12 +76,11 @@ CMICmdCmdGdbShow::~CMICmdCmdGdbShow(void
bool
CMICmdCmdGdbShow::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(
+ m_setCmdArgs.Add(
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
- bOk = bOk &&
- m_setCmdArgs.Add(
- *(new CMICmdArgValListOfN(m_constStrArgNamedGdbOption, true, true, CMICmdArgValListBase::eArgValType_StringAnything)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(
+ *(new CMICmdArgValListOfN(m_constStrArgNamedGdbOption, true, true, CMICmdArgValListBase::eArgValType_StringAnything)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdMiscellanous.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdMiscellanous.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdMiscellanous.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdMiscellanous.cpp Wed Jul 22 12:07:27 2015
@@ -171,14 +171,12 @@ CMICmdCmdListThreadGroups::~CMICmdCmdLis
bool
CMICmdCmdListThreadGroups::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgNamedAvailable, false, true)));
- bOk = bOk &&
- m_setCmdArgs.Add(
- *(new CMICmdArgValOptionLong(m_constStrArgNamedRecurse, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk =
- bOk && m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedGroup, false, true, CMICmdArgValListBase::eArgValType_Number)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValThreadGrp(m_constStrArgNamedThreadGroup, false, true)));
- return (bOk && ParseValidateCmdOptions());
+ 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)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -432,9 +430,9 @@ CMICmdCmdInterpreterExec::~CMICmdCmdInte
bool
CMICmdCmdInterpreterExec::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedInterpreter, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedCommand, true, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedInterpreter, true, true)));
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedCommand, true, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdStack.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdStack.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdStack.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdStack.cpp Wed Jul 22 12:07:27 2015
@@ -74,10 +74,9 @@ CMICmdCmdStackInfoDepth::~CMICmdCmdStack
bool
CMICmdCmdStackInfoDepth::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgMaxDepth, false, false)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
+ m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgMaxDepth, false, false)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -301,11 +300,10 @@ CMICmdCmdStackListFrames::~CMICmdCmdStac
bool
CMICmdCmdStackListFrames::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrameLow, false, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrameHigh, false, true)));
- return (bOk && ParseValidateCmdOptions());
+ 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();
}
//++ ------------------------------------------------------------------------------------
@@ -483,12 +481,11 @@ CMICmdCmdStackListArguments::~CMICmdCmdS
bool
CMICmdCmdStackListArguments::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrameLow, false, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrameHigh, false, true)));
- return (bOk && ParseValidateCmdOptions());
+ 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();
}
//++ ------------------------------------------------------------------------------------
@@ -669,12 +666,10 @@ CMICmdCmdStackListLocals::~CMICmdCmdStac
bool
CMICmdCmdStackListLocals::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk &&
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ 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();
}
//++ ------------------------------------------------------------------------------------
@@ -834,12 +829,10 @@ CMICmdCmdStackListVariables::~CMICmdCmdS
bool
CMICmdCmdStackListVariables::ParseArgs(void)
{
- bool bOk =
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk &&
m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -995,8 +988,8 @@ CMICmdCmdStackSelectFrame::~CMICmdCmdSta
bool
CMICmdCmdStackSelectFrame::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrame, true, false)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrame, true, false)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdSupportInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdSupportInfo.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdSupportInfo.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdSupportInfo.cpp Wed Jul 22 12:07:27 2015
@@ -58,8 +58,8 @@ CMICmdCmdSupportInfoMiCmdQuery::~CMICmdC
bool
CMICmdCmdSupportInfoMiCmdQuery::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgCmdName, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgCmdName, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdSymbol.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdSymbol.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdSymbol.cpp Wed Jul 22 12:07:27 2015
@@ -60,8 +60,8 @@ CMICmdCmdSymbolListLines::~CMICmdCmdSymb
bool
CMICmdCmdSymbolListLines::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValFile(m_constStrArgNameFile, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValFile(m_constStrArgNameFile, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -142,11 +142,9 @@ CMICmdCmdSymbolListLines::Acknowledge(vo
const CMIUtilString strLine(strPathOrLine.IsNumber() ? strPathOrLine : strLineOrColumn);
const CMICmnMIValueConst miValueConst2(strLine);
const CMICmnMIValueResult miValueResult2("line", miValueConst2);
- bool bOk = miValueTuple.Add(miValueResult2);
+ miValueTuple.Add(miValueResult2);
- bOk = bOk && miValueList.Add(miValueTuple);
- if (!bOk)
- return MIstatus::failure;
+ miValueList.Add(miValueTuple);
}
// MI print "%s^done,lines=[{pc=\"%d\",line=\"%d\"}...]"
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdTarget.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdTarget.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdTarget.cpp Wed Jul 22 12:07:27 2015
@@ -67,9 +67,9 @@ CMICmdCmdTargetSelect::~CMICmdCmdTargetS
bool
CMICmdCmdTargetSelect::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedType, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedParameters, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedType, true, true)));
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedParameters, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -250,11 +250,11 @@ CMICmdCmdTargetAttach::~CMICmdCmdTargetA
bool
CMICmdCmdTargetAttach::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgPid, false, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedFile, false, true,
+ m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgPid, false, true)));
+ m_setCmdArgs.Add(*(new CMICmdArgValOptionShort(m_constStrArgNamedFile, false, true,
CMICmdArgValListBase::eArgValType_String, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgWaitFor, false, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgWaitFor, false, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdThread.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdThread.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdThread.cpp Wed Jul 22 12:07:27 2015
@@ -64,8 +64,8 @@ CMICmdCmdThreadInfo::~CMICmdCmdThreadInf
bool
CMICmdCmdThreadInfo::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNamedThreadId, false, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNamedThreadId, false, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdVar.cpp Wed Jul 22 12:07:27 2015
@@ -88,17 +88,14 @@ CMICmdCmdVarCreate::~CMICmdCmdVarCreate(
bool
CMICmdCmdVarCreate::ParseArgs(void)
{
- bool bOk =
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgThread, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk &&
- m_setCmdArgs.Add(
- *(new CMICmdArgValOptionLong(m_constStrArgThreadGroup, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
- bOk = bOk &&
- m_setCmdArgs.Add(*(new CMICmdArgValOptionLong(m_constStrArgFrame, false, true, CMICmdArgValListBase::eArgValType_Number, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, false, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgFrameAddr, false, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgExpression, true, true, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ 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)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -356,9 +353,9 @@ CMICmdCmdVarUpdate::~CMICmdCmdVarUpdate(
bool
CMICmdCmdVarUpdate::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, false, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, false, true)));
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -399,7 +396,7 @@ CMICmdCmdVarUpdate::Execute(void)
(eVarInfoFormat == CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_SimpleValues && rValue.GetNumChildren() == 0));
const CMIUtilString strValue(bPrintValue ? varObj.GetValueFormatted() : "");
const CMIUtilString strInScope(rValue.IsInScope() ? "true" : "false");
- return MIFormResponse(rVarObjName, bPrintValue ? strValue.c_str() : nullptr, strInScope);
+ MIFormResponse(rVarObjName, bPrintValue ? strValue.c_str() : nullptr, strInScope);
}
return MIstatus::success;
@@ -456,36 +453,32 @@ CMICmdCmdVarUpdate::CreateSelf(void)
// Args: vrStrVarName - (R) Session var object's name.
// vpValue - (R) Text version of the value held in the variable.
// vrStrScope - (R) In scope "yes" or "no".
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmdCmdVarUpdate::MIFormResponse(const CMIUtilString &vrStrVarName, const char *const vpValue, const CMIUtilString &vrStrScope)
{
// MI print "[{name=\"%s\",value=\"%s\",in_scope=\"%s\",type_changed=\"false\",has_more=\"0\"}]"
const CMICmnMIValueConst miValueConst(vrStrVarName);
const CMICmnMIValueResult miValueResult("name", miValueConst);
CMICmnMIValueTuple miValueTuple(miValueResult);
- bool bOk = true;
if (vpValue != nullptr)
{
const CMICmnMIValueConst miValueConst2(vpValue);
const CMICmnMIValueResult miValueResult2("value", miValueConst2);
- bOk = bOk && miValueTuple.Add(miValueResult2);
+ miValueTuple.Add(miValueResult2);
}
const CMICmnMIValueConst miValueConst3(vrStrScope);
const CMICmnMIValueResult miValueResult3("in_scope", miValueConst3);
- bOk = bOk && miValueTuple.Add(miValueResult3);
+ miValueTuple.Add(miValueResult3);
const CMICmnMIValueConst miValueConst4("false");
const CMICmnMIValueResult miValueResult4("type_changed", miValueConst4);
- bOk = bOk && miValueTuple.Add(miValueResult4);
+ miValueTuple.Add(miValueResult4);
const CMICmnMIValueConst miValueConst5("0");
const CMICmnMIValueResult miValueResult5("has_more", miValueConst5);
- bOk = bOk && miValueTuple.Add(miValueResult5);
- bOk = bOk && m_miValueList.Add(miValueTuple);
-
- return bOk;
+ miValueTuple.Add(miValueResult5);
+ m_miValueList.Add(miValueTuple);
}
//++ ------------------------------------------------------------------------------------
@@ -565,8 +558,8 @@ CMICmdCmdVarDelete::CMICmdCmdVarDelete(v
bool
CMICmdCmdVarDelete::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -678,9 +671,9 @@ CMICmdCmdVarAssign::~CMICmdCmdVarAssign(
bool
CMICmdCmdVarAssign::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgExpression, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgExpression, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -811,9 +804,9 @@ CMICmdCmdVarSetFormat::~CMICmdCmdVarSetF
bool
CMICmdCmdVarSetFormat::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgFormatSpec, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgFormatSpec, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -958,11 +951,11 @@ CMICmdCmdVarListChildren::~CMICmdCmdVarL
bool
CMICmdCmdVarListChildren::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValPrintValues(m_constStrArgPrintValues, false, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgFrom, false, true)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgTo, false, true)));
- return (bOk && ParseValidateCmdOptions());
+ 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();
}
//++ ------------------------------------------------------------------------------------
@@ -1032,17 +1025,17 @@ CMICmdCmdVarListChildren::Execute(void)
CMICmnMIValueTuple miValueTuple(miValueResult);
const CMICmnMIValueConst miValueConst2(strExp);
const CMICmnMIValueResult miValueResult2("exp", miValueConst2);
- bool bOk = miValueTuple.Add(miValueResult2);
+ miValueTuple.Add(miValueResult2);
const CMIUtilString strNumChild(CMIUtilString::Format("%u", nChildren));
const CMICmnMIValueConst miValueConst3(strNumChild);
const CMICmnMIValueResult miValueResult3("numchild", miValueConst3);
- bOk = bOk && miValueTuple.Add(miValueResult3);
+ miValueTuple.Add(miValueResult3);
const CMICmnMIValueConst miValueConst5(utilValue.GetTypeNameDisplay());
const CMICmnMIValueResult miValueResult5("type", miValueConst5);
- bOk = bOk && miValueTuple.Add(miValueResult5);
+ miValueTuple.Add(miValueResult5);
const CMICmnMIValueConst miValueConst6(strThreadId);
const CMICmnMIValueResult miValueResult6("thread-id", miValueConst6);
- bOk = bOk && miValueTuple.Add(miValueResult6);
+ miValueTuple.Add(miValueResult6);
// nChildren == 0 is used to check for simple values
if (eVarInfoFormat == CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_AllValues ||
(eVarInfoFormat == CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_SimpleValues && nChildren == 0))
@@ -1053,15 +1046,13 @@ CMICmdCmdVarListChildren::Execute(void)
CMICmnLLDBDebugSessionInfoVarObj::GetValueStringFormatted(member, CMICmnLLDBDebugSessionInfoVarObj::eVarFormat_Natural));
const CMICmnMIValueConst miValueConst7(strValue);
const CMICmnMIValueResult miValueResult7("value", miValueConst7);
- bOk = bOk && miValueTuple.Add(miValueResult7);
+ miValueTuple.Add(miValueResult7);
}
const CMICmnMIValueConst miValueConst8("0");
const CMICmnMIValueResult miValueResult8("has_more", miValueConst8);
- bOk = bOk && miValueTuple.Add(miValueResult8);
+ miValueTuple.Add(miValueResult8);
const CMICmnMIValueResult miValueResult9("child", miValueTuple);
- bOk = bOk && m_miValueList.Add(miValueResult9);
- if (!bOk)
- return MIstatus::failure;
+ m_miValueList.Add(miValueResult9);
}
return MIstatus::success;
@@ -1085,14 +1076,11 @@ CMICmdCmdVarListChildren::Acknowledge(vo
const CMIUtilString strNumChild(CMIUtilString::Format("%u", m_nChildren));
const CMICmnMIValueConst miValueConst(strNumChild);
CMICmnMIValueResult miValueResult("numchild", miValueConst);
- bool bOk = MIstatus::success;
if (m_nChildren != 0)
- bOk = bOk && miValueResult.Add("children", m_miValueList);
+ miValueResult.Add("children", m_miValueList);
const CMIUtilString strHasMore(m_bHasMore ? "1" : "0");
const CMICmnMIValueConst miValueConst2(strHasMore);
- bOk = bOk && miValueResult.Add("has_more", miValueConst2);
- if (!bOk)
- return MIstatus::failure;
+ miValueResult.Add("has_more", miValueConst2);
const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done, miValueResult);
m_miResultRecord = miRecordResult;
@@ -1169,10 +1157,10 @@ CMICmdCmdVarEvaluateExpression::~CMICmdC
bool
CMICmdCmdVarEvaluateExpression::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(
+ m_setCmdArgs.Add(
*(new CMICmdArgValOptionShort(m_constStrArgFormatSpec, false, false, CMICmdArgValListBase::eArgValType_String, 1)));
- bOk = bOk && m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -1297,8 +1285,8 @@ CMICmdCmdVarInfoPathExpression::~CMICmdC
bool
CMICmdCmdVarInfoPathExpression::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
@@ -1457,8 +1445,8 @@ CMICmdCmdVarShowAttributes::~CMICmdCmdVa
bool
CMICmdCmdVarShowAttributes::ParseArgs(void)
{
- bool bOk = m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
- return (bOk && ParseValidateCmdOptions());
+ m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgName, true, true)));
+ return ParseValidateCmdOptions();
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdVar.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdVar.h?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdVar.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdVar.h Wed Jul 22 12:07:27 2015
@@ -122,7 +122,7 @@ class CMICmdCmdVarUpdate : public CMICmd
// Methods:
private:
bool ExamineSBValueForChange(lldb::SBValue &vrwValue, bool &vrwbChanged);
- bool MIFormResponse(const CMIUtilString &vrStrVarName, const char *const vpValue, const CMIUtilString &vrStrScope);
+ void MIFormResponse(const CMIUtilString &vrStrVarName, const char *const vpValue, const CMIUtilString &vrStrScope);
// Attribute:
private:
Modified: lldb/trunk/tools/lldb-mi/MICmdFactory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdFactory.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdFactory.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdFactory.cpp Wed Jul 22 12:07:27 2015
@@ -194,8 +194,6 @@ CMICmdFactory::CmdExist(const CMIUtilStr
bool
CMICmdFactory::CmdCreate(const CMIUtilString &vMiCmd, const SMICmdData &vCmdData, CMICmdBase *&vpNewCmd)
{
- bool bOk = MIstatus::success;
-
vpNewCmd = nullptr;
if (!IsValid(vMiCmd))
@@ -217,9 +215,8 @@ CMICmdFactory::CmdCreate(const CMIUtilSt
SMICmdData cmdData(vCmdData);
cmdData.id = pCmd->GetGUID();
- bOk = pCmd->SetCmdData(cmdData);
- if (bOk)
- vpNewCmd = pCmd;
+ pCmd->SetCmdData(cmdData);
+ vpNewCmd = pCmd;
- return bOk;
+ return MIstatus::success;
}
Modified: lldb/trunk/tools/lldb-mi/MICmdInvoker.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdInvoker.h?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdInvoker.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmdInvoker.h Wed Jul 22 12:07:27 2015
@@ -55,7 +55,7 @@ class CMICmdInvoker : public CMICmnBase,
virtual bool Acknowledge(void) = 0;
virtual bool Execute(void) = 0;
virtual bool ParseArgs(void) = 0;
- virtual bool SetCmdData(const SMICmdData &vCmdData) = 0;
+ virtual void SetCmdData(const SMICmdData &vCmdData) = 0;
virtual const SMICmdData &GetCmdData(void) const = 0;
virtual const CMIUtilString &GetErrorDescription(void) const = 0;
virtual void CmdFinishedTellInvoker(void) const = 0;
Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp Wed Jul 22 12:07:27 2015
@@ -376,8 +376,7 @@ CMICmnLLDBDebugSessionInfo::MIResponseFo
const CMIUtilString strId(CMIUtilString::Format("%d", rThread.GetIndexID()));
const CMICmnMIValueConst miValueConst1(strId);
const CMICmnMIValueResult miValueResult1("id", miValueConst1);
- if (!vwrMIValueTuple.Add(miValueResult1))
- return MIstatus::failure;
+ vwrMIValueTuple.Add(miValueResult1);
// Add "target-id"
const char *pThreadName = rThread.GetName();
@@ -392,8 +391,7 @@ CMICmnLLDBDebugSessionInfo::MIResponseFo
strThread = CMIUtilString::Format(pThrdFmt, rThread.GetIndexID());
const CMICmnMIValueConst miValueConst2(strThread);
const CMICmnMIValueResult miValueResult2("target-id", miValueConst2);
- if (!vwrMIValueTuple.Add(miValueResult2))
- return MIstatus::failure;
+ vwrMIValueTuple.Add(miValueResult2);
// Add "frame"
if (veThreadInfoFormat != eThreadInfoFormat_NoFrames)
@@ -403,15 +401,13 @@ CMICmnLLDBDebugSessionInfo::MIResponseFo
return MIstatus::failure;
const CMICmnMIValueConst miValueConst3(strFrames, true);
- if (!vwrMIValueTuple.Add(miValueConst3, false))
- return MIstatus::failure;
+ vwrMIValueTuple.Add(miValueConst3, false);
}
// Add "state"
const CMICmnMIValueConst miValueConst4(strState);
const CMICmnMIValueResult miValueResult4("state", miValueConst4);
- if (!vwrMIValueTuple.Add(miValueResult4))
- return MIstatus::failure;
+ vwrMIValueTuple.Add(miValueResult4);
return MIstatus::success;
}
@@ -461,9 +457,8 @@ CMICmnLLDBDebugSessionInfo::MIResponseFo
const bool vbIsArgs,
const bool vbMarkArgs)
{
- bool bOk = MIstatus::success;
const MIuint nArgs = vwrSBValueList.GetSize();
- for (MIuint i = 0; bOk && (i < nArgs); i++)
+ for (MIuint i = 0; i < nArgs; i++)
{
CMICmnMIValueTuple miValueTuple;
lldb::SBValue value = vwrSBValueList.GetValueAtIndex(i);
@@ -514,7 +509,7 @@ CMICmnLLDBDebugSessionInfo::MIResponseFo
vwrMiValueList.Add(miValueResultName);
}
}
- return bOk;
+ return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
@@ -567,17 +562,14 @@ CMICmnLLDBDebugSessionInfo::MIResponseFo
const CMIUtilString strLevel(CMIUtilString::Format("%d", vnLevel));
const CMICmnMIValueConst miValueConst(strLevel);
const CMICmnMIValueResult miValueResult("level", miValueConst);
- if (!vwrMiValueTuple.Add(miValueResult))
- return MIstatus::failure;
+ vwrMiValueTuple.Add(miValueResult);
const CMIUtilString strAddr(CMIUtilString::Format("0x%016" PRIx64, pc));
const CMICmnMIValueConst miValueConst2(strAddr);
const CMICmnMIValueResult miValueResult2("addr", miValueConst2);
- if (!vwrMiValueTuple.Add(miValueResult2))
- return MIstatus::failure;
+ vwrMiValueTuple.Add(miValueResult2);
const CMICmnMIValueConst miValueConst3(fnName);
const CMICmnMIValueResult miValueResult3("func", miValueConst3);
- if (!vwrMiValueTuple.Add(miValueResult3))
- return MIstatus::failure;
+ vwrMiValueTuple.Add(miValueResult3);
if (veFrameInfoFormat != eFrameInfoFormat_NoArguments)
{
CMICmnMIValueList miValueList(true);
@@ -592,22 +584,18 @@ CMICmnLLDBDebugSessionInfo::MIResponseFo
return MIstatus::failure;
const CMICmnMIValueResult miValueResult4("args", miValueList);
- if (!vwrMiValueTuple.Add(miValueResult4))
- return MIstatus::failure;
+ vwrMiValueTuple.Add(miValueResult4);
}
const CMICmnMIValueConst miValueConst5(fileName);
const CMICmnMIValueResult miValueResult5("file", miValueConst5);
- if (!vwrMiValueTuple.Add(miValueResult5))
- return MIstatus::failure;
+ vwrMiValueTuple.Add(miValueResult5);
const CMICmnMIValueConst miValueConst6(path);
const CMICmnMIValueResult miValueResult6("fullname", miValueConst6);
- if (!vwrMiValueTuple.Add(miValueResult6))
- return MIstatus::failure;
+ vwrMiValueTuple.Add(miValueResult6);
const CMIUtilString strLine(CMIUtilString::Format("%d", nLine));
const CMICmnMIValueConst miValueConst7(strLine);
const CMICmnMIValueResult miValueResult7("line", miValueConst7);
- if (!vwrMiValueTuple.Add(miValueResult7))
- return MIstatus::failure;
+ vwrMiValueTuple.Add(miValueResult7);
return MIstatus::success;
}
@@ -659,38 +647,30 @@ CMICmnLLDBDebugSessionInfo::GetFrameInfo
// Type: Method.
// Args: vrBrkPtInfo - (R) Break point information object.
// vwrMIValueTuple - (W) MI value tuple object.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnLLDBDebugSessionInfo::MIResponseFormBrkPtFrameInfo(const SBrkPtInfo &vrBrkPtInfo, CMICmnMIValueTuple &vwrMiValueTuple)
{
const CMIUtilString strAddr(CMIUtilString::Format("0x%016" PRIx64, vrBrkPtInfo.m_pc));
const CMICmnMIValueConst miValueConst2(strAddr);
const CMICmnMIValueResult miValueResult2("addr", miValueConst2);
- if (!vwrMiValueTuple.Add(miValueResult2))
- return MIstatus::failure;
+ vwrMiValueTuple.Add(miValueResult2);
const CMICmnMIValueConst miValueConst3(vrBrkPtInfo.m_fnName);
const CMICmnMIValueResult miValueResult3("func", miValueConst3);
- if (!vwrMiValueTuple.Add(miValueResult3))
- return MIstatus::failure;
+ vwrMiValueTuple.Add(miValueResult3);
const CMICmnMIValueConst miValueConst5(vrBrkPtInfo.m_fileName);
const CMICmnMIValueResult miValueResult5("file", miValueConst5);
- if (!vwrMiValueTuple.Add(miValueResult5))
- return MIstatus::failure;
+ vwrMiValueTuple.Add(miValueResult5);
const CMIUtilString strN5 = CMIUtilString::Format("%s/%s", vrBrkPtInfo.m_path.c_str(), vrBrkPtInfo.m_fileName.c_str());
const CMICmnMIValueConst miValueConst6(strN5);
const CMICmnMIValueResult miValueResult6("fullname", miValueConst6);
- if (!vwrMiValueTuple.Add(miValueResult6))
- return MIstatus::failure;
+ vwrMiValueTuple.Add(miValueResult6);
const CMIUtilString strLine(CMIUtilString::Format("%d", vrBrkPtInfo.m_nLine));
const CMICmnMIValueConst miValueConst7(strLine);
const CMICmnMIValueResult miValueResult7("line", miValueConst7);
- if (!vwrMiValueTuple.Add(miValueResult7))
- return MIstatus::failure;
-
- return MIstatus::success;
+ vwrMiValueTuple.Add(miValueResult7);
}
//++ ------------------------------------------------------------------------------------
@@ -716,65 +696,65 @@ CMICmnLLDBDebugSessionInfo::MIResponseFo
// "type="
const CMICmnMIValueConst miValueConst2(vrBrkPtInfo.m_strType);
const CMICmnMIValueResult miValueResult2("type", miValueConst2);
- bool bOk = miValueTuple.Add(miValueResult2);
+ miValueTuple.Add(miValueResult2);
// "disp="
const CMICmnMIValueConst miValueConst3(vrBrkPtInfo.m_bDisp ? "del" : "keep");
const CMICmnMIValueResult miValueResult3("disp", miValueConst3);
- bOk = bOk && miValueTuple.Add(miValueResult3);
+ miValueTuple.Add(miValueResult3);
// "enabled="
const CMICmnMIValueConst miValueConst4(vrBrkPtInfo.m_bEnabled ? "y" : "n");
const CMICmnMIValueResult miValueResult4("enabled", miValueConst4);
- bOk = bOk && miValueTuple.Add(miValueResult4);
+ miValueTuple.Add(miValueResult4);
// "addr="
// "func="
// "file="
// "fullname="
// "line="
- bOk = bOk && MIResponseFormBrkPtFrameInfo(vrBrkPtInfo, miValueTuple);
+ MIResponseFormBrkPtFrameInfo(vrBrkPtInfo, miValueTuple);
// "pending="
if (vrBrkPtInfo.m_bPending)
{
const CMICmnMIValueConst miValueConst(vrBrkPtInfo.m_strOrigLoc);
const CMICmnMIValueList miValueList(miValueConst);
const CMICmnMIValueResult miValueResult("pending", miValueList);
- bOk = bOk && miValueTuple.Add(miValueResult);
+ miValueTuple.Add(miValueResult);
}
if (vrBrkPtInfo.m_bHaveArgOptionThreadGrp)
{
const CMICmnMIValueConst miValueConst(vrBrkPtInfo.m_strOptThrdGrp);
const CMICmnMIValueList miValueList(miValueConst);
const CMICmnMIValueResult miValueResult("thread-groups", miValueList);
- bOk = bOk && miValueTuple.Add(miValueResult);
+ miValueTuple.Add(miValueResult);
}
// "times="
const CMICmnMIValueConst miValueConstB(CMIUtilString::Format("%d", vrBrkPtInfo.m_nTimes));
const CMICmnMIValueResult miValueResultB("times", miValueConstB);
- bOk = bOk && miValueTuple.Add(miValueResultB);
+ miValueTuple.Add(miValueResultB);
// "thread="
if (vrBrkPtInfo.m_bBrkPtThreadId)
{
const CMICmnMIValueConst miValueConst(CMIUtilString::Format("%d", vrBrkPtInfo.m_nBrkPtThreadId));
const CMICmnMIValueResult miValueResult("thread", miValueConst);
- bOk = bOk && miValueTuple.Add(miValueResult);
+ miValueTuple.Add(miValueResult);
}
// "cond="
if (vrBrkPtInfo.m_bCondition)
{
const CMICmnMIValueConst miValueConst(vrBrkPtInfo.m_strCondition);
const CMICmnMIValueResult miValueResult("cond", miValueConst);
- bOk = bOk && miValueTuple.Add(miValueResult);
+ miValueTuple.Add(miValueResult);
}
// "ignore="
if (vrBrkPtInfo.m_nIgnore != 0)
{
const CMICmnMIValueConst miValueConst(CMIUtilString::Format("%d", vrBrkPtInfo.m_nIgnore));
const CMICmnMIValueResult miValueResult("ignore", miValueConst);
- bOk = bOk && miValueTuple.Add(miValueResult);
+ miValueTuple.Add(miValueResult);
}
// "original-location="
const CMICmnMIValueConst miValueConstC(vrBrkPtInfo.m_strOrigLoc);
const CMICmnMIValueResult miValueResultC("original-location", miValueConstC);
- bOk = bOk && miValueTuple.Add(miValueResultC);
+ miValueTuple.Add(miValueResultC);
vwrMiValueTuple = miValueTuple;
Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h Wed Jul 22 12:07:27 2015
@@ -159,7 +159,7 @@ class CMICmnLLDBDebugSessionInfo : publi
bool MIResponseFormVariableInfo(const lldb::SBFrame &vrFrame, const MIuint vMaskVarTypes,
const VariableInfoFormat_e veVarInfoFormat, CMICmnMIValueList &vwrMiValueList,
const MIuint vnMaxDepth = 10, const bool vbMarkArgs = false);
- bool MIResponseFormBrkPtFrameInfo(const SBrkPtInfo &vrBrkPtInfo, CMICmnMIValueTuple &vwrMiValueTuple);
+ void MIResponseFormBrkPtFrameInfo(const SBrkPtInfo &vrBrkPtInfo, CMICmnMIValueTuple &vwrMiValueTuple);
bool MIResponseFormBrkPtInfo(const SBrkPtInfo &vrBrkPtInfo, CMICmnMIValueTuple &vwrMiValueTuple);
bool GetBrkPtInfo(const lldb::SBBreakpoint &vBrkPt, SBrkPtInfo &vrwBrkPtInfo) const;
bool RecordBrkPtInfo(const MIuint vnBrkPtId, const SBrkPtInfo &vrBrkPtInfo);
Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp Wed Jul 22 12:07:27 2015
@@ -543,10 +543,8 @@ CMICmnLLDBDebuggerHandleEvents::HandleEv
const CMIUtilString strSignal(CMIUtilString::Format("%lld", nId));
const CMICmnMIValueConst miValueConst2(strSignal);
const CMICmnMIValueResult miValueResult2("signal", miValueConst2);
- bool bOk = miOutOfBandRecord.Add(miValueResult2);
- bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
-
- return bOk;
+ miOutOfBandRecord.Add(miValueResult2);
+ return MiOutOfBandRecordToStdout(miOutOfBandRecord);
}
//++ ------------------------------------------------------------------------------------
@@ -692,17 +690,17 @@ CMICmnLLDBDebuggerHandleEvents::MiHelpGe
const CMIUtilString strTargetPath(apPath.get());
const CMICmnMIValueConst miValueConst(strTargetPath);
const CMICmnMIValueResult miValueResult("id", miValueConst);
- bOk = bOk && vwrMiOutOfBandRecord.Add(miValueResult);
+ vwrMiOutOfBandRecord.Add(miValueResult);
// Build "target-name" field
const CMICmnMIValueConst miValueConst2(strTargetPath);
const CMICmnMIValueResult miValueResult2("target-name", miValueConst2);
- bOk = bOk && vwrMiOutOfBandRecord.Add(miValueResult2);
+ vwrMiOutOfBandRecord.Add(miValueResult2);
// Build "host-name" field
vModule.GetPlatformFileSpec().GetPath(apPath.get(), PATH_MAX);
const CMIUtilString strHostPath(apPath.get());
const CMICmnMIValueConst miValueConst3(strHostPath);
const CMICmnMIValueResult miValueResult3("host-name", miValueConst3);
- bOk = bOk && vwrMiOutOfBandRecord.Add(miValueResult3);
+ vwrMiOutOfBandRecord.Add(miValueResult3);
// Then build extra fields if needed:
if (vbWithExtraFields)
@@ -713,13 +711,13 @@ CMICmnLLDBDebuggerHandleEvents::MiHelpGe
const bool bSymbolsLoaded = !CMIUtilString::Compare(strHostPath, strSymbolsPath);
const CMICmnMIValueConst miValueConst4(CMIUtilString::Format("%d", bSymbolsLoaded));
const CMICmnMIValueResult miValueResult4("symbols-loaded", miValueConst4);
- bOk = bOk && vwrMiOutOfBandRecord.Add(miValueResult4);
+ vwrMiOutOfBandRecord.Add(miValueResult4);
// Build "symbols-path" field
if (bSymbolsLoaded)
{
const CMICmnMIValueConst miValueConst5(strSymbolsPath);
const CMICmnMIValueResult miValueResult5("symbols-path", miValueConst5);
- bOk = bOk && vwrMiOutOfBandRecord.Add(miValueResult5);
+ vwrMiOutOfBandRecord.Add(miValueResult5);
}
// Build "loaded_addr" field
const lldb::SBAddress sbAddress(vModule.GetObjectFileHeaderAddress());
@@ -729,7 +727,7 @@ CMICmnLLDBDebuggerHandleEvents::MiHelpGe
CMIUtilString::Format("0x%016" PRIx64, nLoadAddress) : "-");
const CMICmnMIValueConst miValueConst6(strLoadedAddr);
const CMICmnMIValueResult miValueResult6("loaded_addr", miValueConst6);
- bOk = bOk && vwrMiOutOfBandRecord.Add(miValueResult6);
+ vwrMiOutOfBandRecord.Add(miValueResult6);
}
return bOk;
@@ -1018,21 +1016,21 @@ CMICmnLLDBDebuggerHandleEvents::HandlePr
CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
const CMICmnMIValueConst miValueConst2("SIGINT");
const CMICmnMIValueResult miValueResult2("signal-name", miValueConst2);
- bOk = miOutOfBandRecord.Add(miValueResult2);
+ miOutOfBandRecord.Add(miValueResult2);
const CMICmnMIValueConst miValueConst3("Interrupt");
const CMICmnMIValueResult miValueResult3("signal-meaning", miValueConst3);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult3);
+ miOutOfBandRecord.Add(miValueResult3);
CMICmnMIValueTuple miValueTuple;
bOk = bOk && MiHelpGetCurrentThreadFrame(miValueTuple);
const CMICmnMIValueResult miValueResult4("frame", miValueTuple);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult4);
+ miOutOfBandRecord.Add(miValueResult4);
const CMIUtilString strThreadId(CMIUtilString::Format("%" PRIu32, sbProcess.GetSelectedThread().GetIndexID()));
const CMICmnMIValueConst miValueConst5(strThreadId);
const CMICmnMIValueResult miValueResult5("thread-id", miValueConst5);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult5);
+ miOutOfBandRecord.Add(miValueResult5);
const CMICmnMIValueConst miValueConst6("all");
const CMICmnMIValueResult miValueResult6("stopped-threads", miValueConst6);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult6);
+ miOutOfBandRecord.Add(miValueResult6);
bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
bOk = bOk && CMICmnStreamStdout::WritePrompt();
}
@@ -1044,21 +1042,21 @@ CMICmnLLDBDebuggerHandleEvents::HandlePr
CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
const CMICmnMIValueConst miValueConst2("SIGSTOP");
const CMICmnMIValueResult miValueResult2("signal-name", miValueConst2);
- bOk = miOutOfBandRecord.Add(miValueResult2);
+ miOutOfBandRecord.Add(miValueResult2);
const CMICmnMIValueConst miValueConst3("Stop");
const CMICmnMIValueResult miValueResult3("signal-meaning", miValueConst3);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult3);
+ miOutOfBandRecord.Add(miValueResult3);
CMICmnMIValueTuple miValueTuple;
bOk = bOk && MiHelpGetCurrentThreadFrame(miValueTuple);
const CMICmnMIValueResult miValueResult4("frame", miValueTuple);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult4);
+ miOutOfBandRecord.Add(miValueResult4);
const CMIUtilString strThreadId(CMIUtilString::Format("%" PRIu32, sbProcess.GetSelectedThread().GetIndexID()));
const CMICmnMIValueConst miValueConst5(strThreadId);
const CMICmnMIValueResult miValueResult5("thread-id", miValueConst5);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult5);
+ miOutOfBandRecord.Add(miValueResult5);
const CMICmnMIValueConst miValueConst6("all");
const CMICmnMIValueResult miValueResult6("stopped-threads", miValueConst6);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult6);
+ miOutOfBandRecord.Add(miValueResult6);
bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
bOk = bOk && CMICmnStreamStdout::WritePrompt();
}
@@ -1070,18 +1068,18 @@ CMICmnLLDBDebuggerHandleEvents::HandlePr
CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
const CMICmnMIValueConst miValueConst2("SIGSEGV");
const CMICmnMIValueResult miValueResult2("signal-name", miValueConst2);
- bOk = miOutOfBandRecord.Add(miValueResult2);
+ miOutOfBandRecord.Add(miValueResult2);
const CMICmnMIValueConst miValueConst3("Segmentation fault");
const CMICmnMIValueResult miValueResult3("signal-meaning", miValueConst3);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult3);
+ miOutOfBandRecord.Add(miValueResult3);
CMICmnMIValueTuple miValueTuple;
bOk = bOk && MiHelpGetCurrentThreadFrame(miValueTuple);
const CMICmnMIValueResult miValueResult4("frame", miValueTuple);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult4);
+ miOutOfBandRecord.Add(miValueResult4);
const CMIUtilString strThreadId(CMIUtilString::Format("%d", sbProcess.GetSelectedThread().GetIndexID()));
const CMICmnMIValueConst miValueConst5(strThreadId);
const CMICmnMIValueResult miValueResult5("thread-id", miValueConst5);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult5);
+ miOutOfBandRecord.Add(miValueResult5);
bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
// Note no "(gdb)" output here
}
@@ -1119,22 +1117,22 @@ CMICmnLLDBDebuggerHandleEvents::HandlePr
{
const CMICmnMIValueConst miValueConst2(pSignal);
const CMICmnMIValueResult miValueResult2("signal-name", miValueConst2);
- bOk = miOutOfBandRecord.Add(miValueResult2);
+ miOutOfBandRecord.Add(miValueResult2);
}
else
{
const CMIUtilString strSignal(CMIUtilString::Format("%" PRIu64, nStopReason));
const CMICmnMIValueConst miValueConst2(strSignal);
const CMICmnMIValueResult miValueResult2("signal", miValueConst2);
- bOk = miOutOfBandRecord.Add(miValueResult2);
+ miOutOfBandRecord.Add(miValueResult2);
}
const CMIUtilString strThreadId(CMIUtilString::Format("%d", sbProcess.GetSelectedThread().GetIndexID()));
const CMICmnMIValueConst miValueConst3(strThreadId);
const CMICmnMIValueResult miValueResult3("thread-id", miValueConst3);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult3);
+ miOutOfBandRecord.Add(miValueResult3);
const CMICmnMIValueConst miValueConst4("all");
const CMICmnMIValueResult miValueResult4("stopped-threads", miValueConst4);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult4);
+ miOutOfBandRecord.Add(miValueResult4);
bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
bOk = bOk && CMICmnStreamStdout::WritePrompt();
}
@@ -1165,15 +1163,15 @@ CMICmnLLDBDebuggerHandleEvents::HandlePr
const CMIUtilString strReason(apStopDescription.get());
const CMICmnMIValueConst miValueConst2(strReason);
const CMICmnMIValueResult miValueResult2("exception", miValueConst2);
- bool bOk = miOutOfBandRecord.Add(miValueResult2);
+ miOutOfBandRecord.Add(miValueResult2);
const CMIUtilString strThreadId(CMIUtilString::Format("%d", sbThread.GetIndexID()));
const CMICmnMIValueConst miValueConst3(strThreadId);
const CMICmnMIValueResult miValueResult3("thread-id", miValueConst3);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult3);
+ miOutOfBandRecord.Add(miValueResult3);
const CMICmnMIValueConst miValueConst4("all");
const CMICmnMIValueResult miValueResult4("stopped-threads", miValueConst4);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult4);
- bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
+ miOutOfBandRecord.Add(miValueResult4);
+ bool bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
bOk = bOk && CMICmnStreamStdout::WritePrompt();
return bOk;
@@ -1278,21 +1276,21 @@ CMICmnLLDBDebuggerHandleEvents::MiStoppe
CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
const CMICmnMIValueConst miValueConst2("del");
const CMICmnMIValueResult miValueResult2("disp", miValueConst2);
- bOk = miOutOfBandRecord.Add(miValueResult2);
+ miOutOfBandRecord.Add(miValueResult2);
const CMIUtilString strBkp(CMIUtilString::Format("%d", vBrkPtId));
const CMICmnMIValueConst miValueConst3(strBkp);
CMICmnMIValueResult miValueResult3("bkptno", miValueConst3);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult3);
+ miOutOfBandRecord.Add(miValueResult3);
const CMICmnMIValueConst miValueConst4("{}");
const CMICmnMIValueResult miValueResult4("frame", miValueConst4);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult4);
+ miOutOfBandRecord.Add(miValueResult4);
const CMIUtilString strThreadId(CMIUtilString::Format("%d", vBrkPt.GetThreadIndex()));
const CMICmnMIValueConst miValueConst5(strThreadId);
const CMICmnMIValueResult miValueResult5("thread-id", miValueConst5);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult5);
+ miOutOfBandRecord.Add(miValueResult5);
const CMICmnMIValueConst miValueConst6("all");
const CMICmnMIValueResult miValueResult6("stopped-threads", miValueConst6);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult6);
+ miOutOfBandRecord.Add(miValueResult6);
bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
bOk = bOk && CMICmnStreamStdout::WritePrompt();
return bOk;
@@ -1307,11 +1305,11 @@ CMICmnLLDBDebuggerHandleEvents::MiStoppe
CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
const CMICmnMIValueConst miValueConstA("del");
const CMICmnMIValueResult miValueResultA("disp", miValueConstA);
- bOk = miOutOfBandRecord.Add(miValueResultA);
+ miOutOfBandRecord.Add(miValueResultA);
const CMIUtilString strBkp(CMIUtilString::Format("%d", vBrkPtId));
const CMICmnMIValueConst miValueConstB(strBkp);
CMICmnMIValueResult miValueResultB("bkptno", miValueConstB);
- bOk = bOk && miOutOfBandRecord.Add(miValueResultB);
+ miOutOfBandRecord.Add(miValueResultB);
// frame={addr=\"0x%016" PRIx64 "\",func=\"%s\",args=[],file=\"%s\",fullname=\"%s\",line=\"%d\"}
if (bOk)
@@ -1319,7 +1317,7 @@ CMICmnLLDBDebuggerHandleEvents::MiStoppe
CMICmnMIValueTuple miValueTuple;
bOk = bOk && rSessionInfo.MIResponseFormFrameInfo(thread, 0, CMICmnLLDBDebugSessionInfo::eFrameInfoFormat_AllArguments, miValueTuple);
const CMICmnMIValueResult miValueResult8("frame", miValueTuple);
- bOk = bOk && miOutOfBandRecord.Add(miValueResult8);
+ miOutOfBandRecord.Add(miValueResult8);
}
// Add to MI thread-id=\"%d\",stopped-threads=\"all\"
@@ -1328,13 +1326,13 @@ CMICmnLLDBDebuggerHandleEvents::MiStoppe
const CMIUtilString strThreadId(CMIUtilString::Format("%d", thread.GetIndexID()));
const CMICmnMIValueConst miValueConst8(strThreadId);
const CMICmnMIValueResult miValueResult8("thread-id", miValueConst8);
- bOk = miOutOfBandRecord.Add(miValueResult8);
+ miOutOfBandRecord.Add(miValueResult8);
}
if (bOk)
{
const CMICmnMIValueConst miValueConst9("all");
const CMICmnMIValueResult miValueResult9("stopped-threads", miValueConst9);
- bOk = miOutOfBandRecord.Add(miValueResult9);
+ miOutOfBandRecord.Add(miValueResult9);
bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
bOk = bOk && CMICmnStreamStdout::WritePrompt();
}
@@ -1365,7 +1363,7 @@ CMICmnLLDBDebuggerHandleEvents::HandlePr
CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
const CMICmnMIValueConst miValueConst2("all");
const CMICmnMIValueResult miValueResult2("stopped-threads", miValueConst2);
- bOk = miOutOfBandRecord.Add(miValueResult2);
+ miOutOfBandRecord.Add(miValueResult2);
bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
bOk = bOk && CMICmnStreamStdout::WritePrompt();
return bOk;
@@ -1385,24 +1383,19 @@ CMICmnLLDBDebuggerHandleEvents::HandlePr
const CMICmnMIValueResult miValueResult("reason", miValueConst);
CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
const CMICmnMIValueResult miValueResult2("frame", miValueTuple);
- bOk = miOutOfBandRecord.Add(miValueResult2);
+ miOutOfBandRecord.Add(miValueResult2);
// Add to MI thread-id=\"%d\",stopped-threads=\"all\"
- if (bOk)
- {
- const CMIUtilString strThreadId(CMIUtilString::Format("%d", thread.GetIndexID()));
- const CMICmnMIValueConst miValueConst8(strThreadId);
- const CMICmnMIValueResult miValueResult8("thread-id", miValueConst8);
- bOk = miOutOfBandRecord.Add(miValueResult8);
- }
- if (bOk)
- {
- const CMICmnMIValueConst miValueConst9("all");
- const CMICmnMIValueResult miValueResult9("stopped-threads", miValueConst9);
- bOk = miOutOfBandRecord.Add(miValueResult9);
- bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
- bOk = bOk && CMICmnStreamStdout::WritePrompt();
- }
+ const CMIUtilString strThreadId(CMIUtilString::Format("%d", thread.GetIndexID()));
+ const CMICmnMIValueConst miValueConst8(strThreadId);
+ const CMICmnMIValueResult miValueResult8("thread-id", miValueConst8);
+ miOutOfBandRecord.Add(miValueResult8);
+
+ const CMICmnMIValueConst miValueConst9("all");
+ const CMICmnMIValueResult miValueResult9("stopped-threads", miValueConst9);
+ miOutOfBandRecord.Add(miValueResult9);
+ bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
+ bOk = bOk && CMICmnStreamStdout::WritePrompt();
return bOk;
}
@@ -1518,8 +1511,8 @@ CMICmnLLDBDebuggerHandleEvents::HandlePr
CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited, miValueResult);
CMICmnMIValueConst miValueConst2("i1");
CMICmnMIValueResult miValueResult2("group-id", miValueConst2);
- bool bOk = miOutOfBandRecord.Add(miValueResult2);
- bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
+ miOutOfBandRecord.Add(miValueResult2);
+ bool bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
if (bOk)
{
CMICmnMIValueConst miValueConst3("i1");
@@ -1527,7 +1520,7 @@ CMICmnLLDBDebuggerHandleEvents::HandlePr
CMICmnMIOutOfBandRecord miOutOfBandRecord2(CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupExited, miValueResult3);
CMICmnMIValueConst miValueConst2("0");
CMICmnMIValueResult miValueResult2("exit-code", miValueConst2);
- bOk = miOutOfBandRecord2.Add(miValueResult2);
+ miOutOfBandRecord2.Add(miValueResult2);
bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord2);
}
if (bOk)
@@ -1686,8 +1679,8 @@ CMICmnLLDBDebuggerHandleEvents::ChkForSt
CMICmnMIOutOfBandRecord miOutOfBand(CMICmnMIOutOfBandRecord::eOutOfBand_ThreadCreated, miValueResult);
const CMICmnMIValueConst miValueConst2("i1");
const CMICmnMIValueResult miValueResult2("group-id", miValueConst2);
- bool bOk = miOutOfBand.Add(miValueResult2);
- bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBand);
+ miOutOfBand.Add(miValueResult2);
+ bool bOk = MiOutOfBandRecordToStdout(miOutOfBand);
if (!bOk)
return MIstatus::failure;
}
@@ -1726,8 +1719,8 @@ CMICmnLLDBDebuggerHandleEvents::ChkForSt
CMICmnMIOutOfBandRecord miOutOfBand(CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited, miValueResult);
const CMICmnMIValueConst miValueConst2("i1");
const CMICmnMIValueResult miValueResult2("group-id", miValueConst2);
- bool bOk = miOutOfBand.Add(miValueResult2);
- bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBand);
+ miOutOfBand.Add(miValueResult2);
+ bool bOk = MiOutOfBandRecordToStdout(miOutOfBand);
if (!bOk)
return MIstatus::failure;
Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp Wed Jul 22 12:07:27 2015
@@ -341,16 +341,12 @@ CMICmnLLDBUtilSBValue::GetCompositeValue
{
const bool bUseSpacing = true;
const CMICmnMIValueResult miValueResult(utilMember.GetName(), miValueConst, bUseSpacing);
- const bool bOk = vwrMiValueTuple.Add(miValueResult, bUseSpacing);
- if (!bOk)
- return MIstatus::failure;
+ vwrMiValueTuple.Add(miValueResult, bUseSpacing);
}
else
{
const bool bUseSpacing = false;
- const bool bOk = vwrMiValueTuple.Add(miValueConst, bUseSpacing);
- if (!bOk)
- return MIstatus::failure;
+ vwrMiValueTuple.Add(miValueConst, bUseSpacing);
}
}
Modified: lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp Wed Jul 22 12:07:27 2015
@@ -136,34 +136,28 @@ CMICmnMIOutOfBandRecord::GetString(void)
// (additional) result i.e. async-record ==> "*" type.
// Type: Method.
// Args: None.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIOutOfBandRecord::BuildAsyncRecord(void)
{
const char *pFormat = "%s%s";
const CMIUtilString &rStrAsyncRecord(ms_MapOutOfBandToOutOfBandText[m_eResultAsyncRecordClass]);
const CMIUtilString &rStrToken(ms_constMapAsyncRecordTextToToken[m_eResultAsyncRecordClass]);
m_strAsyncRecord = CMIUtilString::Format(pFormat, rStrToken.c_str(), rStrAsyncRecord.c_str());
-
- return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
// Details: Add to *this Out-of-band record additional information.
// Type: Method.
// Args: vResult - (R) A MI result object.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIOutOfBandRecord::Add(const CMICmnMIValueResult &vResult)
{
m_strAsyncRecord += ",";
m_strAsyncRecord += vResult.GetString();
-
- return MIstatus::success;
}
Modified: lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.h?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmnMIOutOfBandRecord.h Wed Jul 22 12:07:27 2015
@@ -81,7 +81,7 @@ class CMICmnMIOutOfBandRecord : public C
/* ctor */ CMICmnMIOutOfBandRecord(const OutOfBand_e veType, const CMICmnMIValueResult &vResult);
//
const CMIUtilString &GetString(void) const;
- bool Add(const CMICmnMIValueResult &vResult);
+ void Add(const CMICmnMIValueResult &vResult);
// Overridden:
public:
@@ -90,7 +90,7 @@ class CMICmnMIOutOfBandRecord : public C
// Methods:
private:
- bool BuildAsyncRecord(void);
+ void BuildAsyncRecord(void);
// Attributes:
private:
Modified: lldb/trunk/tools/lldb-mi/MICmnMIResultRecord.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIResultRecord.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnMIResultRecord.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnMIResultRecord.cpp Wed Jul 22 12:07:27 2015
@@ -126,15 +126,12 @@ CMICmnMIResultRecord::GetString() const
// Details: Add to *this result record additional information.
// Type: Method.
// Args: vMIValue - (R) A MI value derived object.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIResultRecord::Add(const CMICmnMIValue &vMIValue)
{
m_strResultRecord += ",";
m_strResultRecord += vMIValue.GetString();
-
- return MIstatus::success;
}
Modified: lldb/trunk/tools/lldb-mi/MICmnMIResultRecord.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIResultRecord.h?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnMIResultRecord.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmnMIResultRecord.h Wed Jul 22 12:07:27 2015
@@ -63,7 +63,7 @@ class CMICmnMIResultRecord : public CMIC
/* ctor */ CMICmnMIResultRecord(const CMIUtilString &vrToken, ResultClass_e veType, const CMICmnMIValueResult &vValue);
//
const CMIUtilString &GetString() const;
- bool Add(const CMICmnMIValue &vMIValue);
+ void Add(const CMICmnMIValue &vMIValue);
// Overridden:
public:
Modified: lldb/trunk/tools/lldb-mi/MICmnMIValueList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIValueList.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnMIValueList.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnMIValueList.cpp Wed Jul 22 12:07:27 2015
@@ -69,17 +69,14 @@ CMICmnMIValueList::~CMICmnMIValueList(vo
// Details: Build the result value's mandatory data part, one tuple
// Type: Method.
// Args: None.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIValueList::BuildList(void)
{
const char *pFormat = "[%s]";
m_strValue = CMIUtilString::Format(pFormat, m_strValue.c_str());
-
- return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
@@ -88,14 +85,13 @@ CMICmnMIValueList::BuildList(void)
// will return MIstatus::failure.
// Type: Method.
// Args: vResult - (R) The MI result object.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIValueList::Add(const CMICmnMIValueResult &vResult)
{
- return BuildList(vResult);
+ BuildList(vResult);
}
//++ ------------------------------------------------------------------------------------
@@ -104,14 +100,13 @@ CMICmnMIValueList::Add(const CMICmnMIVal
// will return MIstatus::failure.
// Type: Method.
// Args: vValue - (R) The MI value object.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIValueList::Add(const CMICmnMIValue &vValue)
{
- return BuildList(vValue);
+ BuildList(vValue);
}
//++ ------------------------------------------------------------------------------------
@@ -120,11 +115,10 @@ CMICmnMIValueList::Add(const CMICmnMIVal
// will return MIstatus::failure.
// Type: Method.
// Args: vResult - (R) The MI result object.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIValueList::BuildList(const CMICmnMIValueResult &vResult)
{
// Clear out the default "<Invalid>" text
@@ -132,14 +126,13 @@ CMICmnMIValueList::BuildList(const CMICm
{
m_bJustConstructed = false;
m_strValue = vResult.GetString();
- return BuildList();
+ BuildList();
+ return;
}
const CMIUtilString data(ExtractContentNoBrackets());
const char *pFormat = "[%s,%s]";
m_strValue = CMIUtilString::Format(pFormat, data.c_str(), vResult.GetString().c_str());
-
- return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
@@ -148,11 +141,10 @@ CMICmnMIValueList::BuildList(const CMICm
// will return MIstatus::failure.
// Type: Method.
// Args: vValue - (R) The MI value object.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIValueList::BuildList(const CMICmnMIValue &vValue)
{
// Clear out the default "<Invalid>" text
@@ -160,7 +152,8 @@ CMICmnMIValueList::BuildList(const CMICm
{
m_bJustConstructed = false;
m_strValue = vValue.GetString();
- return BuildList();
+ BuildList();
+ return;
}
// Remove already present '[' and ']' from the start and end
@@ -170,8 +163,6 @@ CMICmnMIValueList::BuildList(const CMICm
m_strValue = m_strValue.substr(1, len - 2);
const char *pFormat = "[%s,%s]";
m_strValue = CMIUtilString::Format(pFormat, m_strValue.c_str(), vValue.GetString().c_str());
-
- return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmnMIValueList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIValueList.h?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnMIValueList.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmnMIValueList.h Wed Jul 22 12:07:27 2015
@@ -41,8 +41,8 @@ class CMICmnMIValueList : public CMICmnM
/* ctor */ CMICmnMIValueList(const CMICmnMIValueResult &vResult);
/* ctor */ CMICmnMIValueList(const CMICmnMIValue &vValue);
//
- bool Add(const CMICmnMIValueResult &vResult);
- bool Add(const CMICmnMIValue &vValue);
+ void Add(const CMICmnMIValueResult &vResult);
+ void Add(const CMICmnMIValue &vValue);
CMIUtilString ExtractContentNoBrackets(void) const;
// Overridden:
@@ -52,7 +52,7 @@ class CMICmnMIValueList : public CMICmnM
// Methods:
private:
- bool BuildList(void);
- bool BuildList(const CMICmnMIValueResult &vResult);
- bool BuildList(const CMICmnMIValue &vResult);
+ void BuildList(void);
+ void BuildList(const CMICmnMIValueResult &vResult);
+ void BuildList(const CMICmnMIValue &vResult);
};
Modified: lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnMIValueResult.cpp Wed Jul 22 12:07:27 2015
@@ -76,17 +76,14 @@ CMICmnMIValueResult::~CMICmnMIValueResul
// Details: Build the MI value result string.
// Type: Method.
// Args: None.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIValueResult::BuildResult(void)
{
const char *pFormat = m_bUseSpacing ? "%s %s %s" : "%s%s%s";
m_strValue = CMIUtilString::Format(pFormat, m_strPartVariable.c_str(), ms_constStrEqual.c_str(), m_partMIValue.GetString().c_str());
-
- return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
@@ -94,18 +91,15 @@ CMICmnMIValueResult::BuildResult(void)
// Type: Method.
// Args: vrVariable - (R) MI value's name.
// vrValue - (R) The MI value.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIValueResult::BuildResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue)
{
const char *pFormat = m_bUseSpacing ? "%s, %s %s %s" : "%s,%s%s%s";
m_strValue =
CMIUtilString::Format(pFormat, m_strValue.c_str(), vVariable.c_str(), ms_constStrEqual.c_str(), vValue.GetString().c_str());
-
- return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
@@ -117,16 +111,16 @@ CMICmnMIValueResult::BuildResult(const C
// MIstatus::failure - Functional failed.
// Throws: None.
//--
-bool
+void
CMICmnMIValueResult::Add(const CMIUtilString &vrVariable, const CMICmnMIValue &vrValue)
{
if (!m_bEmptyConstruction)
- return BuildResult(vrVariable, vrValue);
+ BuildResult(vrVariable, vrValue);
else
{
m_bEmptyConstruction = false;
m_strPartVariable = vrVariable;
m_partMIValue = vrValue;
- return BuildResult();
+ BuildResult();
}
}
Modified: lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmnMIValueResult.h Wed Jul 22 12:07:27 2015
@@ -40,7 +40,7 @@ class CMICmnMIValueResult : public CMICm
/* ctor */ CMICmnMIValueResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
/* ctor */ CMICmnMIValueResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue, const bool vbUseSpacing);
//
- bool Add(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
+ void Add(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
// Overridden:
public:
@@ -49,8 +49,8 @@ class CMICmnMIValueResult : public CMICm
// Methods:
private:
- bool BuildResult(void);
- bool BuildResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
+ void BuildResult(void);
+ void BuildResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
// Attributes:
private:
Modified: lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.cpp Wed Jul 22 12:07:27 2015
@@ -69,28 +69,24 @@ CMICmnMIValueTuple::~CMICmnMIValueTuple(
// Details: Build the result value's mandatory data part, one tuple
// Type: Method.
// Args: None.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIValueTuple::BuildTuple(void)
{
const char *pFormat = "{%s}";
m_strValue = CMIUtilString::Format(pFormat, m_strValue.c_str());
-
- return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
// Details: Add another MI result object to the value's list of tuples.
// Type: Method.
// Args: vResult - (R) The MI result object.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIValueTuple::BuildTuple(const CMICmnMIValueResult &vResult)
{
// Clear out the default "<Invalid>" text
@@ -98,7 +94,8 @@ CMICmnMIValueTuple::BuildTuple(const CMI
{
m_bJustConstructed = false;
m_strValue = vResult.GetString();
- return BuildTuple();
+ BuildTuple();
+ return;
}
if (m_strValue[0] == '{')
@@ -112,19 +109,16 @@ CMICmnMIValueTuple::BuildTuple(const CMI
const char *pFormat = m_bSpaceAfterComma ? "{%s, %s}" : "{%s,%s}";
m_strValue = CMIUtilString::Format(pFormat, m_strValue.c_str(), vResult.GetString().c_str());
-
- return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
// Details: Add string value to the value's list of tuples.
// Type: Method.
// Args: vValue - (R) The string object.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIValueTuple::BuildTuple(const CMIUtilString &vValue)
{
// Clear out the default "<Invalid>" text
@@ -132,14 +126,13 @@ CMICmnMIValueTuple::BuildTuple(const CMI
{
m_bJustConstructed = false;
m_strValue = vValue;
- return BuildTuple();
+ BuildTuple();
+ return;
}
const CMIUtilString data(ExtractContentNoBrackets());
const char *pFormat = m_bSpaceAfterComma ? "{%s, %s}" : "{%s,%s}";
m_strValue = CMIUtilString::Format(pFormat, data.c_str(), vValue.c_str());
-
- return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
@@ -148,14 +141,13 @@ CMICmnMIValueTuple::BuildTuple(const CMI
// will return MIstatus::failure.
// Type: Method.
// Args: vValue - (R) The MI value object.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIValueTuple::Add(const CMICmnMIValueResult &vResult)
{
- return BuildTuple(vResult);
+ BuildTuple(vResult);
}
//++ ------------------------------------------------------------------------------------
@@ -165,15 +157,14 @@ CMICmnMIValueTuple::Add(const CMICmnMIVa
// Type: Method.
// Args: vValue - (R) The MI value object.
// vbUseSpacing - (R) True = put space separators into the string, false = no spaces used.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIValueTuple::Add(const CMICmnMIValueResult &vResult, const bool vbUseSpacing)
{
m_bSpaceAfterComma = vbUseSpacing;
- return BuildTuple(vResult);
+ BuildTuple(vResult);
}
//++ ------------------------------------------------------------------------------------
@@ -183,15 +174,14 @@ CMICmnMIValueTuple::Add(const CMICmnMIVa
// Type: Method.
// Args: vValue - (R) The MI value object.
// vbUseSpacing - (R) True = put space separators into the string, false = no spaces used.
-// Return: MIstatus::success - Functional succeeded.
-// MIstatus::failure - Functional failed.
+// Return: None.
// Throws: None.
//--
-bool
+void
CMICmnMIValueTuple::Add(const CMICmnMIValueConst &vValue, const bool vbUseSpacing)
{
m_bSpaceAfterComma = vbUseSpacing;
- return BuildTuple(vValue.GetString());
+ BuildTuple(vValue.GetString());
}
//++ ------------------------------------------------------------------------------------
Modified: lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h?rev=242911&r1=242910&r2=242911&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmnMIValueTuple.h Wed Jul 22 12:07:27 2015
@@ -42,9 +42,9 @@ class CMICmnMIValueTuple : public CMICmn
/* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult);
/* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult, const bool vbUseSpacing);
//
- bool Add(const CMICmnMIValueResult &vResult);
- bool Add(const CMICmnMIValueResult &vResult, const bool vbUseSpacing);
- bool Add(const CMICmnMIValueConst &vValue, const bool vbUseSpacing);
+ void Add(const CMICmnMIValueResult &vResult);
+ void Add(const CMICmnMIValueResult &vResult, const bool vbUseSpacing);
+ void Add(const CMICmnMIValueConst &vValue, const bool vbUseSpacing);
CMIUtilString ExtractContentNoBrackets(void) const;
// Overridden:
@@ -54,9 +54,9 @@ class CMICmnMIValueTuple : public CMICmn
// Methods:
private:
- bool BuildTuple(void);
- bool BuildTuple(const CMICmnMIValueResult &vResult);
- bool BuildTuple(const CMIUtilString &vValue);
+ void BuildTuple(void);
+ void BuildTuple(const CMICmnMIValueResult &vResult);
+ void BuildTuple(const CMIUtilString &vValue);
// Attributes:
private:
More information about the lldb-commits
mailing list