9#ifndef LLDB_TARGET_TARGETGROUP_H
10#define LLDB_TARGET_TARGETGROUP_H
13#include "llvm/ADT/StringRef.h"
14#include "llvm/Support/Error.h"
29class TargetGroup :
public std::enable_shared_from_this<TargetGroup> {
59 std::vector<lldb::TargetSP>
GetTargets()
const;
62 std::vector<lldb::TargetSP>
GetTargets(Role role)
const;
73 std::shared_ptr<std::recursive_mutex> mutex)
79 std::shared_ptr<std::recursive_mutex>
m_mutex;
std::shared_ptr< std::recursive_mutex > m_mutex
llvm::StringRef GetDescription() const
friend class TargetGroupList
bool RemoveTarget(const lldb::TargetSP &target_sp)
Remove target_sp from the group.
std::vector< Entry > m_entries
Targets are weakly held so membership does not extend their lifetime.
TargetGroup & operator=(const TargetGroup &)=delete
Role
Describes the part a target plays in this group.
llvm::Error AddTarget(const lldb::TargetSP &target_sp, Role role)
Add target_sp to the group with role.
std::optional< Role > GetRole(const lldb::TargetSP &target_sp) const
Return the role assigned to target_sp, if it is a member.
TargetGroup(const TargetGroup &)=delete
Target groups have identity and maintain backlinks in their member targets, so they cannot be copied ...
std::vector< lldb::TargetSP > GetTargets() const
Return every target in the group.
lldb::DebuggerWP m_debugger_wp
TargetGroup(TargetGroup &&)=delete
TargetGroup & operator=(TargetGroup &&)=delete
std::string m_description
TargetGroup(const lldb::DebuggerSP &debugger_sp, llvm::StringRef description, std::shared_ptr< std::recursive_mutex > mutex)
A class that represents a running process on the host machine.
std::weak_ptr< lldb_private::Debugger > DebuggerWP
std::shared_ptr< lldb_private::Debugger > DebuggerSP
std::weak_ptr< lldb_private::Target > TargetWP
std::shared_ptr< lldb_private::Target > TargetSP