kastiglione added inline comments.

================
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.">;
 }
----------------
jingham wrote:
> kastiglione wrote:
> > To me, it's counter intuitive that `break delete --disabled 1` will not 
> > delete bp 1.
> The combination:
> 
> (lldb) break delete --disabled 1
> 
> could either mean 
> 
> 1) delete all breakpoints that are disabled AND breakpoint 1
> 2) delete all breakpoints that are disabled EXCEPT breakpoint 1
> 3) an error
> 
> Of those interpretations, 1 and 3 don't seem very useful, but 2 does.  
> 
> This is particularly handy when you specify a breakpoint name, not a 
> breakpoint.  Just make breakpoints you don't want deleted DoNotDelete, then 
> you can easily protect all those breakpoints.  
> 
> Note, your workaround would only be useful in this case if all the 
> breakpoints named DoNotDelete are currently disabled.  Otherwise you would 
> have to remember which of the DoNotDelete breakpoints were disabled, enable 
> them all, do the `delete --disabled` then  only re-disable those that were 
> originally disabled.  Whereas if you can pass an exclude list you can just 
> protect those breakpoints unconditionally regardless of their state.
> 
> So while I agree this is a little odd, it's actually the only option that 
> really makes sense, it's easy to document, and I don't think it's likely to 
> cause mistakes. 
why does the first interpretation not seem useful? If I'm deleting breakpoints, 
I might want to delete both disabled breakpoints and one or more specific 
breakpoints. To do that I would probably intuitively write `break delete 
--disabled OthersToDelete`.

Could the ambiguity be removed by adding another flag? `break delete --disabled 
--except DoNotDelete`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88129

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to