================
@@ -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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to