LLDB  mainline
Public Member Functions | Protected Types | Protected Attributes | Private Member Functions | List of all members
lldb_private::PlatformList Class Reference

#include <Platform.h>

Collaboration diagram for lldb_private::PlatformList:
Collaboration graph
[legend]

Public Member Functions

 PlatformList ()=default
 
 ~PlatformList ()=default
 
void Append (const lldb::PlatformSP &platform_sp, bool set_selected)
 
size_t GetSize ()
 
lldb::PlatformSP GetAtIndex (uint32_t idx)
 
lldb::PlatformSP GetSelectedPlatform ()
 Select the active platform. More...
 
void SetSelectedPlatform (const lldb::PlatformSP &platform_sp)
 
lldb::PlatformSP GetOrCreate (llvm::StringRef name)
 
lldb::PlatformSP GetOrCreate (const ArchSpec &arch, const ArchSpec &process_host_arch, ArchSpec *platform_arch_ptr, Status &error)
 
lldb::PlatformSP GetOrCreate (const ArchSpec &arch, const ArchSpec &process_host_arch, ArchSpec *platform_arch_ptr)
 
lldb::PlatformSP GetOrCreate (llvm::ArrayRef< ArchSpec > archs, const ArchSpec &process_host_arch, std::vector< lldb::PlatformSP > &candidates)
 Get the platform for the given list of architectures. More...
 
lldb::PlatformSP Create (llvm::StringRef name)
 

Protected Types

typedef std::vector< lldb::PlatformSP > collection
 

Protected Attributes

std::recursive_mutex m_mutex
 
collection m_platforms
 
lldb::PlatformSP m_selected_platform_sp
 

Private Member Functions

 PlatformList (const PlatformList &)=delete
 
const PlatformListoperator= (const PlatformList &)=delete
 

Detailed Description

Definition at line 946 of file Platform.h.

Member Typedef Documentation

◆ collection

typedef std::vector<lldb::PlatformSP> lldb_private::PlatformList::collection
protected

Definition at line 1030 of file Platform.h.

Constructor & Destructor Documentation

◆ PlatformList() [1/2]

lldb_private::PlatformList::PlatformList ( )
default

◆ ~PlatformList()

lldb_private::PlatformList::~PlatformList ( )
default

◆ PlatformList() [2/2]

lldb_private::PlatformList::PlatformList ( const PlatformList )
privatedelete

Member Function Documentation

◆ Append()

void lldb_private::PlatformList::Append ( const lldb::PlatformSP &  platform_sp,
bool  set_selected 
)
inline

Definition at line 952 of file Platform.h.

References m_mutex, m_platforms, and m_selected_platform_sp.

Referenced by lldb_private::Debugger::Debugger().

◆ Create()

PlatformSP PlatformList::Create ( llvm::StringRef  name)

◆ GetAtIndex()

lldb::PlatformSP lldb_private::PlatformList::GetAtIndex ( uint32_t  idx)
inline

Definition at line 964 of file Platform.h.

References m_mutex, and m_platforms.

◆ GetOrCreate() [1/4]

PlatformSP PlatformList::GetOrCreate ( const ArchSpec arch,
const ArchSpec process_host_arch,
ArchSpec platform_arch_ptr 
)

Definition at line 2009 of file Platform.cpp.

References error(), GetOrCreate(), and lldb_private::ArchSpec::IsValid().

◆ GetOrCreate() [2/4]

PlatformSP PlatformList::GetOrCreate ( const ArchSpec arch,
const ArchSpec process_host_arch,
ArchSpec platform_arch_ptr,
Status error 
)

◆ GetOrCreate() [3/4]

lldb::PlatformSP lldb_private::PlatformList::GetOrCreate ( llvm::ArrayRef< ArchSpec archs,
const ArchSpec process_host_arch,
std::vector< lldb::PlatformSP > &  candidates 
)

Get the platform for the given list of architectures.

The algorithm works a follows:

  1. Returns the selected platform if it matches any of the architectures.
  2. Returns the host platform if it matches any of the architectures.
  3. Returns the platform that matches all the architectures.

If none of the above apply, this function returns a default platform. The candidates output argument differentiates between either no platforms supporting the given architecture or multiple platforms supporting the given architecture.

◆ GetOrCreate() [4/4]

PlatformSP PlatformList::GetOrCreate ( llvm::StringRef  name)

◆ GetSelectedPlatform()

lldb::PlatformSP lldb_private::PlatformList::GetSelectedPlatform ( )
inline

Select the active platform.

In order to debug remotely, other platform's can be remotely connected to and set as the selected platform for any subsequent debugging. This allows connection to remote targets and allows the ability to discover process info, launch and attach to remote processes.

Definition at line 980 of file Platform.h.

References m_mutex, m_platforms, and m_selected_platform_sp.

Referenced by lldb_private::Target::Attach(), lldb_private::TargetList::CreateTargetInternal(), lldb_private::CommandCompletions::RemoteDiskDirectories(), and lldb_private::CommandCompletions::RemoteDiskFiles().

◆ GetSize()

size_t lldb_private::PlatformList::GetSize ( )
inline

Definition at line 959 of file Platform.h.

References m_mutex, and m_platforms.

◆ operator=()

const PlatformList& lldb_private::PlatformList::operator= ( const PlatformList )
privatedelete

◆ SetSelectedPlatform()

void lldb_private::PlatformList::SetSelectedPlatform ( const lldb::PlatformSP &  platform_sp)
inline

Member Data Documentation

◆ m_mutex

std::recursive_mutex lldb_private::PlatformList::m_mutex
mutableprotected

◆ m_platforms

collection lldb_private::PlatformList::m_platforms
protected

◆ m_selected_platform_sp

lldb::PlatformSP lldb_private::PlatformList::m_selected_platform_sp
protected

Definition at line 1033 of file Platform.h.

Referenced by Append(), GetSelectedPlatform(), and SetSelectedPlatform().


The documentation for this class was generated from the following files: