[Lldb-commits] [lldb] [lldb] Add 'modify' type watchpoints, make it default (PR #66308)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 14 09:46:53 PDT 2023


================
@@ -3109,14 +3109,15 @@ static GDBStoppointType GetGDBStoppointType(Watchpoint *wp) {
   assert(wp);
   bool watch_read = wp->WatchpointRead();
   bool watch_write = wp->WatchpointWrite();
+  bool watch_modify = wp->WatchpointModify();
 
-  // watch_read and watch_write cannot both be false.
-  assert(watch_read || watch_write);
-  if (watch_read && watch_write)
+  // watch_read, watch_write, watch_modify cannot all be false.
+  assert(watch_read || watch_write || watch_modify);
----------------
bulbazord wrote:

It might be worth putting that comment into the assertion so it's a little easier to understand at first glance?

```
  assert((watch_read || watch_write || watch_modify) && "watch_read, watch_write, watch_modify cannot all be false.");
  ```

https://github.com/llvm/llvm-project/pull/66308


More information about the lldb-commits mailing list