summaryrefslogtreecommitdiffstats
path: root/lldb/tools
diff options
context:
space:
mode:
authorHafiz Abid Qadeer <hafiz_abid@mentor.com>2015-09-04 11:26:53 +0000
committerHafiz Abid Qadeer <hafiz_abid@mentor.com>2015-09-04 11:26:53 +0000
commit3c3466529b168e9daee705bcd950eb1d2ea9359a (patch)
tree7e5780ee544719f24dca2f22ddfae0d6f90c88c7 /lldb/tools
parentcaacd53dde6ea46d03abf272aa996957433ce31d (diff)
downloadbcm5719-llvm-3c3466529b168e9daee705bcd950eb1d2ea9359a.tar.gz
bcm5719-llvm-3c3466529b168e9daee705bcd950eb1d2ea9359a.zip
Fix multiple problems in -break-condition command.
1. To handle the expression with spaces, this command uses 2 arguments. For a case like -break-condition 1 i == 5, the first will pick the 'i' and second will pick the '== 5'. But the second argument was made mandatory which failed in cases when there was no space in the expression like i==5. 2. The function GetRestOfExpressionNotSurroundedInQuotes has 2 locals with the same names. It resulted in one hiding the other and this function always returned empty string. No regression on Linux. Committed as obvious. llvm-svn: 246847
Diffstat (limited to 'lldb/tools')
-rw-r--r--lldb/tools/lldb-mi/MICmdCmdBreak.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/tools/lldb-mi/MICmdCmdBreak.cpp b/lldb/tools/lldb-mi/MICmdCmdBreak.cpp
index 3c16e2e1c6e..ec103b7cbc6 100644
--- a/lldb/tools/lldb-mi/MICmdCmdBreak.cpp
+++ b/lldb/tools/lldb-mi/MICmdCmdBreak.cpp
@@ -937,7 +937,7 @@ CMICmdCmdBreakCondition::ParseArgs()
*(new CMICmdArgValOptionLong(m_constStrArgNamedThreadGrp, false, false, CMICmdArgValListBase::eArgValType_ThreadGrp, 1)));
m_setCmdArgs.Add(*(new CMICmdArgValNumber(m_constStrArgNamedNumber, true, true)));
m_setCmdArgs.Add(*(new CMICmdArgValString(m_constStrArgNamedExpr, true, true, true, true)));
- m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedExprNoQuotes, true, false,
+ m_setCmdArgs.Add(*(new CMICmdArgValListOfN(m_constStrArgNamedExprNoQuotes, false, false,
CMICmdArgValListBase::eArgValType_StringQuotedNumber)));
return ParseValidateCmdOptions();
}
@@ -1042,7 +1042,6 @@ CMICmdCmdBreakCondition::GetRestOfExpressionNotSurroundedInQuotes()
CMICmdArgValListOfN *pArgExprNoQuotes = CMICmdBase::GetOption<CMICmdArgValListOfN>(m_constStrArgNamedExprNoQuotes);
if (pArgExprNoQuotes != nullptr)
{
- CMIUtilString strExpression;
const CMICmdArgValListBase::VecArgObjPtr_t &rVecExprParts(pArgExprNoQuotes->GetExpectedOptions());
if (!rVecExprParts.empty())
{
OpenPOWER on IntegriCloud