[Lldb-commits] [PATCH] D88129: Add "break delete --disabled" to delete all currently disabled breakpoints

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 23 11:02:51 PDT 2020


kastiglione accepted this revision.
kastiglione added a comment.
This revision is now accepted and ready to land.

Nice improvement!

I think it's strange that `break delete DeleteMeNot` and `break delete --disabled DeleteMeNot ` behave differently. For the case that it supports, I would suggest that people can run two commands: `break enable DeleteMeNot` followed by `break delete --disabled`.



================
Comment at: lldb/source/Commands/CommandObjectBreakpoint.cpp:1475
     Target &target = GetSelectedOrDummyTarget(m_options.m_use_dummy);
-
+    result.Clear();
+    
----------------
why is this added?


================
Comment at: lldb/source/Commands/CommandObjectBreakpoint.cpp:1480
 
-    const BreakpointList &breakpoints = target.GetBreakpointList();
+    BreakpointList &breakpoints = target.GetBreakpointList();
 
----------------
does iterating over `breakpoints.Breakpoints()` require this to be non-const?


================
Comment at: lldb/source/Commands/Options.td:232
+    Desc<"Delete all breakpoints which are currently disabled.  When using the disabled option "
+    "any breakpoints listed on the command line are EXCLUDED from deletion.">;
 }
----------------
To me, it's counter intuitive that `break delete --disabled 1` will not delete bp 1.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88129/new/

https://reviews.llvm.org/D88129



More information about the lldb-commits mailing list