|
LLDB mainline
|
A thread-safe collection of target groups. More...
#include <TargetGroupList.h>
Public Member Functions | |
| ~TargetGroupList () | |
| TargetGroupList (const TargetGroupList &)=delete | |
| TargetGroupList & | operator= (const TargetGroupList &)=delete |
| TargetGroupList (TargetGroupList &&)=delete | |
| TargetGroupList & | operator= (TargetGroupList &&)=delete |
| lldb::TargetGroupSP | CreateTargetGroup (llvm::StringRef description) |
| Create and register a target group. | |
| template<typename GroupT, typename... Args> | |
| std::shared_ptr< GroupT > | CreateTargetGroup (llvm::StringRef description, Args &&...args) |
| Create and register a target group of type GroupT. | |
| bool | DeleteTargetGroup (const lldb::TargetGroupSP &group_sp) |
Remove group_sp from this list. | |
| std::vector< lldb::TargetGroupSP > | GetGroups () const |
| Return a snapshot of the target groups. | |
Private Member Functions | |
| TargetGroupList (Debugger &debugger) | |
| TargetGroupList (Debugger &debugger, const std::shared_ptr< std::recursive_mutex > &mutex) | |
| void | Add (const lldb::TargetGroupSP &group_sp) |
| void | Remove (const TargetGroup *group) |
| void | Clear () |
| void | RemoveTarget (const lldb::TargetSP &target_sp) |
Private Attributes | |
| Debugger & | m_debugger |
| std::shared_ptr< std::recursive_mutex > | m_mutex |
| Shared by the debugger's list, each target's list, and every group. | |
| std::vector< lldb::TargetGroupSP > | m_groups |
Friends | |
| class | Debugger |
| class | Target |
| class | TargetGroup |
A thread-safe collection of target groups.
A Debugger uses one as its registry, and each Target uses one for the groups it belongs to.
Definition at line 24 of file TargetGroupList.h.
|
inlineexplicitprivate |
Definition at line 29 of file TargetGroupList.h.
References Debugger, m_debugger, and m_mutex.
Referenced by operator=(), operator=(), TargetGroupList(), and TargetGroupList().
|
inlineprivate |
Definition at line 33 of file TargetGroupList.h.
References Debugger, m_debugger, and m_mutex.
| TargetGroupList::~TargetGroupList | ( | ) |
Definition at line 16 of file TargetGroupList.cpp.
References Clear().
|
delete |
References TargetGroupList().
|
delete |
References TargetGroupList().
|
private |
Definition at line 39 of file TargetGroupList.cpp.
|
private |
Definition at line 69 of file TargetGroupList.cpp.
References m_groups, and m_mutex.
Referenced by ~TargetGroupList().
| TargetGroupSP TargetGroupList::CreateTargetGroup | ( | llvm::StringRef | description | ) |
Create and register a target group.
Definition at line 18 of file TargetGroupList.cpp.
References CreateTargetGroup().
Referenced by CreateTargetGroup(), and lldb_private::process_gdb_remote::ProcessGDBRemote::HandleAcceleratorConnection().
|
inline |
Create and register a target group of type GroupT.
GroupT is constructed with this list, description, and args. Its constructor may be private if it friends TargetGroupList. Runtime-identifiable subclasses should use llvm::RTTIExtends<GroupT, TargetGroup>.
Definition at line 53 of file TargetGroupList.h.
| bool TargetGroupList::DeleteTargetGroup | ( | const lldb::TargetGroupSP & | group_sp | ) |
Remove group_sp from this list.
Other shared references, including target membership lists, remain valid.
Definition at line 22 of file TargetGroupList.cpp.
References m_groups, and m_mutex.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::HandleAcceleratorConnection().
| std::vector< TargetGroupSP > TargetGroupList::GetGroups | ( | ) | const |
Return a snapshot of the target groups.
Modifying the returned vector does not modify this list.
Definition at line 34 of file TargetGroupList.cpp.
References m_groups, and m_mutex.
Referenced by CommandObjectTargetGroupsList::DoExecute().
|
delete |
References TargetGroupList().
|
delete |
References TargetGroupList().
|
private |
Definition at line 48 of file TargetGroupList.cpp.
References m_groups, m_mutex, and TargetGroup.
|
private |
Definition at line 55 of file TargetGroupList.cpp.
References m_debugger, m_groups, and m_mutex.
|
friend |
Definition at line 26 of file TargetGroupList.h.
References Debugger.
Referenced by Debugger, TargetGroupList(), and TargetGroupList().
|
friend |
|
friend |
Definition at line 73 of file TargetGroupList.h.
References TargetGroup.
Referenced by Remove(), and TargetGroup.
|
private |
Definition at line 80 of file TargetGroupList.h.
Referenced by RemoveTarget(), TargetGroupList(), and TargetGroupList().
|
private |
Definition at line 84 of file TargetGroupList.h.
Referenced by Add(), Clear(), CreateTargetGroup(), DeleteTargetGroup(), GetGroups(), Remove(), and RemoveTarget().
|
private |
Shared by the debugger's list, each target's list, and every group.
Group membership operations never acquire Target::m_mutex.
Definition at line 83 of file TargetGroupList.h.
Referenced by Add(), Clear(), CreateTargetGroup(), DeleteTargetGroup(), GetGroups(), Remove(), RemoveTarget(), TargetGroupList(), and TargetGroupList().