[Lldb-commits] [PATCH] D100503: [lldb] [client] Implement follow-fork-mode

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 14 09:59:23 PDT 2021


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



More information about the lldb-commits mailing list