LLDB mainline
|
#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< ThreadSpec > | CreateFromStructuredData (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] |
Definition at line 33 of file ThreadSpec.h.
|
strongprivate |
Enumerator | |
---|---|
ThreadIndex | |
ThreadID | |
ThreadName | |
QueueName | |
LastOptionName |
Definition at line 110 of file ThreadSpec.h.
ThreadSpec::ThreadSpec | ( | ) |
Definition at line 20 of file ThreadSpec.cpp.
Referenced by CreateFromStructuredData().
|
static |
Definition at line 22 of file ThreadSpec.cpp.
References GetKey(), lldb_private::StructuredData::Dictionary::GetValueForKeyAsInteger(), lldb_private::StructuredData::Dictionary::GetValueForKeyAsString(), LLDB_INVALID_THREAD_ID, ThreadID, ThreadIndex, ThreadName, ThreadSpec(), and UINT32_MAX.
Referenced by lldb_private::BreakpointOptions::CreateFromStructuredData().
void ThreadSpec::GetDescription | ( | Stream * | s, |
lldb::DescriptionLevel | level | ||
) | const |
Definition at line 131 of file ThreadSpec.cpp.
References lldb::eDescriptionLevelBrief, GetIndex(), GetName(), GetQueueName(), GetTID(), HasSpecification(), LLDB_INVALID_THREAD_ID, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and UINT32_MAX.
|
inline |
Definition at line 55 of file ThreadSpec.h.
References m_index.
Referenced by GetDescription(), lldb::SBBreakpoint::GetThreadIndex(), lldb::SBBreakpointName::GetThreadIndex(), lldb_private::Breakpoint::GetThreadIndex(), lldb_private::BreakpointLocation::GetThreadIndex(), and lldb_private::Breakpoint::SetThreadIndex().
|
inlinestaticprivate |
Definition at line 119 of file ThreadSpec.h.
References g_option_names.
Referenced by CreateFromStructuredData(), and SerializeToStructuredData().
const char * ThreadSpec::GetName | ( | ) | const |
Definition at line 68 of file ThreadSpec.cpp.
References m_name.
Referenced by GetDescription(), lldb::SBBreakpointName::GetThreadName(), lldb_private::Breakpoint::GetThreadName(), lldb_private::BreakpointLocation::GetThreadName(), and lldb_private::Breakpoint::SetThreadName().
const char * ThreadSpec::GetQueueName | ( | ) | const |
Definition at line 72 of file ThreadSpec.cpp.
References m_queue_name.
Referenced by GetDescription(), lldb::SBBreakpointName::GetQueueName(), lldb_private::Breakpoint::GetQueueName(), lldb_private::BreakpointLocation::GetQueueName(), and lldb_private::Breakpoint::SetQueueName().
|
inlinestatic |
Definition at line 43 of file ThreadSpec.h.
Referenced by lldb_private::BreakpointOptions::CreateFromStructuredData(), and lldb_private::BreakpointOptions::SerializeToStructuredData().
|
inline |
Definition at line 57 of file ThreadSpec.h.
References m_tid.
Referenced by lldb_private::BreakpointLocation::Dump(), GetDescription(), lldb::SBBreakpointName::GetThreadID(), lldb_private::BreakpointLocation::GetThreadID(), lldb_private::Breakpoint::GetThreadID(), and lldb_private::Breakpoint::SetThreadID().
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().
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.
|
inline |
Definition at line 72 of file ThreadSpec.h.
References m_index, and UINT32_MAX.
Referenced by IndexMatches(), and ThreadPassesBasicTests().
|
inline |
Definition at line 81 of file ThreadSpec.h.
References m_name.
Referenced by NameMatches(), and ThreadPassesBasicTests().
bool ThreadSpec::NameMatches | ( | Thread & | thread | ) | const |
Definition at line 91 of file ThreadSpec.cpp.
References lldb_private::Thread::GetName(), m_name, and NameMatches().
|
inline |
Definition at line 92 of file ThreadSpec.h.
References m_queue_name.
Referenced by QueueNameMatches(), and ThreadPassesBasicTests().
bool ThreadSpec::QueueNameMatches | ( | Thread & | thread | ) | const |
Definition at line 99 of file ThreadSpec.cpp.
References lldb_private::Thread::GetQueueName(), m_queue_name, and QueueNameMatches().
StructuredData::ObjectSP ThreadSpec::SerializeToStructuredData | ( | ) |
Definition at line 53 of file ThreadSpec.cpp.
References GetKey(), LLDB_INVALID_THREAD_ID, m_index, m_name, m_queue_name, m_tid, QueueName, ThreadID, ThreadIndex, ThreadName, and UINT32_MAX.
|
inline |
Definition at line 45 of file ThreadSpec.h.
References m_index.
Referenced by lldb_private::BreakpointOptionGroup::SetOptionValue(), lldb::SBBreakpointName::SetThreadIndex(), lldb_private::Breakpoint::SetThreadIndex(), and lldb_private::BreakpointLocation::SetThreadIndex().
|
inline |
Definition at line 49 of file ThreadSpec.h.
References m_name.
Referenced by lldb_private::BreakpointOptionGroup::SetOptionValue(), lldb::SBBreakpointName::SetThreadName(), lldb_private::Breakpoint::SetThreadName(), and lldb_private::BreakpointLocation::SetThreadName().
|
inline |
Definition at line 51 of file ThreadSpec.h.
References m_queue_name.
Referenced by lldb_private::BreakpointOptionGroup::SetOptionValue(), lldb::SBBreakpointName::SetQueueName(), lldb_private::Breakpoint::SetQueueName(), and lldb_private::BreakpointLocation::SetQueueName().
|
inline |
Definition at line 47 of file ThreadSpec.h.
References m_tid.
Referenced by lldb_private::Breakpoint::SetThreadID(), lldb_private::BreakpointOptions::SetThreadID(), and lldb_private::WatchpointOptions::SetThreadID().
bool ThreadSpec::ThreadPassesBasicTests | ( | Thread & | thread | ) | const |
Definition at line 107 of file ThreadSpec.cpp.
References HasSpecification(), IndexMatches(), NameMatches(), QueueNameMatches(), and TIDMatches().
Referenced by lldb_private::Thread::MatchesSpec().
|
inline |
Definition at line 63 of file ThreadSpec.h.
References LLDB_INVALID_THREAD_ID, and m_tid.
Referenced by ThreadPassesBasicTests(), and TIDMatches().
bool ThreadSpec::TIDMatches | ( | Thread & | thread | ) | const |
Definition at line 76 of file ThreadSpec.cpp.
References lldb_private::UserID::GetID(), LLDB_INVALID_THREAD_ID, m_tid, and TIDMatches().
|
staticprivate |
Definition at line 117 of file ThreadSpec.h.
Referenced by GetKey().
|
private |
Definition at line 123 of file ThreadSpec.h.
Referenced by GetIndex(), HasSpecification(), IndexMatches(), SerializeToStructuredData(), and SetIndex().
|
private |
Definition at line 125 of file ThreadSpec.h.
Referenced by GetName(), HasSpecification(), NameMatches(), SerializeToStructuredData(), and SetName().
|
private |
Definition at line 126 of file ThreadSpec.h.
Referenced by GetQueueName(), HasSpecification(), QueueNameMatches(), SerializeToStructuredData(), and SetQueueName().
|
private |
Definition at line 124 of file ThreadSpec.h.
Referenced by GetTID(), HasSpecification(), SerializeToStructuredData(), SetTID(), and TIDMatches().