diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp index f2dccf935194..238229c5108c 100644 --- a/lldb/source/API/SBBreakpoint.cpp +++ b/lldb/source/API/SBBreakpoint.cpp @@ -310,7 +310,7 @@ SBBreakpoint::SetThreadIndex (uint32_t index) uint32_t SBBreakpoint::GetThreadIndex() const { - uint32_t thread_idx = 0; + uint32_t thread_idx = UINT32_MAX; if (m_opaque_sp) { const ThreadSpec *thread_spec = m_opaque_sp->GetOptions()->GetThreadSpec(); @@ -319,9 +319,9 @@ SBBreakpoint::GetThreadIndex() const } LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) - log->Printf ("SBBreakpoint(%p)::GetThreadIndex () => %u", m_opaque_sp.get(), index); + log->Printf ("SBBreakpoint(%p)::GetThreadIndex () => %u", m_opaque_sp.get(), thread_idx); - return 0; + return UINT32_MAX; } diff --git a/lldb/source/Target/ThreadSpec.cpp b/lldb/source/Target/ThreadSpec.cpp index e29655826887..07abf595c8d5 100644 --- a/lldb/source/Target/ThreadSpec.cpp +++ b/lldb/source/Target/ThreadSpec.cpp @@ -14,7 +14,7 @@ using namespace lldb; using namespace lldb_private; ThreadSpec::ThreadSpec() : - m_index (-1), + m_index (UINT32_MAX), m_tid (LLDB_INVALID_THREAD_ID), m_name(), m_queue_name () @@ -83,7 +83,7 @@ ThreadSpec::ThreadPassesBasicTests (Thread *thread) const bool ThreadSpec::HasSpecification() const { - return (m_index != -1 || m_tid != LLDB_INVALID_THREAD_ID || !m_name.empty() || !m_queue_name.empty()); + return (m_index != UINT32_MAX || m_tid != LLDB_INVALID_THREAD_ID || !m_name.empty() || !m_queue_name.empty()); } void ThreadSpec::GetDescription (Stream *s, lldb::DescriptionLevel level) const @@ -106,7 +106,7 @@ ThreadSpec::GetDescription (Stream *s, lldb::DescriptionLevel level) const if (GetTID() != LLDB_INVALID_THREAD_ID) s->Printf("tid: 0x%llx ", GetTID()); - if (GetIndex() != -1) + if (GetIndex() != UINT32_MAX) s->Printf("index: %d ", GetIndex()); const char *name = GetName();