breakpoint command add currently doesn't support adding commands to more than one breakpoint
at a time. Enforce this for now (we should relax the requirement when we have a little more time.)
<rdar://problem/13314462>
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176291 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectBreakpointCommand.cpp b/source/Commands/CommandObjectBreakpointCommand.cpp
index 8346d53..b1402c8 100644
--- a/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -534,6 +534,13 @@
if (result.Succeeded())
{
const size_t count = valid_bp_ids.GetSize();
+ if (count > 1)
+ {
+ result.AppendError ("can only add commands to one breakpoint at a time.");
+ result.SetStatus (eReturnStatusFailed);
+ return false;
+ }
+
for (size_t i = 0; i < count; ++i)
{
BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex (i);