[Lldb-commits] [PATCH] D106623: Fix a logic error in "break delete --disabled" when no "protected" breakpoints are specified.

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 22 18:03:08 PDT 2021


jingham created this revision.
jingham added a reviewer: JDevlieghere.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Fix "break delete --disabled" with no arguments.

      

The code that figured out which breakpoints to delete was supposed
to set the result status if it found breakpoints, and then the code
that actually deleted them checked that the result's status was set.

      

The code for "break delete --disabled" failed to set the status if
no "protected" breakpoints were provided.  This was a confusing way
to implement this, so I reworked it with early returns so it was less
error prone, and added a test case for the no arguments case.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106623

Files:
  lldb/source/Commands/CommandObjectBreakpoint.cpp
  lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106623.361050.patch
Type: text/x-patch
Size: 6810 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210723/ddf46ea8/attachment.bin>


More information about the lldb-commits mailing list