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

#include <ThreadSpec.h>

Public Member Functions

 ThreadSpec ()
 
StructuredData::ObjectSP SerializeToStructuredData ()
 
void SetIndex (uint32_t index)
 
void SetTID (lldb::tid_t tid)
 
void SetName (llvm::StringRef name)
 
void SetQueueName (llvm::StringRef queue_name)
 
uint32_t GetIndex () const
 
lldb::tid_t GetTID () const
 
const char * GetName () const
 
const char * GetQueueName () const
 
bool TIDMatches (lldb::tid_t thread_id) const
 
bool TIDMatches (Thread &thread) const
 
bool IndexMatches (uint32_t index) const
 
bool IndexMatches (Thread &thread) const
 
bool NameMatches (const char *name) const
 
bool NameMatches (Thread &thread) const
 
bool QueueNameMatches (const char *queue_name) const
 
bool QueueNameMatches (Thread &thread) const
 
bool ThreadPassesBasicTests (Thread &thread) const
 
bool HasSpecification () const
 
void GetDescription (Stream *s, lldb::DescriptionLevel level) const
 

Static Public Member Functions

static std::unique_ptr< ThreadSpecCreateFromStructuredData (const StructuredData::Dictionary &data_dict, Status &error)
 
static const char * GetSerializationKey ()
 

Private Types

enum class  OptionNames {
  ThreadIndex = 0 , ThreadID , ThreadName , QueueName ,
  LastOptionName
}
 

Static Private Member Functions

static const char * GetKey (OptionNames enum_value)
 

Private Attributes

uint32_t m_index = UINT32_MAX
 
lldb::tid_t m_tid = LLDB_INVALID_THREAD_ID
 
std::string m_name
 
std::string m_queue_name
 

Static Private Attributes

static const char * g_option_names [(size_t) OptionNames::LastOptionName]
 

Detailed Description

Definition at line 33 of file ThreadSpec.h.

Member Enumeration Documentation

◆ OptionNames

enum class lldb_private::ThreadSpec::OptionNames
strongprivate
Enumerator
ThreadIndex 
ThreadID 
ThreadName 
QueueName 
LastOptionName 

Definition at line 110 of file ThreadSpec.h.

Constructor & Destructor Documentation

◆ ThreadSpec()

ThreadSpec::ThreadSpec ( )

Definition at line 20 of file ThreadSpec.cpp.

Referenced by CreateFromStructuredData().

Member Function Documentation

◆ CreateFromStructuredData()

std::unique_ptr< ThreadSpec > ThreadSpec::CreateFromStructuredData ( const StructuredData::Dictionary data_dict,
Status error 
)
static

◆ GetDescription()

void ThreadSpec::GetDescription ( Stream s,
lldb::DescriptionLevel  level 
) const

◆ GetIndex()

uint32_t lldb_private::ThreadSpec::GetIndex ( ) const
inline

◆ GetKey()

static const char * lldb_private::ThreadSpec::GetKey ( OptionNames  enum_value)
inlinestaticprivate

Definition at line 119 of file ThreadSpec.h.

References g_option_names.

Referenced by CreateFromStructuredData(), and SerializeToStructuredData().

◆ GetName()

const char * ThreadSpec::GetName ( ) const

◆ GetQueueName()

const char * ThreadSpec::GetQueueName ( ) const

◆ GetSerializationKey()

static const char * lldb_private::ThreadSpec::GetSerializationKey ( )
inlinestatic

◆ GetTID()

lldb::tid_t lldb_private::ThreadSpec::GetTID ( ) const
inline

◆ HasSpecification()

bool ThreadSpec::HasSpecification ( ) const

Definition at line 126 of file ThreadSpec.cpp.

References LLDB_INVALID_THREAD_ID, m_index, m_name, m_queue_name, m_tid, and UINT32_MAX.

Referenced by GetDescription(), and ThreadPassesBasicTests().

◆ IndexMatches() [1/2]

bool ThreadSpec::IndexMatches ( Thread thread) const

Definition at line 84 of file ThreadSpec.cpp.

References lldb_private::Thread::GetIndexID(), IndexMatches(), m_index, and UINT32_MAX.

◆ IndexMatches() [2/2]

bool lldb_private::ThreadSpec::IndexMatches ( uint32_t  index) const
inline

Definition at line 72 of file ThreadSpec.h.

References m_index, and UINT32_MAX.

Referenced by IndexMatches(), and ThreadPassesBasicTests().

◆ NameMatches() [1/2]

bool lldb_private::ThreadSpec::NameMatches ( const char *  name) const
inline

Definition at line 81 of file ThreadSpec.h.

References m_name.

Referenced by NameMatches(), and ThreadPassesBasicTests().

◆ NameMatches() [2/2]

bool ThreadSpec::NameMatches ( Thread thread) const

Definition at line 91 of file ThreadSpec.cpp.

References lldb_private::Thread::GetName(), m_name, and NameMatches().

◆ QueueNameMatches() [1/2]

bool lldb_private::ThreadSpec::QueueNameMatches ( const char *  queue_name) const
inline

Definition at line 92 of file ThreadSpec.h.

References m_queue_name.

Referenced by QueueNameMatches(), and ThreadPassesBasicTests().

◆ QueueNameMatches() [2/2]

bool ThreadSpec::QueueNameMatches ( Thread thread) const

◆ SerializeToStructuredData()

StructuredData::ObjectSP ThreadSpec::SerializeToStructuredData ( )

◆ SetIndex()

void lldb_private::ThreadSpec::SetIndex ( uint32_t  index)
inline

◆ SetName()

void lldb_private::ThreadSpec::SetName ( llvm::StringRef  name)
inline

◆ SetQueueName()

void lldb_private::ThreadSpec::SetQueueName ( llvm::StringRef  queue_name)
inline

◆ SetTID()

void lldb_private::ThreadSpec::SetTID ( lldb::tid_t  tid)
inline

◆ ThreadPassesBasicTests()

bool ThreadSpec::ThreadPassesBasicTests ( Thread thread) const

◆ TIDMatches() [1/2]

bool lldb_private::ThreadSpec::TIDMatches ( lldb::tid_t  thread_id) const
inline

Definition at line 63 of file ThreadSpec.h.

References LLDB_INVALID_THREAD_ID, and m_tid.

Referenced by ThreadPassesBasicTests(), and TIDMatches().

◆ TIDMatches() [2/2]

bool ThreadSpec::TIDMatches ( Thread thread) const

Member Data Documentation

◆ g_option_names

const char * ThreadSpec::g_option_names
staticprivate
Initial value:
{"Index", "ID", "Name",
"QueueName"}

Definition at line 117 of file ThreadSpec.h.

Referenced by GetKey().

◆ m_index

uint32_t lldb_private::ThreadSpec::m_index = UINT32_MAX
private

◆ m_name

std::string lldb_private::ThreadSpec::m_name
private

◆ m_queue_name

std::string lldb_private::ThreadSpec::m_queue_name
private

◆ m_tid

lldb::tid_t lldb_private::ThreadSpec::m_tid = LLDB_INVALID_THREAD_ID
private

Definition at line 124 of file ThreadSpec.h.

Referenced by GetTID(), HasSpecification(), SerializeToStructuredData(), SetTID(), and TIDMatches().


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