clayborg added a comment.

So one issue with this is some things, like GDB servers, might not need you to 
disable breakpoints in a range because they actually set the breakpoint for you 
and you don't know what opcode they used. I am hoping this works with that and 
doesn't cause us to manually write to memory when we don't need to by forcing 
every process subclass to always to the manual re-writing of the breakpoint 

Comment at: include/lldb/Breakpoint/BreakpointSiteList.h:129
-  void ForEach(std::function<void(BreakpointSite *)> const &callback);
+  using ModifyingCallback = std::function<void(BreakpointSite &)>;
+  void ForEach(const ModifyingCallback &callback);
Have this function return a bool where true means to keep iterating, and false 
means to stop iterating. This is how many other ForEach functions are done in 
LLDB and allows the ForEach to be used to linearly search a list and stop when 

Comment at: include/lldb/Breakpoint/BreakpointSiteList.h:132-133
+  using Callback = std::function<void(const BreakpointSite &)>;
+  void ForEach(const Callback &callback) const;

lldb-commits mailing list

Reply via email to