[Lldb-commits] [PATCH] D23026: [LLDB-MI] removing requirement of a parameter for -break-insert's -f flag
Pierson Lee via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 1 16:05:04 PDT 2016
pieandcakes updated this revision to Diff 70088.
pieandcakes added a comment.
Added error message if location is not specified per reviewers comments.
Repository:
rL LLVM
https://reviews.llvm.org/D23026
Files:
tools/lldb-mi/MICmdCmdBreak.cpp
tools/lldb-mi/MICmnResources.cpp
tools/lldb-mi/MICmnResources.h
Index: tools/lldb-mi/MICmnResources.h
===================================================================
--- tools/lldb-mi/MICmnResources.h
+++ tools/lldb-mi/MICmnResources.h
@@ -236,6 +236,7 @@
IDS_CMD_ERR_BRKPT_LOCATION_NOT_FOUND,
IDS_CMD_ERR_BRKPT_INVALID,
IDS_CMD_ERR_BRKPT_CNT_EXCEEDED,
+ IDS_CMD_ERR_BRKPT_BAD_LOCATION,
IDS_CMD_ERR_SOME_ERROR,
IDS_CMD_ERR_THREAD_INVALID,
IDS_CMD_ERR_THREAD_FRAME_RANGE_INVALID,
Index: tools/lldb-mi/MICmnResources.cpp
===================================================================
--- tools/lldb-mi/MICmnResources.cpp
+++ tools/lldb-mi/MICmnResources.cpp
@@ -219,6 +219,7 @@
{IDS_CMD_ERR_BRKPT_LOCATION_NOT_FOUND, "Command '%s'. Breakpoint location '%s' not found"},
{IDS_CMD_ERR_BRKPT_INVALID, "Command '%s'. Breakpoint '%s' invalid"},
{IDS_CMD_ERR_BRKPT_CNT_EXCEEDED, "Command '%s'. Number of valid breakpoint exceeded %d. Cannot create new breakpoint '%s'"},
+ {IDS_CMD_ERR_BRKPT_BAD_LOCATION, "Command '%s'. Unable to parse breakpoint location."},
{IDS_CMD_ERR_SOME_ERROR, "Command '%s'. Error: %s"},
{IDS_CMD_ERR_THREAD_INVALID, "Command '%s'. Thread ID invalid"},
{IDS_CMD_ERR_THREAD_FRAME_RANGE_INVALID, "Command '%s'. Thread frame range invalid"},
Index: tools/lldb-mi/MICmdCmdBreak.cpp
===================================================================
--- tools/lldb-mi/MICmdCmdBreak.cpp
+++ tools/lldb-mi/MICmdCmdBreak.cpp
@@ -90,8 +90,7 @@
{
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_constStrArgNamedPendinfBrkPt, false, true));
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,
@@ -156,10 +155,11 @@
m_bBrkPtIsPending = pArgPendingBrkPt->GetFound();
if (pArgLocation->GetFound())
m_brkName = pArgLocation->GetValue();
- else if (m_bBrkPtIsPending)
- {
- pArgPendingBrkPt->GetExpectedOption<CMICmdArgValString, CMIUtilString>(m_brkName);
+ else {
+ SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_BRKPT_BAD_LOCATION), m_cmdData.strMiCmd.c_str()));
+ return MIstatus::failure;
}
+
if (pArgIgnoreCnt->GetFound())
{
pArgIgnoreCnt->GetExpectedOption<CMICmdArgValNumber, MIuint>(m_nBrkPtIgnoreCount);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23026.70088.patch
Type: text/x-patch
Size: 2884 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160901/8304da51/attachment.bin>
More information about the lldb-commits
mailing list