[Lldb-commits] [lldb] LLDB: WatchAddress ignores modify option (PR #124847)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 28 14:19:02 PST 2025


================
@@ -1342,7 +1342,9 @@ lldb::SBWatchpoint SBTarget::WatchAddress(lldb::addr_t addr, size_t size,
 
   SBWatchpointOptions options;
   options.SetWatchpointTypeRead(read);
-  options.SetWatchpointTypeWrite(eWatchpointWriteTypeOnModify);
+  if (modify) {
+    options.SetWatchpointTypeWrite(eWatchpointWriteTypeOnModify);
+  }
----------------
JDevlieghere wrote:

Nit: [Don’t use braces on simple single-statement bodies of if/else/loop statements
](https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements)

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


More information about the lldb-commits mailing list