JDevlieghere added inline comments.

================
Comment at: 
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp:5504-5513
+  WatchpointList &wps = GetTarget().GetWatchpointList();
+  size_t wp_count = wps.GetSize();
+  for (size_t i = 0; i < wp_count; ++i) {
+    WatchpointSP wp = wps.GetByIndex(i);
+    if (wp->IsEnabled()) {
+      GDBStoppointType type = GetGDBStoppointType(wp.get());
+      m_gdb_comm.SendGDBStoppointTypePacket(type, enable, wp->GetLoadAddress(),
----------------
Should we lock the `WatchpointList` while iterating over it? If so I think that 
class could benefit from an Iterable (like D105914) that will lock during 
iteration, which would also simplify this code a bit. 


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

https://reviews.llvm.org/D100503

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

Reply via email to