[Lldb-commits] [lldb] [lldb] Add target groups for related targets (PR #229180)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 12 11:51:20 PDT 2026


================
@@ -411,6 +416,43 @@ void Target::Destroy() {
   ClearDummySignals(signal_args);
 }
 
+std::vector<TargetGroupSP> Target::GetTargetGroups() const {
+  const auto &mutex = m_debugger.GetTargetGroupList().m_mutex;
+  std::lock_guard<std::recursive_mutex> guard(*mutex);
+  std::vector<TargetGroupSP> groups;
+  groups.reserve(m_target_groups.size());
+  for (const TargetGroupWP &group_wp : m_target_groups) {
+    if (TargetGroupSP group_sp = group_wp.lock())
+      groups.push_back(std::move(group_sp));
+  }
+  return groups;
+}
+
+void Target::AddTargetGroup(const TargetGroupSP &group_sp) {
+  const auto &mutex = m_debugger.GetTargetGroupList().m_mutex;
----------------
clayborg wrote:

Ditto here. Move this functionality into the TargetGroupList class.

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


More information about the lldb-commits mailing list